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

Remove redundant json in vehicleparts/doors.json and vehicleparts/vehicle_parts.json #66525

Closed
wants to merge 4 commits into from

Conversation

hexagonrecursion
Copy link
Contributor

Summary

None

Purpose of change

It appears that #66450 forgot to remove some redundant json entries. This was causing debug warnings.

Describe the solution

Remove redundant location, color and broken_color

Testing

The game loads successfully

```
 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
Default from veh_type.h:
```
nc_color color = c_light_gray;
```

Error:
```
 DEBUG    : (json-error)
Json error: data/json/vehicleparts/vehicle_parts.json:2,198:13: cannot assign explicit value the same as default or inherited value

    "variants": [ { "symbols": "+", "symbols_broken": "&" } ],
    "categories": [ "hull" ],
    "color":
            ^
             "light_gray",
    "looks_like": "door_trunk",
    "broken_color": "light_gray",


 FUNCTION : void report_strict_violation(const JsonObject&, const string&, std::string_view)
 FILE     : src/assign.cpp
 LINE     : 11
 VERSION  : 5820766
```
Default from veh_type.h:
```
nc_color color_broken = c_light_gray;
```

Error:
```
 DEBUG    : (json-error)
Json error: data/json/vehicleparts/vehicle_parts.json:2,200:20: cannot assign explicit value the same as default or inherited value

    "color": "light_gray",
    "looks_like": "door_trunk",
    "broken_color":
                   ^
                    "light_gray",
    "damage_modifier": 80,
    "durability": 750,


 FUNCTION : void report_strict_violation(const JsonObject&, const string&, std::string_view)
 FILE     : src/assign.cpp
 LINE     : 11
 VERSION  : 5820766
```
Default from veh_type.h:
```
nc_color color_broken = c_light_gray;
```
@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Vehicles Vehicles, parts, mechanics & interactions json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Jun 29, 2023
@hexagonrecursion
Copy link
Contributor Author

Oops. Dupe #66523

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jun 29, 2023
@hexagonrecursion hexagonrecursion deleted the patch-2 branch January 3, 2024 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [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.

1 participant