Skip to content

Commit 2db2a2e

Browse files
authored
Second nail into the battery coffin (CleverRaven#75865)
* 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
1 parent bed87c5 commit 2db2a2e

File tree

67 files changed

+331
-1182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+331
-1182
lines changed

data/json/ascii_art/battery.json

Lines changed: 0 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
"id": "light_minus_battery_cell",
55
"picture": [ "<color_yellow>()" ]
66
},
7-
{
8-
"type": "ascii_art",
9-
"id": "light_minus_atomic_battery_cell",
10-
"picture": [ "<color_light_green>()" ]
11-
},
127
{
138
"type": "ascii_art",
149
"id": "light_minus_disposable_cell",
@@ -23,42 +18,6 @@
2318
"<color_light_gray>└─┘"
2419
]
2520
},
26-
{
27-
"type": "ascii_art",
28-
"id": "light_plus_battery_cell",
29-
"picture": [
30-
"<color_yellow>╓<color_light_gray>▬</color>╖",
31-
"╟<color_white>L</color>╢",
32-
"<color_light_gray>╙─╜"
33-
]
34-
},
35-
{
36-
"type": "ascii_art",
37-
"id": "light_atomic_battery_cell",
38-
"picture": [
39-
"<color_light_green>╓<color_light_gray>▬</color>╖",
40-
"╠<color_white>L</color>╣",
41-
"<color_light_gray>╙─╜"
42-
]
43-
},
44-
{
45-
"type": "ascii_art",
46-
"id": "light_disposable_cell",
47-
"picture": [
48-
"<color_yellow>╓<color_light_gray>▬</color>╖",
49-
"║<color_white>L</color>║",
50-
"<color_light_gray>╙─╜"
51-
]
52-
},
53-
{
54-
"type": "ascii_art",
55-
"id": "light_dry_cell",
56-
"picture": [
57-
"<color_light_gray>┌▬┐",
58-
"[=]",
59-
"└─┘"
60-
]
61-
},
6221
{
6322
"type": "ascii_art",
6423
"id": "medium_battery_cell",
@@ -68,42 +27,6 @@
6827
"'─────'"
6928
]
7029
},
71-
{
72-
"type": "ascii_art",
73-
"id": "medium_plus_battery_cell",
74-
"picture": [
75-
"<color_red>,<color_dark_gray>/]===__",
76-
"|<color_yellow>< M+ ></color>|",
77-
"'───────'"
78-
]
79-
},
80-
{
81-
"type": "ascii_art",
82-
"id": "medium_atomic_battery_cell",
83-
"picture": [
84-
"<color_red>,<color_dark_gray>/]===__",
85-
"|<color_light_green>< MP ></color>|",
86-
"'───────'"
87-
]
88-
},
89-
{
90-
"type": "ascii_art",
91-
"id": "medium_disposable_cell",
92-
"picture": [
93-
"<color_red>,<color_dark_gray>/]===__",
94-
"|<color_yellow>< MD ></color>|",
95-
"'───────'"
96-
]
97-
},
98-
{
99-
"type": "ascii_art",
100-
"id": "medium_dry_cell",
101-
"picture": [
102-
"<color_light_gray>┌─┐===__",
103-
"[≡≡≡≡≡≡≡]",
104-
"└───────┘"
105-
]
106-
},
10730
{
10831
"type": "ascii_art",
10932
"id": "heavy_battery_cell",
@@ -133,25 +56,5 @@
13356
"|<color_dark_gray>_|_<color_light_green>HP</color>_____,~<color_light_gray>:</color>",
13457
"└────────────┘"
13558
]
136-
},
137-
{
138-
"type": "ascii_art",
139-
"id": "heavy_disposable_cell",
140-
"picture": [
141-
" <color_yellow>_<color_dark_gray>_</color>_______",
142-
" ,'<color_dark_gray>,└───────┤</color>",
143-
"|<color_dark_gray>_|_<color_yellow>HD</color>_____,~<color_light_gray>:</color>",
144-
"└────────────┘"
145-
]
146-
},
147-
{
148-
"type": "ascii_art",
149-
"id": "heavy_dry_cell",
150-
"picture": [
151-
"<color_light_gray>____________",
152-
"[==║====║==]",
153-
"|__║____║__|~:",
154-
"└────────────┘"
155-
]
15659
}
15760
]

data/json/itemgroups/Clothing_Gear/clothing.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@
406406
"//": "Standard set of clothes worn by a military helicopter pilot.",
407407
"items": [
408408
{ "item": "chestrig", "prob": 40 },
409-
{ "item": "flight_helmet", "ammo-item": "light_plus_battery_cell", "charges": [ 0, 150 ] },
409+
{ "item": "flight_helmet", "ammo-item": "light_battery_cell", "charges": [ 0, 150 ] },
410410
{ "item": "mil_flight_suit", "prob": 80 },
411411
{ "item": "nomex_gloves" },
412412
{ "group": "loaded_webbing_belt" },
@@ -430,7 +430,7 @@
430430
"//": "todo: when #57228 would be closed, change this one to copy-from `clothing_military`",
431431
"items": [
432432
{ "item": "chestrig", "prob": 40 },
433-
{ "item": "flight_helmet", "ammo-item": "light_plus_battery_cell", "charges": [ 0, 150 ] },
433+
{ "item": "flight_helmet", "ammo-item": "light_battery_cell", "charges": [ 0, 150 ] },
434434
{ "item": "mil_flight_suit", "prob": 80 },
435435
{ "item": "nomex_gloves" },
436436
{ "group": "loaded_webbing_belt" },

data/json/itemgroups/Clothing_Gear/gear.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
"items": [
187187
{ "item": "EOD_hotstick", "prob": 50 },
188188
{ "item": "multitool", "container-item": "sheath", "prob": 30 },
189-
{ "item": "light_disposable_cell", "prob": 30, "count": [ 1, 8 ] },
189+
{ "item": "light_battery_cell", "prob": 30, "count": [ 1, 8 ] },
190190
{ "item": "light_minus_disposable_cell", "prob": 20, "count": [ 1, 6 ] },
191191
{ "item": "cordless_drill", "prob": 30 },
192192
{ "item": "rope_30", "prob": 50 },

data/json/itemgroups/SUS/domestic.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
{ "item": "flyer", "prob": 70 },
182182
{ "item": "feces_roach", "prob": 70, "count": 4 },
183183
{ "item": "lighter", "prob": 65, "charges": [ 0, 9 ] },
184-
{ "item": "light_disposable_cell", "count": [ 1, 7 ], "prob": 60, "charges": 0 },
184+
{ "item": "light_battery_cell", "count": [ 1, 7 ], "prob": 60, "charges": 0 },
185185
{ "item": "bag_plastic", "prob": 60, "count": [ 1, 5 ] },
186186
{ "item": "corkscrew", "prob": 60 },
187187
{ "item": "stapler", "prob": 45 },
@@ -332,7 +332,7 @@
332332
{ "group": "superglue", "prob": 90 },
333333
{ "item": "boxcutter", "prob": 85 },
334334
{ "item": "duct_tape", "prob": 85, "charges": [ 5, 200 ] },
335-
{ "item": "flashlight", "prob": 80, "ammo-item": "light_disposable_cell", "charges": [ 100, 300 ] },
335+
{ "item": "flashlight", "prob": 80, "ammo-item": "light_battery_cell", "charges": [ 100, 300 ] },
336336
{ "item": "toothbrush_plain", "custom-flags": [ "FILTHY" ], "prob": 80 },
337337
{ "item": "bottle_opener", "prob": 75 },
338338
{ "item": "pockknife", "prob": 75 },
@@ -360,7 +360,7 @@
360360
{ "item": "kevlar_shears", "prob": 10 },
361361
{ "item": "tin_snips", "prob": 10 },
362362
{ "item": "wristwatch", "prob": 25 },
363-
{ "item": "light_disposable_cell", "count": 4, "prob": 25, "charges": 300 },
363+
{ "item": "light_battery_cell", "count": 4, "prob": 25, "charges": 300 },
364364
{ "item": "old_key", "prob": 20, "count": [ 1, 6 ] },
365365
{ "item": "office_letter_opener", "prob": 15 },
366366
{ "item": "razor_blade", "count": [ 1, 3 ], "prob": 15 },
@@ -399,6 +399,7 @@
399399
{ "item": "duct_tape", "prob": 40, "charges": [ 100, 400 ] },
400400
{ "group": "superglue", "prob": 30 },
401401
{ "item": "light_battery_cell", "count": 4, "prob": 50, "charges": 100 },
402+
{ "group": "batteries", "prob": 50 },
402403
{ "item": "deck_of_cards", "prob": 50 },
403404
{ "item": "teleumbrella", "prob": 50 },
404405
{ "prob": 50, "group": "bottle_otc_painkiller_20" },
@@ -413,7 +414,7 @@
413414
{ "item": "gold_hairpin", "prob": 25 },
414415
{ "item": "magnifying_glass", "prob": 25 },
415416
{ "item": "bandana", "prob": 25 },
416-
{ "item": "light_disposable_cell", "count": 4, "prob": 25, "charges": 300 },
417+
{ "item": "light_battery_cell", "count": 4, "prob": 25, "charges": 300 },
417418
{ "item": "fitness_band", "prob": 15 },
418419
{ "item": "gloves_light", "prob": 10 },
419420
{ "item": "gloves_golf", "prob": 10 },

data/json/itemgroups/SUS/evac_shelter.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{ "item": "emer_blanket", "prob": 75 },
1212
{ "group": "gasmask_bag_full", "prob": 2 },
1313
{ "item": "flashlight", "prob": 50 },
14-
{ "item": "light_disposable_cell", "prob": 10 },
14+
{ "item": "light_battery_cell", "prob": 10 },
1515
{ "item": "lighter", "prob": 20, "charges": [ 60, 100 ] },
1616
{ "item": "whistle", "prob": 70 },
1717
{ "item": "water_clean", "count": [ 1, 2 ], "prob": 80 },
@@ -84,7 +84,7 @@
8484
{ "item": "extinguisher", "prob": 70, "charges": 100 },
8585
{ "group": "full_1st_aid", "count": [ 1, 3 ], "prob": 65 },
8686
{ "item": "two_way_radio", "prob": 65 },
87-
{ "item": "light_disposable_cell", "count": [ 2, 4 ], "prob": 65 },
87+
{ "item": "light_battery_cell", "count": [ 2, 4 ], "prob": 65 },
8888
{ "item": "electric_lantern", "prob": 35 },
8989
{ "item": "barometer", "prob": 8 }
9090
],
@@ -229,7 +229,7 @@
229229
{ "item": "two_way_radio", "prob": 25 },
230230
{ "item": "electric_lantern", "prob": 5 },
231231
{ "item": "flashlight", "prob": 50 },
232-
{ "item": "light_disposable_cell", "prob": 10 },
232+
{ "item": "light_battery_cell", "prob": 10 },
233233
{ "item": "jacket_evac", "prob": 75 },
234234
{ "item": "emer_blanket", "prob": 75 }
235235
]
@@ -246,7 +246,7 @@
246246
{ "item": "two_way_radio", "prob": 10 },
247247
{ "item": "electric_lantern", "prob": 2 },
248248
{ "item": "flashlight", "prob": 25 },
249-
{ "item": "light_disposable_cell", "prob": 5 },
249+
{ "item": "light_battery_cell", "prob": 5 },
250250
{ "item": "jacket_evac", "prob": 30 },
251251
{ "item": "emer_blanket", "prob": 30 }
252252
]

data/json/itemgroups/Weapons_Mods_Ammo/ammo.json

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -870,8 +870,8 @@
870870
"entries": [
871871
{ "item": "light_battery_cell", "prob": 25, "charges": [ 0, 100 ] },
872872
{ "item": "light_minus_battery_cell", "prob": 12, "charges": [ 0, 50 ] },
873-
{ "item": "light_plus_battery_cell", "prob": 9, "charges": [ 0, 150 ] },
874-
{ "item": "light_disposable_cell", "prob": 50, "charges": [ 0, 300 ] }
873+
{ "item": "light_battery_cell", "prob": 9, "charges": [ 0, 150 ] },
874+
{ "item": "light_battery_cell", "prob": 50, "charges": [ 0, 300 ] }
875875
]
876876
},
877877
{
@@ -880,38 +880,29 @@
880880
"items": [
881881
{ "item": "light_battery_cell", "prob": 25, "charges": 100 },
882882
{ "item": "light_minus_battery_cell", "prob": 12, "charges": 50 },
883-
{ "item": "light_plus_battery_cell", "prob": 9, "charges": 150 },
884-
{ "item": "light_disposable_cell", "prob": 50, "charges": 300 }
883+
{ "item": "light_battery_cell", "prob": 9, "charges": 150 },
884+
{ "item": "light_battery_cell", "prob": 50, "charges": 300 }
885885
]
886886
},
887887
{
888888
"type": "item_group",
889889
"id": "ammo_medium_batteries",
890890
"subtype": "distribution",
891-
"entries": [
892-
{ "item": "medium_battery_cell", "prob": 40, "charges": [ 0, 500 ] },
893-
{ "item": "medium_plus_battery_cell", "prob": 10, "charges": [ 0, 600 ] },
894-
{ "item": "medium_disposable_cell", "prob": 80, "charges": [ 0, 1200 ] }
895-
]
891+
"entries": [ { "item": "medium_battery_cell", "prob": 40, "charges": [ 0, 500 ] } ]
896892
},
897893
{
898894
"type": "item_group",
899895
"id": "ammo_medium_batteries_full",
900896
"subtype": "distribution",
901-
"entries": [
902-
{ "item": "medium_battery_cell", "prob": 40, "charges": 500 },
903-
{ "item": "medium_plus_battery_cell", "prob": 10, "charges": 600 },
904-
{ "item": "medium_disposable_cell", "prob": 80, "charges": 1200 }
905-
]
897+
"entries": [ { "item": "medium_battery_cell", "prob": 40, "charges": 500 } ]
906898
},
907899
{
908900
"type": "item_group",
909901
"id": "ammo_heavy_batteries",
910902
"subtype": "distribution",
911903
"entries": [
912904
{ "item": "heavy_battery_cell", "prob": 40, "charges": [ 0, 1000 ] },
913-
{ "item": "heavy_plus_battery_cell", "prob": 10, "charges": [ 0, 1250 ] },
914-
{ "item": "heavy_disposable_cell", "prob": 80, "charges": [ 0, 2500 ] }
905+
{ "item": "heavy_plus_battery_cell", "prob": 80, "charges": [ 0, -1 ] }
915906
]
916907
},
917908
{
@@ -920,8 +911,7 @@
920911
"subtype": "distribution",
921912
"entries": [
922913
{ "item": "heavy_battery_cell", "prob": 40, "charges": 1000 },
923-
{ "item": "heavy_plus_battery_cell", "prob": 10, "charges": 1250 },
924-
{ "item": "heavy_disposable_cell", "prob": 80, "charges": 2500 }
914+
{ "item": "heavy_plus_battery_cell", "prob": 80, "charges": 2500 }
925915
]
926916
},
927917
{

data/json/itemgroups/Weapons_Mods_Ammo/arsenal/mics.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{ "item": "binoculars" },
2121
{ "item": "two_way_radio", "count": 2 },
2222
{ "item": "flashlight" },
23-
{ "item": "light_disposable_cell", "count": [ 1, 3 ] },
23+
{ "item": "light_battery_cell", "count": [ 1, 3 ] },
2424
{ "item": "mask_gas" },
2525
{ "item": "gasfilter_med", "count": [ 1, 3 ] }
2626
]

data/json/itemgroups/electronics.json

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -151,23 +151,16 @@
151151
{
152152
"id": "batteries",
153153
"type": "item_group",
154-
"subtype": "collection",
154+
"subtype": "distribution",
155+
"container-item": "box_paper_small",
155156
"items": [
156-
{ "item": "light_minus_battery_cell", "prob": 30, "count": [ 2, 6 ] },
157-
{ "item": "light_minus_atomic_battery_cell", "prob": 5, "count": [ 1, 3 ] },
158-
{ "item": "light_minus_disposable_cell", "prob": 40, "count": [ 1, 3 ] },
159-
{ "item": "light_battery_cell", "prob": 30, "count": [ 1, 3 ] },
160-
{ "item": "light_plus_battery_cell", "prob": 15, "count": [ 1, 3 ] },
161-
{ "item": "light_atomic_battery_cell", "prob": 3, "count": [ 1, 3 ] },
162-
{ "item": "light_disposable_cell", "prob": 40, "count": [ 1, 3 ] },
163-
{ "item": "medium_battery_cell", "prob": 10, "count": [ 1, 3 ] },
164-
{ "item": "medium_plus_battery_cell", "prob": 5, "count": [ 1, 6 ] },
165-
{ "item": "medium_atomic_battery_cell", "prob": 3, "count": [ 1, 6 ] },
166-
{ "item": "medium_disposable_cell", "prob": 15, "count": [ 1, 3 ] },
167-
{ "item": "heavy_battery_cell", "prob": 10, "count": [ 1, 3 ] },
168-
{ "item": "heavy_plus_battery_cell", "prob": 5, "count": [ 1, 6 ] },
169-
{ "item": "heavy_atomic_battery_cell", "prob": 3, "count": [ 1, 6 ] },
170-
{ "item": "heavy_disposable_cell", "prob": 15, "count": [ 1, 3 ] }
157+
{ "item": "light_minus_battery_cell", "charges": 1000, "prob": 3, "count": [ 2, 8 ] },
158+
{ "item": "light_minus_disposable_cell", "charges": 1000, "prob": 30, "count": [ 2, 8 ] },
159+
{ "item": "light_battery_cell", "charges": 1000, "prob": 160, "count": [ 0, 8 ] },
160+
{ "item": "light_battery_cell", "charges": 1000, "prob": 16, "count": [ 0, 16 ] },
161+
{ "item": "light_cell_rechargeable", "charges": 1000, "prob": 16, "count": [ 0, 8 ] },
162+
{ "item": "light_cell_rechargeable", "charges": 1000, "prob": 1, "count": [ 0, 16 ] },
163+
{ "item": "medium_battery_cell", "charges": 1000, "prob": 15, "count": [ 0, 4 ] }
171164
]
172165
}
173166
]

data/json/itemgroups/military.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@
961961
{ "item": "survnote", "prob": 2 },
962962
{ "item": "robot_controls", "prob": 3 },
963963
{ "item": "solarpack", "prob": 1 },
964-
{ "item": "flight_helmet", "prob": 20, "ammo-item": "light_plus_battery_cell", "charges": [ 0, 150 ] },
964+
{ "item": "flight_helmet", "prob": 20, "ammo-item": "light_battery_cell", "charges": [ 0, 150 ] },
965965
{ "item": "mil_flight_suit", "prob": 20 }
966966
]
967967
},

data/json/itemgroups/misc.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@
225225
{ "item": "boots_combat" },
226226
{ "item": "socks", "count": 3 },
227227
{ "item": "gloves_tactical" },
228-
{ "item": "light_plus_battery_cell", "charges": 150 },
229-
{ "item": "light_plus_battery_cell", "charges": 150, "container-item": "flashlight" },
230-
{ "item": "light_plus_battery_cell", "charges": 150, "container-item": "radio" },
228+
{ "group": "batteries" },
229+
{ "item": "light_battery_cell", "charges": 150, "container-item": "flashlight" },
230+
{ "item": "light_battery_cell", "charges": 150, "container-item": "radio" },
231231
{ "item": "lighter", "charges": 100 },
232232
{ "item": "pockknife" },
233233
{ "item": "multitool" },
@@ -249,7 +249,7 @@
249249
{ "item": "flint_steel" },
250250
{ "item": "whistle_multitool" },
251251
{ "item": "bottle_folding" },
252-
{ "item": "light_plus_battery_cell", "charges": 150, "container-item": "flashlight" },
252+
{ "item": "light_battery_cell", "charges": 150, "container-item": "flashlight" },
253253
{ "item": "picklocks" },
254254
{ "item": "lifestraw" },
255255
{ "item": "pocket_survival" },

0 commit comments

Comments
 (0)