1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-04 09:42:40 +02:00
Commit Graph

32 Commits

Author SHA1 Message Date
Ivan Savenko
235fa871dd Better validation of bonus json
- Json validator will now list all possible enum values on enum
validation failure
- Added validation of bonus string values using json valudation
- Deprecated bonus values (e.g. UNITL_BEING_ATTACKED) are now reported
via json validation
- Removed array version of "propagator" key since code only loads it as
a single string
2024-06-27 10:54:23 +00:00
Ivan Savenko
1057fa4ef9 Re-enable code that was not restored after terrain rework 2024-06-07 12:24:36 +00:00
Ivan Savenko
28081085a8 Create separate instance of updater for every bonus 2024-05-28 16:43:28 +00:00
Ivan Savenko
147db10a28 Avoid crash if configs file is missing, e.g. broken version of mod 2024-05-11 13:19:07 +00:00
Dydzio
b351946afd Add some utility bonuses for player resources boosting 2024-04-15 21:18:45 +02:00
Ivan Savenko
9e49587749 Replace bonus string description with metastring that can properly
handle translations
2024-04-09 16:13:30 +03:00
Ivan Savenko
39da7b3e32 Added option to build minimal vcmi library as needed by lobby 2024-03-28 12:07:49 +02:00
Ivan Savenko
c21e5bb0fb Always validate messages in debug mode. Fixes for schemas 2024-03-08 16:32:40 +02:00
Ivan Savenko
2c1b142d68 Added support for 'const' field to json validator 2024-03-08 16:32:39 +02:00
Ivan Savenko
d5a96a122a Add additional constructor to JsonNode from const char *
Fixes an issue where due to implicit conversion JsonNode(bool) will be
called instead of expected JsonNode(std::string)
2024-02-29 17:33:00 +02:00
Ivan Savenko
57eece233b Ignore BOM at the start of json file 2024-02-26 12:55:49 +02:00
Ivan Savenko
f86708bf37 Fix json5 parsing 2024-02-26 12:55:49 +02:00
Ivan Savenko
c90fb47c23 Converted json validator into a class 2024-02-26 12:55:49 +02:00
Ivan Savenko
d2844a5eeb Cleared up code 2024-02-26 12:55:49 +02:00
Ivan Savenko
08deae4186 Moved static methods outside of vcmi namespace 2024-02-26 12:55:49 +02:00
Ivan Savenko
757f77378d Remove unused code 2024-02-26 12:55:49 +02:00
Ivan Savenko
29860848a5 Cleanup 2024-02-26 12:55:49 +02:00
Ivan Savenko
18bbccd167 Unify formatting 2024-02-26 12:55:49 +02:00
Ivan Savenko
2632ab04f5 Partial support for json5 2024-02-26 12:55:49 +02:00
Ivan Savenko
41493d6f67 Implemented 'strict' json support 2024-02-26 12:55:49 +02:00
Ivan Savenko
d1c274f93f Replaced vector of strings with simple bool for flag 2024-02-26 12:55:49 +02:00
Ivan Savenko
922966dcf8 Renamed JsonNode::meta to more logical modScope. Member is now private 2024-02-26 12:55:49 +02:00
Ivan Savenko
e73516b7d1 Simplified template magic in JsonNode 2024-02-26 12:55:49 +02:00
Ivan Savenko
08a27663f9 Reworked JsonNode constructors to more logical form 2024-02-26 12:55:49 +02:00
Ivan Savenko
54796c7c56 Rename toJson to toString/toCompactString for consistency 2024-02-26 12:55:49 +02:00
Ivan Savenko
a2b8eaf7fb Do not escape '/' when writing json 2024-02-26 12:55:49 +02:00
Ivan Savenko
25146bfa93 Replace custom class with string_view 2024-02-26 12:55:49 +02:00
Ivan Savenko
ca9a16e30e Partially updated schema validation to draft v6 2024-02-26 12:55:49 +02:00
Alexander Wilms
2ea78a5883 Fix float comparisons
Replace this "==" with a more tolerant comparison operation.
Floating point numbers should not be tested for equality cpp:S1244
2024-02-14 23:30:29 +01:00
Ivan Savenko
3740f8b02f Moved bonus parsing to a new file 2024-02-14 15:48:06 +02:00
Ivan Savenko
0b7bf56597 Remove old files 2024-02-14 14:02:41 +02:00
Ivan Savenko
c3957c2c2a Moved json files to new directory, split on per-class basis 2024-02-14 13:08:24 +02:00