Skip to content

Commit

Permalink
Migrate con_mix to con_mix_foldable to avoid crashing due to missing …
Browse files Browse the repository at this point in the history
…item vars
  • Loading branch information
harakka committed Mar 17, 2024
1 parent 292b76e commit a464f06
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion data/json/itemgroups/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"items": [
{ "item": "brick_kiln", "prob": 80, "charges": [ 0, 1000 ] },
{ "item": "kiln", "prob": 40 },
{ "item": "con_mix", "prob": 120 },
{ "item": "con_mix_foldable", "prob": 120 },
{ "item": "elec_jackhammer", "prob": 40, "charges": [ 0, 6600 ] },
{ "item": "reciprocating_saw", "prob": 80, "charges": [ 0, 500 ] },
{ "item": "cordless_impact_wrench", "prob": 20, "charges": [ 0, 500 ] },
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/tool/workshop.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
"//2": "Based on https://www.amazon.com/dp/B000A24RCA"
},
{
"id": "con_mix",
"id": "con_mix_foldable",
"type": "TOOL",
"name": { "str": "concrete mixer" },
"description": "A portable concrete mixer. It is large and heavy, but it can be operated solo. Unfold to use.",
Expand Down
10 changes: 5 additions & 5 deletions data/json/mapgen/construction_site.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
" "
],
"palettes": [ "construction_site_palette" ],
"place_loot": [ { "item": "con_mix", "x": [ 0, 8 ], "y": [ 5, 7 ] } ],
"place_loot": [ { "item": "con_mix_foldable", "x": [ 0, 8 ], "y": [ 5, 7 ] } ],
"place_vehicles": [ { "vehicle": "small_utility_vehicles", "x": 12, "y": 4, "chance": 70, "rotation": 180 } ]
}
},
Expand Down Expand Up @@ -71,7 +71,7 @@
" "
],
"palettes": [ "construction_site_palette" ],
"place_loot": [ { "item": "con_mix", "x": [ 5, 9 ], "y": [ 4, 7 ] } ],
"place_loot": [ { "item": "con_mix_foldable", "x": [ 5, 9 ], "y": [ 4, 7 ] } ],
"place_vehicles": [ { "vehicle": "small_utility_vehicles", "x": 12, "y": 4, "chance": 70, "rotation": 0 } ]
}
},
Expand Down Expand Up @@ -109,7 +109,7 @@
" c ss "
],
"palettes": [ "construction_site_palette" ],
"place_loot": [ { "item": "con_mix", "x": [ 0, 4 ], "y": [ 17, 19 ] } ],
"place_loot": [ { "item": "con_mix_foldable", "x": [ 0, 4 ], "y": [ 17, 19 ] } ],
"place_vehicles": [
{ "vehicle": "small_utility_vehicles", "x": 22, "y": 4, "chance": 66, "rotation": 270 },
{ "vehicle": "small_utility_vehicles", "x": 12, "y": 21, "chance": 66, "rotation": 180 }
Expand Down Expand Up @@ -150,7 +150,7 @@
" -- -- -- -- -- "
],
"palettes": [ "construction_site_palette" ],
"place_loot": [ { "item": "con_mix", "x": [ 0, 17 ], "y": 1 } ],
"place_loot": [ { "item": "con_mix_foldable", "x": [ 0, 17 ], "y": 1 } ],
"place_vehicles": [ { "vehicle": "small_utility_vehicles", "x": 20, "y": [ 6, 11 ], "chance": 70, "rotation": 270 } ]
}
},
Expand Down Expand Up @@ -188,7 +188,7 @@
" c c "
],
"palettes": [ "construction_site_palette" ],
"place_loot": [ { "item": "con_mix", "x": [ 5, 11 ], "y": [ 20, 23 ] } ],
"place_loot": [ { "item": "con_mix_foldable", "x": [ 5, 11 ], "y": [ 20, 23 ] } ],
"place_vehicles": [ { "vehicle": "small_utility_vehicles", "x": 15, "y": 21, "chance": 70, "rotation": 180 } ]
}
}
Expand Down
8 changes: 4 additions & 4 deletions data/json/mapgen/house/house_vacant.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
" -- -- -- -- -- "
],
"palettes": [ "construction_site_palette" ],
"place_loot": [ { "item": "con_mix", "x": [ 12, 22 ], "y": [ 19, 22 ] } ],
"place_loot": [ { "item": "con_mix_foldable", "x": [ 12, 22 ], "y": [ 19, 22 ] } ],
"place_vehicles": [ { "vehicle": "small_utility_vehicles", "x": 11, "y": 2, "chance": 70, "rotation": 0 } ]
}
},
Expand Down Expand Up @@ -73,7 +73,7 @@
" @@ sss 11 22 22 "
],
"palettes": [ "construction_site_palette" ],
"place_loot": [ { "item": "con_mix", "x": [ 1, 9 ], "y": [ 16, 19 ] } ],
"place_loot": [ { "item": "con_mix_foldable", "x": [ 1, 9 ], "y": [ 16, 19 ] } ],
"place_vehicles": [ { "vehicle": "small_utility_vehicles", "x": 20, "y": 2, "chance": 70, "rotation": 0 } ]
}
},
Expand Down Expand Up @@ -112,7 +112,7 @@
" ss -- -- "
],
"palettes": [ "construction_site_palette" ],
"place_loot": [ { "item": "con_mix", "x": [ 2, 8 ], "y": [ 19, 21 ] } ],
"place_loot": [ { "item": "con_mix_foldable", "x": [ 2, 8 ], "y": [ 19, 21 ] } ],
"place_vehicles": [ { "vehicle": "small_utility_vehicles", "x": 5, "y": 2, "chance": 70, "rotation": 0 } ]
}
},
Expand Down Expand Up @@ -151,7 +151,7 @@
" "
],
"palettes": [ "construction_site_palette" ],
"place_loot": [ { "item": "con_mix", "x": [ 7, 13 ], "y": [ 1, 5 ] } ],
"place_loot": [ { "item": "con_mix_foldable", "x": [ 7, 13 ], "y": [ 1, 5 ] } ],
"place_vehicles": [ { "vehicle": "small_utility_vehicles", "x": 4, "y": 4, "chance": 70, "rotation": 90 } ]
}
}
Expand Down
2 changes: 1 addition & 1 deletion data/json/npcs/NC_JUNK_SHOPKEEP.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
{ "item": "polisher", "prob": 20 },
{ "item": "screwdriver", "prob": 40 },
{ "item": "hammer", "prob": 35 },
{ "item": "con_mix", "prob": 10 },
{ "item": "con_mix_foldable", "prob": 10 },
{ "item": "brick_kiln", "prob": 10 },
{ "item": "kiln", "prob": 4 },
{ "item": "g_shovel", "prob": 20 },
Expand Down
6 changes: 6 additions & 0 deletions data/json/obsoletion_and_migration_0.I/migration_items.json
Original file line number Diff line number Diff line change
Expand Up @@ -1141,5 +1141,11 @@
"id": "ak74",
"type": "MIGRATION",
"replace": "ak74_semi"
},
{
"id": "con_mix",
"type": "MIGRATION",
"replace": "con_mix_foldable",
"reset_item_vars": true
}
]
2 changes: 1 addition & 1 deletion data/json/recipes/recipe_others.json
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@
{
"type": "recipe",
"activity_level": "BRISK_EXERCISE",
"result": "con_mix",
"result": "con_mix_foldable",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_TOOLS",
"skill_used": "fabrication",
Expand Down

0 comments on commit a464f06

Please sign in to comment.