1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-05 06:14:36 +00:00
Funkin/source/funkin/data
2024-04-01 22:21:29 -04:00
..
animation FNFC file rework (includes command line quicklaunch) 2023-10-21 01:04:50 -04:00
character Rewrite Stage data handling to use the Registry pattern, and add support for solid colors. 2024-01-16 17:08:25 -05:00
conversation Rewrite Stage data handling to use the Registry pattern, and add support for solid colors. 2024-01-16 17:08:25 -05:00
dialogue Registries now get added to the Flixel console (and get lazy instantiated so they don't start before the game does) 2024-03-22 02:47:21 -04:00
event Working Blazin cutscene and fixed time travel 2024-02-26 19:03:04 -05:00
freeplay Fix issues with Freeplay OST text and add animations. 2024-03-28 01:46:50 -04:00
level Registries now get added to the Flixel console (and get lazy instantiated so they don't start before the game does) 2024-03-22 02:47:21 -04:00
notestyle Registries now get added to the Flixel console (and get lazy instantiated so they don't start before the game does) 2024-03-22 02:47:21 -04:00
song Merge remote-tracking branch 'origin/rewrite/master' into feature/credits 2024-03-28 03:00:45 -04:00
speaker Rewrite Stage data handling to use the Registry pattern, and add support for solid colors. 2024-01-16 17:08:25 -05:00
stage Registries now get added to the Flixel console (and get lazy instantiated so they don't start before the game does) 2024-03-22 02:47:21 -04:00
BaseRegistry.hx First implementation of credits state. 2024-03-26 12:33:54 -04:00
DataError.hx "Add Variation" button, SongMetadata format changes, bug fixes, resolve metadata loading issues. 2023-09-25 23:24:07 -04:00
DataParse.hx Rework Conversation data parsing 2024-02-07 18:45:13 -05:00
DataWrite.hx FNFC file rework (includes command line quicklaunch) 2023-10-21 01:04:50 -04:00
IRegistryEntry.hx New song data parser 2023-09-08 17:45:47 -04:00
JsonFile.hx First implementation of credits state. 2024-03-26 12:33:54 -04:00
README.md New song data parser 2023-09-08 17:45:47 -04:00

funkin.data

Data structures are parsed using json2object, which uses macros to generate parser classes based on anonymous structures OR classes.

Parsing errors will be returned in parser.errors. See json2object.Error for an enumeration of possible parsing errors. If an error occurred, parser.value will be null.

The properties of these anonymous structures can have their behavior changed with annotations:

  • @:optional: The value is optional and will not throw a parsing error if it is not present in the JSON data.
  • @:default("test"): If the value is optional, this value will be used instead of null. Replace "test" with a value of the property's type.
  • @:default(auto): If the value is an anonymous structure with json2object annotations, each field will be initialized to its default value.
  • @:jignored: This value will be ignored by the parser. Their presence will not be checked in the JSON data and their values will not be parsed.
  • @:alias: Choose the name the value will use in the JSON data to be separate from the property name. Useful if the desired name is a reserved word like public.
  • @:jcustomparse: Provide a custom function for parsing from a JSON string into a value.
    • Functions must be of the signature (hxjsonast.Json, String) -> T, where the String is the property name and T is the type of the property.
    • hxjsonast.Json contains a pos and a value, with value being an enum: https://nadako.github.io/hxjsonast/hxjsonast/JsonValue.html
    • Errors thrown in this function will cause a parsing error (CustomFunctionException) along with a position!
    • Make sure to provide the FULLY QUALIFIED path to the custom function.
  • @:jcustomwrite: Provide a custom function for serializing the property into a string for storage as JSON.
    • Functions must be of the signature (T) -> String, where T is the type of the property.