Skip to content

Commit

Permalink
Second nail into the battery coffin (CleverRaven#75865)
Browse files Browse the repository at this point in the history
* update batteries

* migrate all removed batteries, clean up

* sprinkle occasional batteries in boxes around the world

* fix density test fail

* fix wrong chemistry on some batteries

* obsolete medium_disposable_cell, replace current medium_battery_cell(D battery) with modern 18650 battery

* fix redefinition of 'itype_medium_battery_cell'

* remove light_disposable_cell, change the names and descriptions of baterries to match what they are

* migrate light_disposable_cell, astyle battery density test

* fix test failures

* swap battery to please ups crafting test

* swap ids for tool batteries to make more sense (and not replace all ids in the entire game)

* migrate removed vehicle parts, fix unreachable cell recipe

* fix missed afs battery
  • Loading branch information
GuardianDll authored and Knut-Aage-Hofseth committed Aug 29, 2024
1 parent 3e415e2 commit 7664153
Show file tree
Hide file tree
Showing 67 changed files with 331 additions and 1,182 deletions.
97 changes: 0 additions & 97 deletions data/json/ascii_art/battery.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
"id": "light_minus_battery_cell",
"picture": [ "<color_yellow>()" ]
},
{
"type": "ascii_art",
"id": "light_minus_atomic_battery_cell",
"picture": [ "<color_light_green>()" ]
},
{
"type": "ascii_art",
"id": "light_minus_disposable_cell",
Expand All @@ -23,42 +18,6 @@
"<color_light_gray>└─┘"
]
},
{
"type": "ascii_art",
"id": "light_plus_battery_cell",
"picture": [
"<color_yellow>╓<color_light_gray>▬</color>╖",
"╟<color_white>L</color>╢",
"<color_light_gray>╙─╜"
]
},
{
"type": "ascii_art",
"id": "light_atomic_battery_cell",
"picture": [
"<color_light_green>╓<color_light_gray>▬</color>╖",
"╠<color_white>L</color>╣",
"<color_light_gray>╙─╜"
]
},
{
"type": "ascii_art",
"id": "light_disposable_cell",
"picture": [
"<color_yellow>╓<color_light_gray>▬</color>╖",
"║<color_white>L</color>║",
"<color_light_gray>╙─╜"
]
},
{
"type": "ascii_art",
"id": "light_dry_cell",
"picture": [
"<color_light_gray>┌▬┐",
"[=]",
"└─┘"
]
},
{
"type": "ascii_art",
"id": "medium_battery_cell",
Expand All @@ -68,42 +27,6 @@
"'─────'"
]
},
{
"type": "ascii_art",
"id": "medium_plus_battery_cell",
"picture": [
"<color_red>,<color_dark_gray>/]===__",
"|<color_yellow>< M+ ></color>|",
"'───────'"
]
},
{
"type": "ascii_art",
"id": "medium_atomic_battery_cell",
"picture": [
"<color_red>,<color_dark_gray>/]===__",
"|<color_light_green>< MP ></color>|",
"'───────'"
]
},
{
"type": "ascii_art",
"id": "medium_disposable_cell",
"picture": [
"<color_red>,<color_dark_gray>/]===__",
"|<color_yellow>< MD ></color>|",
"'───────'"
]
},
{
"type": "ascii_art",
"id": "medium_dry_cell",
"picture": [
"<color_light_gray>┌─┐===__",
"[≡≡≡≡≡≡≡]",
"└───────┘"
]
},
{
"type": "ascii_art",
"id": "heavy_battery_cell",
Expand Down Expand Up @@ -133,25 +56,5 @@
"|<color_dark_gray>_|_<color_light_green>HP</color>_____,~<color_light_gray>:</color>",
"└────────────┘"
]
},
{
"type": "ascii_art",
"id": "heavy_disposable_cell",
"picture": [
" <color_yellow>_<color_dark_gray>_</color>_______",
" ,'<color_dark_gray>,└───────┤</color>",
"|<color_dark_gray>_|_<color_yellow>HD</color>_____,~<color_light_gray>:</color>",
"└────────────┘"
]
},
{
"type": "ascii_art",
"id": "heavy_dry_cell",
"picture": [
"<color_light_gray>____________",
"[==║====║==]",
"|__║____║__|~:",
"└────────────┘"
]
}
]
4 changes: 2 additions & 2 deletions data/json/itemgroups/Clothing_Gear/clothing.json
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@
"//": "Standard set of clothes worn by a military helicopter pilot.",
"items": [
{ "item": "chestrig", "prob": 40 },
{ "item": "flight_helmet", "ammo-item": "light_plus_battery_cell", "charges": [ 0, 150 ] },
{ "item": "flight_helmet", "ammo-item": "light_battery_cell", "charges": [ 0, 150 ] },
{ "item": "mil_flight_suit", "prob": 80 },
{ "item": "nomex_gloves" },
{ "group": "loaded_webbing_belt" },
Expand All @@ -430,7 +430,7 @@
"//": "todo: when #57228 would be closed, change this one to copy-from `clothing_military`",
"items": [
{ "item": "chestrig", "prob": 40 },
{ "item": "flight_helmet", "ammo-item": "light_plus_battery_cell", "charges": [ 0, 150 ] },
{ "item": "flight_helmet", "ammo-item": "light_battery_cell", "charges": [ 0, 150 ] },
{ "item": "mil_flight_suit", "prob": 80 },
{ "item": "nomex_gloves" },
{ "group": "loaded_webbing_belt" },
Expand Down
2 changes: 1 addition & 1 deletion data/json/itemgroups/Clothing_Gear/gear.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
"items": [
{ "item": "EOD_hotstick", "prob": 50 },
{ "item": "multitool", "container-item": "sheath", "prob": 30 },
{ "item": "light_disposable_cell", "prob": 30, "count": [ 1, 8 ] },
{ "item": "light_battery_cell", "prob": 30, "count": [ 1, 8 ] },
{ "item": "light_minus_disposable_cell", "prob": 20, "count": [ 1, 6 ] },
{ "item": "cordless_drill", "prob": 30 },
{ "item": "rope_30", "prob": 50 },
Expand Down
9 changes: 5 additions & 4 deletions data/json/itemgroups/SUS/domestic.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
{ "item": "flyer", "prob": 70 },
{ "item": "feces_roach", "prob": 70, "count": 4 },
{ "item": "lighter", "prob": 65, "charges": [ 0, 9 ] },
{ "item": "light_disposable_cell", "count": [ 1, 7 ], "prob": 60, "charges": 0 },
{ "item": "light_battery_cell", "count": [ 1, 7 ], "prob": 60, "charges": 0 },
{ "item": "bag_plastic", "prob": 60, "count": [ 1, 5 ] },
{ "item": "corkscrew", "prob": 60 },
{ "item": "stapler", "prob": 45 },
Expand Down Expand Up @@ -332,7 +332,7 @@
{ "group": "superglue", "prob": 90 },
{ "item": "boxcutter", "prob": 85 },
{ "item": "duct_tape", "prob": 85, "charges": [ 5, 200 ] },
{ "item": "flashlight", "prob": 80, "ammo-item": "light_disposable_cell", "charges": [ 100, 300 ] },
{ "item": "flashlight", "prob": 80, "ammo-item": "light_battery_cell", "charges": [ 100, 300 ] },
{ "item": "toothbrush_plain", "custom-flags": [ "FILTHY" ], "prob": 80 },
{ "item": "bottle_opener", "prob": 75 },
{ "item": "pockknife", "prob": 75 },
Expand Down Expand Up @@ -360,7 +360,7 @@
{ "item": "kevlar_shears", "prob": 10 },
{ "item": "tin_snips", "prob": 10 },
{ "item": "wristwatch", "prob": 25 },
{ "item": "light_disposable_cell", "count": 4, "prob": 25, "charges": 300 },
{ "item": "light_battery_cell", "count": 4, "prob": 25, "charges": 300 },
{ "item": "old_key", "prob": 20, "count": [ 1, 6 ] },
{ "item": "office_letter_opener", "prob": 15 },
{ "item": "razor_blade", "count": [ 1, 3 ], "prob": 15 },
Expand Down Expand Up @@ -399,6 +399,7 @@
{ "item": "duct_tape", "prob": 40, "charges": [ 100, 400 ] },
{ "group": "superglue", "prob": 30 },
{ "item": "light_battery_cell", "count": 4, "prob": 50, "charges": 100 },
{ "group": "batteries", "prob": 50 },
{ "item": "deck_of_cards", "prob": 50 },
{ "item": "teleumbrella", "prob": 50 },
{ "prob": 50, "group": "bottle_otc_painkiller_20" },
Expand All @@ -413,7 +414,7 @@
{ "item": "gold_hairpin", "prob": 25 },
{ "item": "magnifying_glass", "prob": 25 },
{ "item": "bandana", "prob": 25 },
{ "item": "light_disposable_cell", "count": 4, "prob": 25, "charges": 300 },
{ "item": "light_battery_cell", "count": 4, "prob": 25, "charges": 300 },
{ "item": "fitness_band", "prob": 15 },
{ "item": "gloves_light", "prob": 10 },
{ "item": "gloves_golf", "prob": 10 },
Expand Down
8 changes: 4 additions & 4 deletions data/json/itemgroups/SUS/evac_shelter.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{ "item": "emer_blanket", "prob": 75 },
{ "group": "gasmask_bag_full", "prob": 2 },
{ "item": "flashlight", "prob": 50 },
{ "item": "light_disposable_cell", "prob": 10 },
{ "item": "light_battery_cell", "prob": 10 },
{ "item": "lighter", "prob": 20, "charges": [ 60, 100 ] },
{ "item": "whistle", "prob": 70 },
{ "item": "water_clean", "count": [ 1, 2 ], "prob": 80 },
Expand Down Expand Up @@ -84,7 +84,7 @@
{ "item": "extinguisher", "prob": 70, "charges": 100 },
{ "group": "full_1st_aid", "count": [ 1, 3 ], "prob": 65 },
{ "item": "two_way_radio", "prob": 65 },
{ "item": "light_disposable_cell", "count": [ 2, 4 ], "prob": 65 },
{ "item": "light_battery_cell", "count": [ 2, 4 ], "prob": 65 },
{ "item": "electric_lantern", "prob": 35 },
{ "item": "barometer", "prob": 8 }
],
Expand Down Expand Up @@ -229,7 +229,7 @@
{ "item": "two_way_radio", "prob": 25 },
{ "item": "electric_lantern", "prob": 5 },
{ "item": "flashlight", "prob": 50 },
{ "item": "light_disposable_cell", "prob": 10 },
{ "item": "light_battery_cell", "prob": 10 },
{ "item": "jacket_evac", "prob": 75 },
{ "item": "emer_blanket", "prob": 75 }
]
Expand All @@ -246,7 +246,7 @@
{ "item": "two_way_radio", "prob": 10 },
{ "item": "electric_lantern", "prob": 2 },
{ "item": "flashlight", "prob": 25 },
{ "item": "light_disposable_cell", "prob": 5 },
{ "item": "light_battery_cell", "prob": 5 },
{ "item": "jacket_evac", "prob": 30 },
{ "item": "emer_blanket", "prob": 30 }
]
Expand Down
26 changes: 8 additions & 18 deletions data/json/itemgroups/Weapons_Mods_Ammo/ammo.json
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,8 @@
"entries": [
{ "item": "light_battery_cell", "prob": 25, "charges": [ 0, 100 ] },
{ "item": "light_minus_battery_cell", "prob": 12, "charges": [ 0, 50 ] },
{ "item": "light_plus_battery_cell", "prob": 9, "charges": [ 0, 150 ] },
{ "item": "light_disposable_cell", "prob": 50, "charges": [ 0, 300 ] }
{ "item": "light_battery_cell", "prob": 9, "charges": [ 0, 150 ] },
{ "item": "light_battery_cell", "prob": 50, "charges": [ 0, 300 ] }
]
},
{
Expand All @@ -880,38 +880,29 @@
"items": [
{ "item": "light_battery_cell", "prob": 25, "charges": 100 },
{ "item": "light_minus_battery_cell", "prob": 12, "charges": 50 },
{ "item": "light_plus_battery_cell", "prob": 9, "charges": 150 },
{ "item": "light_disposable_cell", "prob": 50, "charges": 300 }
{ "item": "light_battery_cell", "prob": 9, "charges": 150 },
{ "item": "light_battery_cell", "prob": 50, "charges": 300 }
]
},
{
"type": "item_group",
"id": "ammo_medium_batteries",
"subtype": "distribution",
"entries": [
{ "item": "medium_battery_cell", "prob": 40, "charges": [ 0, 500 ] },
{ "item": "medium_plus_battery_cell", "prob": 10, "charges": [ 0, 600 ] },
{ "item": "medium_disposable_cell", "prob": 80, "charges": [ 0, 1200 ] }
]
"entries": [ { "item": "medium_battery_cell", "prob": 40, "charges": [ 0, 500 ] } ]
},
{
"type": "item_group",
"id": "ammo_medium_batteries_full",
"subtype": "distribution",
"entries": [
{ "item": "medium_battery_cell", "prob": 40, "charges": 500 },
{ "item": "medium_plus_battery_cell", "prob": 10, "charges": 600 },
{ "item": "medium_disposable_cell", "prob": 80, "charges": 1200 }
]
"entries": [ { "item": "medium_battery_cell", "prob": 40, "charges": 500 } ]
},
{
"type": "item_group",
"id": "ammo_heavy_batteries",
"subtype": "distribution",
"entries": [
{ "item": "heavy_battery_cell", "prob": 40, "charges": [ 0, 1000 ] },
{ "item": "heavy_plus_battery_cell", "prob": 10, "charges": [ 0, 1250 ] },
{ "item": "heavy_disposable_cell", "prob": 80, "charges": [ 0, 2500 ] }
{ "item": "heavy_plus_battery_cell", "prob": 80, "charges": [ 0, -1 ] }
]
},
{
Expand All @@ -920,8 +911,7 @@
"subtype": "distribution",
"entries": [
{ "item": "heavy_battery_cell", "prob": 40, "charges": 1000 },
{ "item": "heavy_plus_battery_cell", "prob": 10, "charges": 1250 },
{ "item": "heavy_disposable_cell", "prob": 80, "charges": 2500 }
{ "item": "heavy_plus_battery_cell", "prob": 80, "charges": 2500 }
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion data/json/itemgroups/Weapons_Mods_Ammo/arsenal/mics.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{ "item": "binoculars" },
{ "item": "two_way_radio", "count": 2 },
{ "item": "flashlight" },
{ "item": "light_disposable_cell", "count": [ 1, 3 ] },
{ "item": "light_battery_cell", "count": [ 1, 3 ] },
{ "item": "mask_gas" },
{ "item": "gasfilter_med", "count": [ 1, 3 ] }
]
Expand Down
25 changes: 9 additions & 16 deletions data/json/itemgroups/electronics.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,23 +151,16 @@
{
"id": "batteries",
"type": "item_group",
"subtype": "collection",
"subtype": "distribution",
"container-item": "box_paper_small",
"items": [
{ "item": "light_minus_battery_cell", "prob": 30, "count": [ 2, 6 ] },
{ "item": "light_minus_atomic_battery_cell", "prob": 5, "count": [ 1, 3 ] },
{ "item": "light_minus_disposable_cell", "prob": 40, "count": [ 1, 3 ] },
{ "item": "light_battery_cell", "prob": 30, "count": [ 1, 3 ] },
{ "item": "light_plus_battery_cell", "prob": 15, "count": [ 1, 3 ] },
{ "item": "light_atomic_battery_cell", "prob": 3, "count": [ 1, 3 ] },
{ "item": "light_disposable_cell", "prob": 40, "count": [ 1, 3 ] },
{ "item": "medium_battery_cell", "prob": 10, "count": [ 1, 3 ] },
{ "item": "medium_plus_battery_cell", "prob": 5, "count": [ 1, 6 ] },
{ "item": "medium_atomic_battery_cell", "prob": 3, "count": [ 1, 6 ] },
{ "item": "medium_disposable_cell", "prob": 15, "count": [ 1, 3 ] },
{ "item": "heavy_battery_cell", "prob": 10, "count": [ 1, 3 ] },
{ "item": "heavy_plus_battery_cell", "prob": 5, "count": [ 1, 6 ] },
{ "item": "heavy_atomic_battery_cell", "prob": 3, "count": [ 1, 6 ] },
{ "item": "heavy_disposable_cell", "prob": 15, "count": [ 1, 3 ] }
{ "item": "light_minus_battery_cell", "charges": 1000, "prob": 3, "count": [ 2, 8 ] },
{ "item": "light_minus_disposable_cell", "charges": 1000, "prob": 30, "count": [ 2, 8 ] },
{ "item": "light_battery_cell", "charges": 1000, "prob": 160, "count": [ 0, 8 ] },
{ "item": "light_battery_cell", "charges": 1000, "prob": 16, "count": [ 0, 16 ] },
{ "item": "light_cell_rechargeable", "charges": 1000, "prob": 16, "count": [ 0, 8 ] },
{ "item": "light_cell_rechargeable", "charges": 1000, "prob": 1, "count": [ 0, 16 ] },
{ "item": "medium_battery_cell", "charges": 1000, "prob": 15, "count": [ 0, 4 ] }
]
}
]
2 changes: 1 addition & 1 deletion data/json/itemgroups/military.json
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@
{ "item": "survnote", "prob": 2 },
{ "item": "robot_controls", "prob": 3 },
{ "item": "solarpack", "prob": 1 },
{ "item": "flight_helmet", "prob": 20, "ammo-item": "light_plus_battery_cell", "charges": [ 0, 150 ] },
{ "item": "flight_helmet", "prob": 20, "ammo-item": "light_battery_cell", "charges": [ 0, 150 ] },
{ "item": "mil_flight_suit", "prob": 20 }
]
},
Expand Down
8 changes: 4 additions & 4 deletions data/json/itemgroups/misc.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@
{ "item": "boots_combat" },
{ "item": "socks", "count": 3 },
{ "item": "gloves_tactical" },
{ "item": "light_plus_battery_cell", "charges": 150 },
{ "item": "light_plus_battery_cell", "charges": 150, "container-item": "flashlight" },
{ "item": "light_plus_battery_cell", "charges": 150, "container-item": "radio" },
{ "group": "batteries" },
{ "item": "light_battery_cell", "charges": 150, "container-item": "flashlight" },
{ "item": "light_battery_cell", "charges": 150, "container-item": "radio" },
{ "item": "lighter", "charges": 100 },
{ "item": "pockknife" },
{ "item": "multitool" },
Expand All @@ -249,7 +249,7 @@
{ "item": "flint_steel" },
{ "item": "whistle_multitool" },
{ "item": "bottle_folding" },
{ "item": "light_plus_battery_cell", "charges": 150, "container-item": "flashlight" },
{ "item": "light_battery_cell", "charges": 150, "container-item": "flashlight" },
{ "item": "picklocks" },
{ "item": "lifestraw" },
{ "item": "pocket_survival" },
Expand Down
1 change: 1 addition & 0 deletions data/json/itemgroups/supplies.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
[ "antenna", 40 ],
[ "nuts_bolts", 15 ],
{ "group": "ammo_any_batteries_full", "prob": 100 },
{ "group": "batteries", "prob": 60 },
[ "cable", 60 ],
[ "power_supply", 20 ],
[ "processor", 20 ],
Expand Down
2 changes: 1 addition & 1 deletion data/json/itemgroups/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@
{ "item": "camera_pro", "prob": 1, "charges": [ 0, 150 ] },
{ "item": "camera_pro", "container-item": "camera_bag", "prob": 1, "charges": [ 0, 150 ] },
[ "element", 5 ],
[ "light_battery_cell", 10 ],
{ "group": "batteries" },
[ "goggles_welding", 20 ],
{ "item": "sm_extinguisher", "prob": 10, "charges": 10 },
{ "group": "tools_toolbox", "prob": 5 },
Expand Down
Loading

0 comments on commit 7664153

Please sign in to comment.