Skip to content

Commit

Permalink
obsolete old generators (#78970)
Browse files Browse the repository at this point in the history
* obsolete old generators

* migrate active_backup_generator

* Update data/json/items/appliances/appliances_generators.json

Co-authored-by: Karol1223 <[email protected]>

---------

Co-authored-by: Karol1223 <[email protected]>
  • Loading branch information
GuardianDll and Karol1223 authored Jan 11, 2025
1 parent fb138e8 commit 70c21d3
Show file tree
Hide file tree
Showing 31 changed files with 127 additions and 271 deletions.
13 changes: 0 additions & 13 deletions data/json/construction/appliances.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,6 @@
"post_special": "done_appliance",
"activity_level": "MODERATE_EXERCISE"
},
{
"type": "construction",
"id": "app_active_backup_generator",
"group": "place_active_backup_generator",
"category": "APPLIANCE",
"required_skills": [ [ "mechanics", 1 ] ],
"time": "5 m",
"qualities": [ [ { "id": "WRENCH", "level": 1 } ] ],
"components": [ [ [ "active_backup_generator", 1 ] ] ],
"pre_special": "check_empty",
"post_special": "done_appliance",
"activity_level": "LIGHT_EXERCISE"
},
{
"type": "construction",
"id": "app_air_compressor",
Expand Down
5 changes: 0 additions & 5 deletions data/json/construction_group.json
Original file line number Diff line number Diff line change
Expand Up @@ -1845,11 +1845,6 @@
"id": "place_asrg_containment",
"name": "Place ASRG"
},
{
"type": "construction_group",
"id": "place_active_backup_generator",
"name": "Place backup generator"
},
{
"type": "construction_group",
"id": "build_rope_hoist",
Expand Down
40 changes: 9 additions & 31 deletions data/json/furniture_and_terrain/appliances_generators.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
[
{
"type": "vehicle_part",
"id": "ap_active_backup_generator",
"name": { "str": "active backup generator" },
"id": "ap_portable_generator",
"name": { "str": "portable gasoline generator" },
"looks_like": "f_active_backup_generator",
"categories": [ "energy" ],
"color": "green_white",
"broken_color": "blue",
"location": "structure",
"damage_modifier": 80,
"durability": 400,
"description": "A ubiquitous piece of compact machinery meant for running anything from the bathroom lights to electric stoves and other necessities when grid electricity is unavailable.",
"description": "A small, portable generator, one that people buy for a camp. It just needs to be fueled up, and then turned on.",
"//1": "BIZARRE FIELD NAMES HERE! Weird stuff happening! Epower determines how fast it is converted, power determines the ratio of diesel(mL) to battery charges output. In other words, *power* is *fuel efficiency*.",
"//2": "On a normal vehicle 250mL of diesel in an I4 with a truck alternator (what the active backup gen uses) should provide ~1692 charges (kW?) of power in about 24 minutes based on a test setup. That's a little less than 7W power, rounded up as I assume a larger dedicated generator is more efficient.",
"power": "7 W",
"//3": "7.5 kW alternator value, minus power consumption of the engine",
"epower": "7300 W",
"//4": "This value doesn't seem to do anything for the appliance version? Let's keep it commented out for future reference.",
"//energy_consumption": "1000 W",
"epower": "3000 W",
"m2c": 5,
"//5": "Actually accepts any diesel-type fuel but does NOT account for their relative fuel values! For diesel this is not a huge deal, only a few % inaccuracy, but for e.g. gas turbines this would be very bad!",
"fuel_type": "diesel",
"//6": "Appliance engine does NOT accept having these fields.",
"//fuel_options": [ "diesel", "biodiesel", "lamp_oil", "motor_oil", "jp8" ],
"//damaged_power_factor": 0.25,
"item": "active_backup_generator",
"fuel_type": "gasoline",
"item": "portable_generator",
"requirements": {
"repair": {
"skills": [ [ "mechanics", 4 ] ],
Expand All @@ -33,28 +25,14 @@
}
},
"flags": [ "ENGINE", "E_DIESEL_FUEL", "OBSTACLE", "COVERED", "APPLIANCE", "REACTOR", "FLUIDTANK" ],
"breaks_into": [ { "item": "scrap", "count": [ 4, 16 ] }, { "item": "steel_chunk", "count": [ 1, 6 ] } ],
"damage_reduction": { "all": 60 },
"variants": [ { "symbols": "0", "symbols_broken": "#" } ]
},
{
"type": "vehicle_part",
"id": "ap_portable_generator",
"copy-from": "ap_active_backup_generator",
"name": { "str": "portable gasoline generator" },
"description": "A small, portable generator, one that people buy for a camp. It just needs to be fueled up, and then turned on.",
"power": "8 W",
"epower": "3000 W",
"fuel_type": "gasoline",
"item": "portable_generator",
"breaks_into": [ { "item": "portable_generator", "damage": 4 } ],
"damage_reduction": { "all": 60 },
"variants": [ { "symbols": "0", "symbols_broken": "#" } ]
},
{
"type": "vehicle_part",
"id": "ap_diesel_generator",
"copy-from": "ap_active_backup_generator",
"copy-from": "ap_portable_generator",
"name": { "str": "diesel generator" },
"description": "Big and powerful generator, used for street works. It just needs to be plugged in, fueled up, and then turned on.",
"power": "8 W",
Expand All @@ -67,7 +45,7 @@
{
"type": "vehicle_part",
"id": "ap_military_generator",
"copy-from": "ap_active_backup_generator",
"copy-from": "ap_portable_generator",
"name": { "str": "military diesel generator" },
"description": "Big and powerful generator, painted in camo. It just needs to be plugged in, fueled up, and then turned on.",
"power": "8 W",
Expand All @@ -80,7 +58,7 @@
{
"type": "vehicle_part",
"id": "ap_12000_gasoline_generator",
"copy-from": "ap_active_backup_generator",
"copy-from": "ap_portable_generator",
"name": { "str": "powerful gasoline generator" },
"description": "Still reasonably portable, this 12000 W gasoline generator can power up an entire house. It just needs to be plugged in, fueled up, and then turned on.",
"power": "8 W",
Expand Down
2 changes: 1 addition & 1 deletion data/json/itemgroups/Locations_MapExtras/airdrop.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"//": "This is a small diesel generator, outputting ~1.3kW. It is not military spec, but it is the only generator we have. Should be replaced with milspec 5kW generator item in the future",
"//2": "yes, they should be 50-75% full, according to FM 10-535.",
"entries": [
{ "item": "jp8", "charges": [ 10000, 15000 ], "container-item": "active_backup_generator" },
{ "item": "jp8", "charges": [ 10000, 15000 ], "container-item": "diesel_generator" },
{ "item": "standing_directed_floodlight" },
{ "item": "jp8", "charges": [ 19000, 20000 ], "container-item": "jerrycan_big", "count": 5 },
{ "item": "cardboard", "count": [ 1200, 1700 ] }
Expand Down
1 change: 0 additions & 1 deletion data/json/itemgroups/military.json
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,6 @@
[ "alternator_car", 6 ],
[ "alternator_truck", 6 ],
[ "hd_tow_cable", 1 ],
[ "generator_7500w", 3 ],
[ "storage_battery", 6 ],
[ "motor_oil", 100 ],
[ "solar_panel", 3 ],
Expand Down
1 change: 0 additions & 1 deletion data/json/itemgroups/supplies.json
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,6 @@
[ "alternator_truck", 6 ],
[ "alternator_bicycle", 4 ],
[ "hd_tow_cable", 1 ],
[ "generator_7500w", 3 ],
[ "storage_battery", 6 ],
[ "motor_oil", 100 ],
[ "solar_panel", 3 ],
Expand Down
47 changes: 10 additions & 37 deletions data/json/items/appliances/appliances_generators.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,8 @@
{
"type": "GENERIC",
"category": "other",
"id": "active_backup_generator",
"name": { "str_sp": "makeshift generator" },
"looks_like": "f_active_backup_generator",
"description": "A ubiquitous piece of compact machinery meant for running anything from the bathroom lights to electric stoves and other necessities when grid electricity is unavailable. It just needs to be plugged in, fueled up, and then turned on.",
"weight": "200 kg",
"to_hit": { "grip": "bad", "length": "long", "surface": "any", "balance": "clumsy" },
"material": [ "steel" ],
"volume": "200 L",
"longest_side": "80 cm",
"price": "350 USD",
"price_postapoc": "25 USD",
"//1": "Steel jerrycan (jerrycan_big) values. Must have this pocket, otherwise will not have any fuel capacity as an appliance.",
"pocket_data": [
{
"pocket_type": "CONTAINER",
"rigid": true,
"watertight": true,
"max_contains_volume": "20 L",
"max_item_volume": "32 ml",
"max_contains_weight": "25 kg",
"item_restriction": [ "diesel", "biodiesel", "jp8", "lamp_oil", "motor_oil" ]
}
],
"symbol": "O",
"color": "green_white",
"//2": "Prevent loading items into the generator while it's not in appliance form.",
"flags": [ "NO_RELOAD" ],
"melee_damage": { "bash": 5 }
},
{
"type": "GENERIC",
"id": "portable_generator",
"//": "https://www.amazon.com/dp/B0D6PM5XN1",
"copy-from": "active_backup_generator",
"name": { "str_sp": "portable gasoline generator" },
"looks_like": "f_active_backup_generator",
"description": "Small, portable generator, one that people buy for a camp. It just needs to be plugged in, fueled up, and then turned on.",
Expand All @@ -45,7 +13,7 @@
"material": [ "steel" ],
"volume": "67609 ml",
"longest_side": "454 mm",
"//2": "17.9'' x 11.7'' x 19.7''",
"//1": "17.9'' x 11.7'' x 19.7''",
"price": "599 USD",
"price_postapoc": "25 USD",
"pocket_data": [
Expand All @@ -58,12 +26,17 @@
"max_contains_weight": "25 kg",
"item_restriction": [ "gasoline" ]
}
]
],
"symbol": "O",
"color": "green_white",
"//2": "Prevent loading items into the generator while it's not in appliance form.",
"flags": [ "NO_RELOAD" ],
"melee_damage": { "bash": 5 }
},
{
"type": "GENERIC",
"id": "diesel_generator",
"copy-from": "active_backup_generator",
"copy-from": "portable_generator",
"name": { "str_sp": "diesel generator" },
"//": "'Könner & Söhnen' KS 9300DE-1/3 ATSR",
"looks_like": "f_active_backup_generator",
Expand Down Expand Up @@ -92,7 +65,7 @@
{
"type": "GENERIC",
"id": "military_generator",
"copy-from": "active_backup_generator",
"copy-from": "portable_generator",
"name": { "str_sp": "military diesel generator" },
"//": "MEP803A",
"looks_like": "f_active_backup_generator",
Expand Down Expand Up @@ -121,7 +94,7 @@
{
"type": "GENERIC",
"id": "12000_gasoline_generator",
"copy-from": "active_backup_generator",
"copy-from": "portable_generator",
"name": { "str_sp": "powerful gasoline generator" },
"//": "Champion 201160",
"looks_like": "f_active_backup_generator",
Expand Down
11 changes: 0 additions & 11 deletions data/json/items/vehicle/alternator.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,5 @@
"volume": "3 L",
"price": "120 USD",
"price_postapoc": "10 USD"
},
{
"id": "generator_7500w",
"copy-from": "vehicle_alternator",
"type": "GENERIC",
"name": { "str": "7.5 kW generator" },
"description": "A bulky but efficient electrical generator designed to be attached to an engine.",
"weight": "48000 g",
"volume": "7500 ml",
"price": "300 USD",
"price_postapoc": "45 USD"
}
]
4 changes: 2 additions & 2 deletions data/json/mapgen/cave.json
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@
"C": "f_crate_o",
"W": "f_crate_c",
"T": "f_tourist_table",
"G": "f_active_backup_generator",
"7": "f_console_broken"
},
"traps": {
Expand All @@ -665,8 +666,7 @@
"D": { "item": "fuel_gasoline", "chance": 80 },
"w": { "item": "stash_wood", "repeat": [ 1, 3 ] },
"W": { "item": "gear_survival", "chance": 80, "repeat": [ 1, 2 ] }
},
"vehicles": { "G": { "vehicle": "portable_generator", "chance": 100, "fuel": 40, "status": 1, "rotation": 180 } }
}
}
},
{
Expand Down
25 changes: 20 additions & 5 deletions data/json/mapgen/construction_site.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
" "
],
"palettes": [ "construction_site_palette" ],
"place_loot": [ { "item": "con_mix_foldable", "x": [ 0, 8 ], "y": [ 5, 7 ] } ],
"place_loot": [
{ "item": "con_mix_foldable", "x": [ 0, 8 ], "y": [ 5, 7 ] },
{ "item": "diesel_generator", "x": [ 0, 8 ], "y": [ 5, 7 ], "chance": 70 }
],
"place_vehicles": [ { "vehicle": "small_utility_vehicles", "x": 12, "y": 4, "chance": 70, "rotation": 180 } ]
}
},
Expand Down Expand Up @@ -71,7 +74,10 @@
" "
],
"palettes": [ "construction_site_palette" ],
"place_loot": [ { "item": "con_mix_foldable", "x": [ 5, 9 ], "y": [ 4, 7 ] } ],
"place_loot": [
{ "item": "con_mix_foldable", "x": [ 5, 9 ], "y": [ 4, 7 ] },
{ "item": "diesel_generator", "x": [ 5, 9 ], "y": [ 4, 7 ], "chance": 70 }
],
"place_vehicles": [ { "vehicle": "small_utility_vehicles", "x": 12, "y": 4, "chance": 70, "rotation": 0 } ]
}
},
Expand Down Expand Up @@ -109,7 +115,10 @@
" c ss "
],
"palettes": [ "construction_site_palette" ],
"place_loot": [ { "item": "con_mix_foldable", "x": [ 0, 4 ], "y": [ 17, 19 ] } ],
"place_loot": [
{ "item": "con_mix_foldable", "x": [ 0, 4 ], "y": [ 17, 19 ] },
{ "item": "diesel_generator", "x": [ 0, 4 ], "y": [ 17, 19 ], "chance": 66 }
],
"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 +159,10 @@
" -- -- -- -- -- "
],
"palettes": [ "construction_site_palette" ],
"place_loot": [ { "item": "con_mix_foldable", "x": [ 0, 17 ], "y": 1 } ],
"place_loot": [
{ "item": "con_mix_foldable", "x": [ 0, 17 ], "y": 1 },
{ "item": "diesel_generator", "x": [ 0, 17 ], "y": 1, "chance": 70 }
],
"place_vehicles": [ { "vehicle": "small_utility_vehicles", "x": 20, "y": [ 6, 11 ], "chance": 70, "rotation": 270 } ]
}
},
Expand Down Expand Up @@ -188,7 +200,10 @@
" c c "
],
"palettes": [ "construction_site_palette" ],
"place_loot": [ { "item": "con_mix_foldable", "x": [ 5, 11 ], "y": [ 20, 23 ] } ],
"place_loot": [
{ "item": "con_mix_foldable", "x": [ 5, 11 ], "y": [ 20, 23 ] },
{ "item": "diesel_generator", "x": [ 5, 11 ], "y": [ 20, 23 ], "chance": 70 }
],
"place_vehicles": [ { "vehicle": "small_utility_vehicles", "x": 15, "y": 21, "chance": 70, "rotation": 180 } ]
}
}
Expand Down
4 changes: 2 additions & 2 deletions data/json/mapgen/cs_open_sewer_small.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
".": "f_large_groundsheet",
"L": "f_locker"
},
"place_furniture": [ { "furn": "f_diesel_generator", "x": [ 18, 20 ], "y": 14 } ],
"items": {
"n": { "item": "os_items", "chance": 33 },
"L": { "item": "os_items", "chance": 80, "repeat": [ 2, 5 ] },
Expand All @@ -106,8 +107,7 @@
"place_vehicles": [
{ "vehicle": "wheelbarrow", "chance": 90, "x": [ 8, 22 ], "y": [ 16, 22 ] },
{ "vehicle": "oa_work_light", "chance": 33, "x": [ 4, 6 ], "y": [ 2, 6 ] },
{ "vehicle": "oa_work_light", "chance": 33, "x": [ 17, 19 ], "y": [ 2, 6 ] },
{ "vehicle": "portable_generator", "chance": 50, "x": [ 18, 20 ], "y": 14 }
{ "vehicle": "oa_work_light", "chance": 33, "x": [ 17, 19 ], "y": [ 2, 6 ] }
],
"place_monster": [ { "group": "GROUP_ZOMBIE_SEWER", "x": [ 0, 23 ], "y": [ 0, 23 ], "repeat": [ 2, 5 ] } ],
"place_signs": [
Expand Down
4 changes: 2 additions & 2 deletions data/json/mapgen/farm_dairy_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
"M": "f_bathtub",
"O": "f_locker",
"x": "f_utility_shelf",
"J": "f_active_backup_generator",
"y": "f_air_conditioner"
},
"item": {
Expand Down Expand Up @@ -193,8 +194,7 @@
"z": { "field": "fd_blood", "intensity": 1, "age": 10 },
"M": { "field": "fd_blood", "intensity": 1, "age": 10 },
"q": { "field": "fd_blood", "intensity": 1, "age": 10 }
},
"vehicles": { "J": { "vehicle": "portable_generator", "rotation": 90, "chance": 100, "fuel": 40, "status": 1 } }
}
}
},
{
Expand Down
Loading

0 comments on commit 70c21d3

Please sign in to comment.