Skip to content

Commit

Permalink
Merge pull request #30412 from Inglonias/battery_additions_and_fixes
Browse files Browse the repository at this point in the history
Disposable batteries, magazine wells, and other battery fixes!
  • Loading branch information
Rivet-the-Zombie authored May 20, 2019
2 parents 5372d73 + a398013 commit ba376ea
Show file tree
Hide file tree
Showing 11 changed files with 687 additions and 192 deletions.
18 changes: 12 additions & 6 deletions data/json/itemgroups/ammo.json
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@
"items": [
{ "item": "light_battery_cell", "prob": 50, "charges-min": 0, "charges-max": 100 },
{ "item": "light_minus_battery_cell", "prob": 30, "charges-min": 0, "charges-max": 50 },
{ "item": "light_plus_battery_cell", "prob": 20, "charges-min": 0, "charges-max": 150 }
{ "item": "light_plus_battery_cell", "prob": 20, "charges-min": 0, "charges-max": 150 },
{ "item": "light_disposable_cell", "prob": 25, "charges-min": 0, "charges-max": 300 }
]
},
{
Expand All @@ -399,39 +400,44 @@
"items": [
{ "item": "light_battery_cell", "prob": 50, "charges-min": 100, "charges-max": 100 },
{ "item": "light_minus_battery_cell", "prob": 30, "charges-min": 50, "charges-max": 50 },
{ "item": "light_plus_battery_cell", "prob": 20, "charges-min": 150, "charges-max": 150 }
{ "item": "light_plus_battery_cell", "prob": 20, "charges-min": 150, "charges-max": 150 },
{ "item": "light_disposable_cell", "prob": 25, "charges-min": 300, "charges-max": 300 }
]
},
{
"type": "item_group",
"id": "ammo_medium_batteries",
"items": [
{ "item": "medium_battery_cell", "prob": 80, "charges-min": 0, "charges-max": 500 },
{ "item": "medium_plus_battery_cell", "prob": 20, "charges-min": 0, "charges-max": 600 }
{ "item": "medium_plus_battery_cell", "prob": 20, "charges-min": 0, "charges-max": 600 },
{ "item": "medium_disposable_cell", "prob": 40, "charges-min": 0, "charges-max": 1200 }
]
},
{
"type": "item_group",
"id": "ammo_medium_batteries_full",
"items": [
{ "item": "medium_battery_cell", "prob": 80, "charges-min": 500, "charges-max": 500 },
{ "item": "medium_plus_battery_cell", "prob": 20, "charges-min": 600, "charges-max": 600 }
{ "item": "medium_plus_battery_cell", "prob": 20, "charges-min": 600, "charges-max": 600 },
{ "item": "medium_disposable_cell", "prob": 40, "charges-min": 1200, "charges-max": 1200 }
]
},
{
"type": "item_group",
"id": "ammo_heavy_batteries",
"items": [
{ "item": "heavy_battery_cell", "prob": 80, "charges-min": 0, "charges-max": 1000 },
{ "item": "heavy_plus_battery_cell", "prob": 20, "charges-min": 0, "charges-max": 1250 }
{ "item": "heavy_plus_battery_cell", "prob": 20, "charges-min": 0, "charges-max": 1250 },
{ "item": "heavy_disposable_cell", "prob": 40, "charges-min": 0, "charges-max": 2500 }
]
},
{
"type": "item_group",
"id": "ammo_heavy_batteries_full",
"items": [
{ "item": "heavy_battery_cell", "prob": 80, "charges-min": 1000, "charges-max": 1000 },
{ "item": "heavy_plus_battery_cell", "prob": 20, "charges-min": 1250, "charges-max": 1250 }
{ "item": "heavy_plus_battery_cell", "prob": 20, "charges-min": 1250, "charges-max": 1250 },
{ "item": "heavy_disposable_cell", "prob": 40, "charges-min": 2500, "charges-max": 2500 }
]
},
{
Expand Down
116 changes: 100 additions & 16 deletions data/json/items/ammo.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@
"flags": "TRADER_AVOID",
"material": "iron",
"volume": 1,
"weight": 1,
"//": "Setting battery volume to 0 causes weirdness in vehicle tests. Please don't do that.",
"ammo_type": "battery",
"reload_time": 1,
"count": 100,
"//": "1 battery is 1 kJ of energy. 40 batteries is an alkaline C-cell.",
"//2": "1 battery is 1 kJ of energy. 40 batteries is an alkaline C-cell.",
"fuel": { "energy": 1 }
},
{
"id": "light_minus_battery_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "ultra-light battery cell",
"name": "ultra-light battery",
"name_plural": "ultra-light batteries",
"description": "This is a light battery cell designed for small size over everything else. It retains its universal compatibility, though.",
"weight": 5,
"volume": 0,
Expand All @@ -40,7 +41,8 @@
"id": "light_minus_atomic_battery_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "atomic ultra-light battery cell",
"name": "atomic ultra-light battery",
"name_plural": "atomic ultra-light batteries",
"description": "This is an atomic battery designed for small size over everything else. It retains its universal compatibility, though. It cannot be recharged.",
"weight": 80,
"volume": 0,
Expand All @@ -54,11 +56,31 @@
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "LEAK_DAM", "RADIOACTIVE" ]
},
{
"id": "light_minus_disposable_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "ultra-light disposable battery",
"name_plural": "ultra-light disposable batteries",
"description": "This is a light battery cell designed for small size over everything else. It retains its universal compatibility, though. The battery's chemistry means that it has a very high capacity, but cannot be recharged.",
"weight": 5,
"volume": 0,
"price": 3000,
"material": [ "iron" ],
"symbol": "=",
"color": "yellow",
"ammo_type": "battery",
"count": 100,
"capacity": 100,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD" ]
},
{
"id": "light_battery_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "light battery cell",
"name": "light battery",
"name_plural": "light batteries",
"description": "This is a light battery cell, universally compatible with all kinds of small devices.",
"weight": 50,
"volume": "75ml",
Expand All @@ -75,8 +97,8 @@
"id": "light_plus_battery_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "light battery cell (high-capacity)",
"name_plural": "light battery cells (high-capacity)",
"name": "light battery (high-capacity)",
"name_plural": "light batteries (high-capacity)",
"description": "This is a high-capacity light battery cell, universally compatible with all kinds of small devices.",
"weight": 75,
"volume": "115ml",
Expand All @@ -93,7 +115,8 @@
"id": "light_atomic_battery_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "atomic light battery cell",
"name": "atomic light battery",
"name_plural": "atomic light batteries",
"description": "This is an atomic battery, universally compatible with all kinds of personal electronic devices. It cannot be recharged.",
"weight": 160,
"volume": "115ml",
Expand All @@ -107,11 +130,31 @@
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "LEAK_DAM", "RADIOACTIVE" ]
},
{
"id": "light_disposable_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "light disposable battery",
"name_plural": "light disposable batteries",
"description": "This is a light battery cell, universally compatible with all kinds of small devices. The battery's chemistry means that it has a very high capacity, but cannot be recharged.",
"weight": 75,
"volume": "115ml",
"price": 10000,
"material": [ "iron" ],
"symbol": "=",
"color": "yellow",
"ammo_type": "battery",
"count": 300,
"capacity": 300,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD" ]
},
{
"id": "medium_battery_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "medium battery cell",
"name": "medium battery",
"name_plural": "medium batteries",
"description": "This is a medium battery cell, universally compatible with all kinds of appliances and power tools.",
"weight": 250,
"volume": "375ml",
Expand All @@ -128,8 +171,8 @@
"id": "medium_plus_battery_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "medium battery cell (high-capacity)",
"name_plural": "medium battery cells (high-capacity)",
"name": "medium battery (high-capacity)",
"name_plural": "medium batteries (high-capacity)",
"description": "This is a high-capacity medium battery cell, universally compatible with all kinds of appliances and power tools.",
"weight": 350,
"volume": "450ml",
Expand All @@ -146,7 +189,8 @@
"id": "medium_atomic_battery_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "atomic medium battery cell",
"name": "atomic medium battery",
"name_plural": "atomic medium batteries",
"description": "This is an atomic battery, universally compatible with all kinds of appliances and power tools. It cannot be recharged.",
"weight": 800,
"volume": "375ml",
Expand All @@ -160,11 +204,31 @@
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "LEAK_DAM", "RADIOACTIVE" ]
},
{
"id": "medium_disposable_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "medium disposable battery",
"name_plural": "medium disposable batteries",
"description": "This is a medium battery cell, universally compatible with all kinds of appliances and power tools. The battery's chemistry means that it has a very high capacity, but cannot be recharged.",
"weight": 350,
"volume": "450ml",
"price": 10000,
"material": [ "iron" ],
"symbol": "=",
"color": "yellow",
"ammo_type": "battery",
"count": 1200,
"capacity": 1200,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD" ]
},
{
"id": "heavy_battery_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "heavy battery cell",
"name": "heavy battery",
"name_plural": "heavy batteries",
"description": "This is a heavy battery cell, universally compatible with all kinds of industrial-grade equipment and large tools.",
"weight": 500,
"volume": "750ml",
Expand All @@ -181,8 +245,8 @@
"id": "heavy_plus_battery_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "heavy battery cell (high-capacity)",
"name_plural": "heavy battery cells (high-capacity)",
"name": "heavy battery (high-capacity)",
"name_plural": "heavy batteries (high-capacity)",
"description": "This is a high-capacity heavy battery cell, universally compatible with all kinds of industrial-grade equipment and large tools.",
"weight": 950,
"volume": "1000ml",
Expand All @@ -199,7 +263,8 @@
"id": "heavy_atomic_battery_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "atomic heavy battery cell",
"name": "atomic heavy battery",
"name_plural": "atomic heavy batteries",
"description": "This is an atomic battery, universally compatible with all kinds of industrial-grade equipment and large tools. It cannot be recharged.",
"weight": 1600,
"volume": "750ml",
Expand All @@ -213,6 +278,25 @@
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "LEAK_DAM", "RADIOACTIVE" ]
},
{
"id": "heavy_disposable_cell",
"type": "MAGAZINE",
"category": "spare_parts",
"name": "heavy disposable battery",
"name_plural": "heavy disposable batteries",
"description": "This is a heavy battery cell, universally compatible with all kinds of industrial-grade equipment and large tools. The battery's chemistry means that it has a very high capacity, but cannot be recharged.",
"weight": 950,
"volume": "1000ml",
"price": 10000,
"material": [ "iron" ],
"symbol": "=",
"color": "yellow",
"ammo_type": "battery",
"count": 2500,
"capacity": 2500,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ]
},
{
"type": "AMMO",
"id": "aluminum_foil",
Expand Down
22 changes: 17 additions & 5 deletions data/json/items/tool/lighting.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@
"need_charges_msg": "The lantern has no batteries."
},
"flags": [ "RADIO_MODABLE", "ALLOWS_REMOTE_USE" ],
"magazines": [ [ "battery", [ "medium_battery_cell", "medium_plus_battery_cell", "medium_atomic_battery_cell" ] ] ]
"magazines": [
[
"battery",
[ "medium_battery_cell", "medium_plus_battery_cell", "medium_atomic_battery_cell", "medium_disposable_cell" ]
]
],
"magazine_well": 2
},
{
"id": "electric_lantern_on",
Expand Down Expand Up @@ -67,10 +73,13 @@
"light_plus_battery_cell",
"light_minus_battery_cell",
"light_atomic_battery_cell",
"light_minus_atomic_battery_cell"
"light_minus_atomic_battery_cell",
"light_minus_disposable_cell",
"light_disposable_cell"
]
]
]
],
"magazine_well": 1
},
{
"id": "flashlight_on",
Expand Down Expand Up @@ -149,10 +158,13 @@
"light_battery_cell",
"light_minus_battery_cell",
"light_atomic_battery_cell",
"light_minus_atomic_battery_cell"
"light_minus_atomic_battery_cell",
"light_minus_disposable_cell",
"light_disposable_cell"
]
]
]
],
"magazine_well": 1
},
{
"id": "heavy_flashlight_on",
Expand Down
Loading

0 comments on commit ba376ea

Please sign in to comment.