Skip to content

Commit

Permalink
fix: Advanced Object Deconstruction no longer hides deconstruction re…
Browse files Browse the repository at this point in the history
…sults (#5867)

* Tests to allow advanced object deconstruction to use normal terrain deconstruction field

* Initial framework for deconstruction fix...

* Further AOD/deconstruction modifications

* Final AOD JSON fixes + cleaned up grid_plut_generator entry

* Added precaution preventing double-deconstructs

* Updated json_flags.md with information on ADV_DECONSTRUCT.

* ADV_DECONSTRUCT supersedes EASY_DECONSTRUCT. This should never come up, but it doesn't hurt to be careful.

* style(autofix.ci): automated formatting

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
karxi and autofix-ci[bot] authored Jan 2, 2025
1 parent 9df762b commit c75fb01
Show file tree
Hide file tree
Showing 11 changed files with 288 additions and 193 deletions.
2 changes: 2 additions & 0 deletions data/json/construction.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"required_skills": [ [ "fabrication", 0 ] ],
"time": "20 m",
"qualities": [ [ { "id": "PRY", "level": 1 } ], [ { "id": "SCREW", "level": 1 } ] ],
"deny_flags": [ "ADV_DECONSTRUCT" ],
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct"
Expand All @@ -20,6 +21,7 @@
"time": "10 s",
"pre_note": "Certain terrain and furniture can be deconstructed without any tools.",
"pre_flags": "EASY_DECONSTRUCT",
"deny_flags": [ "ADV_DECONSTRUCT" ],
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"dark_craftable": true,
Expand Down
219 changes: 52 additions & 167 deletions data/json/deconstruction.json
Original file line number Diff line number Diff line change
Expand Up @@ -786,9 +786,10 @@
"required_skills": [ [ "fabrication", 2 ] ],
"time": "90 m",
"using": [ [ "object_deconstruction_advanced", 1 ] ],
"byproducts": [ { "item": "rock", "count": [ 35, 40 ] } ],
"pre_furniture": "f_fireplace",
"post_furniture": "f_null",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -799,14 +800,10 @@
"required_skills": [ [ "fabrication", 2 ], [ "electronics", 3 ] ],
"time": "90 m",
"using": [ [ "advanced_electronics_high_voltage", 1 ] ],
"byproducts": [
{ "item": "scrap", "count": [ 1, 4 ] },
{ "item": "scrap_copper", "count": [ 10, 20 ] },
{ "item": "cable", "charges": [ 20, 100 ] },
{ "item": "pipe", "count": [ 1, 2 ] }
],
"pre_furniture": "f_electrical_conduit",
"post_furniture": "f_null",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -817,18 +814,10 @@
"required_skills": [ [ "fabrication", 3 ], [ "electronics", 8 ] ],
"time": "120 m",
"using": [ [ "advanced_electronics_high_voltage", 1 ] ],
"byproducts": [
{ "item": "scrap", "count": [ 1, 4 ] },
{ "item": "cable", "charges": [ 100, 800 ] },
{ "item": "pipe", "count": [ 0, 4 ] },
{ "item": "circuit", "count": [ 0, 5 ] },
{ "item": "e_scrap", "count": [ 2, 8 ] },
{ "item": "amplifier", "count": [ 0, 4 ] },
{ "item": "power_supply", "count": [ 0, 2 ] },
{ "item": "metal_tank_little", "count": [ 0, 6 ] }
],
"pre_furniture": "f_capacitor",
"post_furniture": "f_null",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -838,20 +827,10 @@
"required_skills": [ [ "electronics", 0 ] ],
"time": "20 m",
"qualities": [ { "id": "SCREW", "level": 1 } ],
"byproducts": [
{ "item": "processor", "count": [ 1, 2 ] },
{ "item": "RAM", "count": [ 4, 8 ] },
{ "item": "cable", "charges": [ 4, 6 ] },
{ "item": "large_lcd_screen", "count": 1 },
{ "item": "e_scrap", "count": [ 10, 16 ] },
{ "item": "circuit", "count": [ 6, 10 ] },
{ "item": "power_supply", "count": [ 2, 4 ] },
{ "item": "amplifier", "count": [ 2, 4 ] },
{ "item": "plastic_chunk", "count": [ 10, 12 ] },
{ "item": "scrap", "count": [ 6, 8 ] }
],
"pre_terrain": "t_console_broken",
"post_terrain": "t_floor",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -861,20 +840,10 @@
"required_skills": [ [ "electronics", 0 ] ],
"time": "20 m",
"qualities": [ { "id": "SCREW", "level": 1 } ],
"byproducts": [
{ "item": "processor", "count": [ 1, 2 ] },
{ "item": "RAM", "count": [ 4, 8 ] },
{ "item": "cable", "charges": [ 4, 6 ] },
{ "item": "large_lcd_screen", "count": 1 },
{ "item": "e_scrap", "count": [ 10, 16 ] },
{ "item": "circuit", "count": [ 6, 10 ] },
{ "item": "power_supply", "count": [ 2, 4 ] },
{ "item": "amplifier", "count": [ 2, 4 ] },
{ "item": "plastic_chunk", "count": [ 10, 12 ] },
{ "item": "scrap", "count": [ 6, 8 ] }
],
"pre_terrain": "t_console",
"post_terrain": "t_floor",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -885,13 +854,10 @@
"required_skills": [ [ "fabrication", 2 ], [ "electronics", 6 ] ],
"time": "90 m",
"using": [ [ "advanced_electronics_high_voltage", 1 ] ],
"byproducts": [
{ "item": "plut_generator_item", "charges": [ 1, 1 ] },
{ "item": "power_supply", "charges": [ 3, 3 ] },
{ "item": "cable", "charges": [ 15, 15 ] }
],
"pre_terrain": "t_plut_generator",
"post_terrain": "t_concrete",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -902,13 +868,10 @@
"required_skills": [ [ "fabrication", 2 ], [ "electronics", 6 ] ],
"time": "30 m",
"using": [ [ "advanced_electronics_high_voltage", 1 ] ],
"byproducts": [
{ "item": "plut_generator_item", "charges": [ 1, 1 ] },
{ "item": "power_supply", "charges": [ 3, 3 ] },
{ "item": "cable", "charges": [ 15, 15 ] }
],
"pre_furniture": "f_grid_plut_generator",
"post_furniture": "f_null",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -918,19 +881,10 @@
"required_skills": [ [ "electronics", 1 ] ],
"time": "30 m",
"using": [ [ "advanced_electronics_low_voltage", 1 ] ],
"byproducts": [
{ "item": "RAM", "count": [ 4, 8 ] },
{ "item": "cable", "charges": [ 16, 40 ] },
{ "item": "small_lcd_screen", "count": [ 2, 4 ] },
{ "item": "e_scrap", "count": [ 12, 24 ] },
{ "item": "circuit", "count": [ 6, 30 ] },
{ "item": "power_supply", "count": [ 4, 8 ] },
{ "item": "amplifier", "count": [ 3, 6 ] },
{ "item": "plastic_chunk", "count": [ 4, 8 ] },
{ "item": "scrap", "count": [ 8, 16 ] }
],
"pre_terrain": "t_sai_box",
"post_terrain": "t_concrete",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -940,18 +894,10 @@
"required_skills": [ [ "electronics", 1 ] ],
"time": "35 m",
"using": [ [ "advanced_electronics_low_voltage", 1 ] ],
"byproducts": [
{ "item": "RAM", "count": [ 1, 2 ] },
{ "item": "cable", "charges": [ 4, 24 ] },
{ "item": "e_scrap", "count": [ 4, 12 ] },
{ "item": "circuit", "count": [ 2, 12 ] },
{ "item": "power_supply", "count": [ 1, 4 ] },
{ "item": "amplifier", "count": [ 1, 3 ] },
{ "item": "plastic_chunk", "count": [ 2, 6 ] },
{ "item": "scrap", "count": [ 6, 12 ] }
],
"pre_terrain": "t_sai_box_damaged",
"post_terrain": "t_concrete",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -961,17 +907,10 @@
"required_skills": [ [ "electronics", 5 ] ],
"time": "60 m",
"using": [ [ "advanced_electronics_high_voltage", 1 ] ],
"byproducts": [
{ "item": "cable", "charges": [ 8, 24 ] },
{ "item": "power_supply", "count": [ 4, 8 ] },
{ "item": "amplifier", "count": [ 8, 16 ] },
{ "item": "steel_chunk", "count": [ 4, 16 ] },
{ "item": "scrap", "count": [ 12, 24 ] },
{ "item": "sheet_metal", "count": [ 6, 12 ] },
{ "item": "ceramic_shard", "count": [ 2, 6 ] }
],
"pre_terrain": "t_oil_circ_brkr_l",
"post_terrain": "t_concrete",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -981,17 +920,10 @@
"required_skills": [ [ "electronics", 5 ] ],
"time": "45 m",
"using": [ [ "advanced_electronics_high_voltage", 1 ] ],
"byproducts": [
{ "item": "cable", "charges": [ 4, 12 ] },
{ "item": "power_supply", "count": [ 3, 6 ] },
{ "item": "amplifier", "count": [ 6, 12 ] },
{ "item": "steel_chunk", "count": [ 2, 12 ] },
{ "item": "scrap", "count": [ 8, 18 ] },
{ "item": "sheet_metal", "count": [ 4, 8 ] },
{ "item": "ceramic_shard", "count": [ 1, 4 ] }
],
"pre_terrain": "t_oil_circ_brkr_s",
"post_terrain": "t_concrete",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -1001,20 +933,10 @@
"required_skills": [ [ "electronics", 1 ] ],
"time": "45 m",
"using": [ [ "advanced_electronics_low_voltage", 1 ] ],
"byproducts": [
{ "item": "RAM", "count": [ 2, 6 ] },
{ "item": "cable", "charges": [ 4, 24 ] },
{ "item": "small_lcd_screen", "count": [ 6, 12 ] },
{ "item": "e_scrap", "count": [ 16, 24 ] },
{ "item": "circuit", "count": [ 12, 30 ] },
{ "item": "power_supply", "count": [ 6, 8 ] },
{ "item": "amplifier", "count": [ 6, 8 ] },
{ "item": "plastic_chunk", "count": [ 2, 4 ] },
{ "item": "scrap", "count": [ 8, 16 ] },
{ "item": "sheet_metal", "count": [ 2, 4 ] }
],
"pre_terrain": "t_switchgear_l",
"post_terrain": "t_concrete",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -1024,20 +946,10 @@
"required_skills": [ [ "electronics", 1 ] ],
"time": "35 m",
"using": [ [ "advanced_electronics_low_voltage", 1 ] ],
"byproducts": [
{ "item": "RAM", "count": [ 1, 2 ] },
{ "item": "cable", "charges": [ 2, 8 ] },
{ "item": "small_lcd_screen", "count": [ 2, 6 ] },
{ "item": "e_scrap", "count": [ 6, 12 ] },
{ "item": "circuit", "count": [ 8, 24 ] },
{ "item": "power_supply", "count": [ 2, 6 ] },
{ "item": "amplifier", "count": [ 1, 4 ] },
{ "item": "plastic_chunk", "count": [ 1, 2 ] },
{ "item": "scrap", "count": [ 4, 8 ] },
{ "item": "sheet_metal", "count": [ 1, 2 ] }
],
"pre_terrain": "t_switchgear_s",
"post_terrain": "t_concrete",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -1047,14 +959,10 @@
"required_skills": [ [ "electronics", 0 ] ],
"time": "20 m",
"using": [ [ "advanced_electronics_low_voltage", 1 ] ],
"byproducts": [
{ "item": "cable", "charges": [ 0, 4 ] },
{ "item": "scrap", "count": [ 8, 12 ] },
{ "item": "steel_chunk", "count": [ 2, 4 ] },
{ "item": "ceramic_shard", "count": [ 8, 16 ] }
],
"pre_terrain": "t_lgtn_arrest",
"post_terrain": "t_concrete",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -1064,22 +972,10 @@
"required_skills": [ [ "electronics", 2 ] ],
"time": "35 m",
"using": [ [ "advanced_electronics_high_voltage", 1 ] ],
"byproducts": [
{ "item": "RAM", "count": [ 12, 24 ] },
{ "item": "cable", "charges": [ 6, 12 ] },
{ "item": "small_lcd_screen", "count": [ 8, 16 ] },
{ "item": "e_scrap", "count": [ 8, 12 ] },
{ "item": "circuit", "count": [ 6, 18 ] },
{ "item": "power_supply", "count": [ 8, 12 ] },
{ "item": "amplifier", "count": [ 2, 4 ] },
{ "item": "plastic_chunk", "count": [ 4, 8 ] },
{ "item": "scrap", "count": [ 2, 6 ] },
{ "item": "sheet_metal", "count": [ 1, 2 ] },
{ "item": "lead", "charges": [ 1, 2 ] },
{ "item": "ceramic_shard", "count": [ 2, 6 ] }
],
"pre_terrain": "t_station_disc",
"post_terrain": "t_concrete",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -1089,16 +985,10 @@
"required_skills": [ [ "electronics", 3 ] ],
"time": "45 m",
"using": [ [ "advanced_electronics_high_voltage", 1 ] ],
"byproducts": [
{ "item": "scrap", "count": [ 12, 16 ] },
{ "item": "steel_chunk", "count": [ 4, 6 ] },
{ "item": "lead", "charges": [ 4, 16 ] },
{ "item": "cable", "charges": [ 60, 120 ] },
{ "item": "sheet_metal", "count": [ 2, 6 ] },
{ "item": "ceramic_shard", "count": [ 4, 12 ] }
],
"pre_terrain": "t_current_trans",
"post_terrain": "t_concrete",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
},
{
Expand All @@ -1108,16 +998,11 @@
"required_skills": [ [ "electronics", 4 ] ],
"time": "55 m",
"using": [ [ "advanced_electronics_high_voltage", 1 ] ],
"byproducts": [
{ "item": "scrap", "count": [ 12, 16 ] },
{ "item": "steel_chunk", "count": [ 4, 6 ] },
{ "item": "lead", "charges": [ 12, 32 ] },
{ "item": "cable", "charges": [ 20, 40 ] },
{ "item": "sheet_metal", "count": [ 2, 6 ] },
{ "item": "ceramic_shard", "count": [ 4, 12 ] }
],
"byproducts": [ ],
"pre_terrain": "t_potential_trans",
"post_terrain": "t_concrete",
"pre_special": "check_deconstruct",
"post_flags": [ "keep_items" ],
"post_special": "done_deconstruct",
"group": "advanced_object_deconstruction"
}
]
Loading

0 comments on commit c75fb01

Please sign in to comment.