Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more generic_factory checks to vpart_info loader #66450

Merged
merged 5 commits into from
Jun 29, 2023

Conversation

irwiss
Copy link
Contributor

@irwiss irwiss commented Jun 25, 2023

Summary

None

Purpose of change

Use more generic_factory features in vpart_info loader

Describe the solution

Add strict checking on most vpart_info fields when src=="dda"
Change install/repair etc time to use time_duration - just the serialization parts for now
Cleanup and merge the loader into one function
Move the loose VPFLAG comments to vp_flags.json
Remove ROTOR_SIMPLE flag
Remove undocumented and unused feature on loader (array length 1 skill loading)

Describe alternatives you've considered

Testing

Tested via dumping vpart_info to file 38a1fc9

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Appliance/Power Grid Anything to do with appliances and power grid Items: Armor / Clothing Armor and clothing Items: Battery / UPS Electric power management Vehicles Vehicles, parts, mechanics & interactions astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Jun 25, 2023
@irwiss irwiss changed the title Vpart factory checks Add more factory checks to vpart_info loader Jun 25, 2023
@irwiss irwiss changed the title Add more factory checks to vpart_info loader Add more generic_factory checks to vpart_info loader Jun 25, 2023
@irwiss irwiss force-pushed the vpart-factory-checks branch from 2f7f401 to 5d15565 Compare June 25, 2023 14:40
@NetSysFire NetSysFire added the Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style label Jun 25, 2023
@irwiss irwiss force-pushed the vpart-factory-checks branch 3 times, most recently from 1b5e5e9 to b07ead8 Compare June 28, 2023 00:05
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jun 28, 2023
@irwiss irwiss force-pushed the vpart-factory-checks branch from b07ead8 to 4840a25 Compare June 28, 2023 08:19
@dseguin dseguin merged commit 5ad00bd into CleverRaven:master Jun 29, 2023
@irwiss irwiss deleted the vpart-factory-checks branch June 29, 2023 08:47
hexagonrecursion added a commit to hexagonrecursion/Cataclysm-DDA that referenced this pull request Jun 29, 2023
```
 DEBUG    : (json-error)
Json error: data/json/vehicleparts/doors.json:106:16: cannot assign explicit value the same as default or inherited value

    "description": "A strong door.  Solid construction means you can't see through it when closed.",
    "durability": 660,
    "location":
               ^
                "center",
    "looks_like": "door_opaque",
    "name": { "str": "heavy-duty opaque door" },


 FUNCTION : void report_strict_violation(const JsonObject&, const string&, std::string_view)
 FILE     : src/assign.cpp
 LINE     : 11
 VERSION  : 5820766
```
Ref: CleverRaven#66450
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Appliance/Power Grid Anything to do with appliances and power grid astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Items: Armor / Clothing Armor and clothing Items: Battery / UPS Electric power management [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants