From 26db58f3b5e8399685354f87dc7f0e462d60a50d Mon Sep 17 00:00:00 2001 From: Maleclypse <54345792+Maleclypse@users.noreply.github.com> Date: Mon, 26 Aug 2024 02:44:24 -0500 Subject: [PATCH] No cost to turn off (#75892) * No cost to turn off * lint --------- Co-authored-by: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> --- data/json/items/armor/combat_exoskeleton.json | 3 ++ data/json/items/melee/swords_and_blades.json | 2 + data/json/items/tool/cooking.json | 1 + data/json/items/tool/electronics.json | 8 +++- data/json/items/tool/landscaping.json | 1 + data/json/items/tool/lighting.json | 8 +++- data/json/items/tool/masonry.json | 2 + data/json/items/tool/radio_tools.json | 2 +- data/json/items/tool/woodworking.json | 5 +++ data/json/items/tool_armor.json | 41 ++++++++++++++++--- .../items/armor/exosuit/exosuit_frame.json | 20 ++++++++- .../items/armor/exosuit/exosuit_melee.json | 1 + .../Aftershock/items/armor/winter_masks.json | 16 +++++++- .../Aftershock/items/armor/winter_suits.json | 24 +++++++++-- data/mods/Aftershock/items/tool_armor.json | 8 +++- data/mods/Aftershock/items/tools.json | 32 +++++++++++++-- 16 files changed, 153 insertions(+), 21 deletions(-) diff --git a/data/json/items/armor/combat_exoskeleton.json b/data/json/items/armor/combat_exoskeleton.json index 9ab0b174de8b8..13ee8668a2799 100644 --- a/data/json/items/armor/combat_exoskeleton.json +++ b/data/json/items/armor/combat_exoskeleton.json @@ -170,6 +170,7 @@ "revert_to": "combat_exoskeleton_heavy", "use_action": { "type": "transform", + "ammo_scale": 0, "menu_text": "Turn off", "msg": "You turn the exoskeleton off.\n>>Initiating shutdown sequence…\n>>Shutting down.", "target": "combat_exoskeleton_heavy" @@ -275,6 +276,7 @@ "revert_to": "combat_exoskeleton_medium", "use_action": { "type": "transform", + "ammo_scale": 0, "menu_text": "Turn off", "msg": "You turn the exoskeleton off.\n>>Initiating shutdown sequence…\n>>Shutting down.", "target": "combat_exoskeleton_medium" @@ -380,6 +382,7 @@ "revert_to": "combat_exoskeleton_light", "use_action": { "type": "transform", + "ammo_scale": 0, "menu_text": "Turn off", "msg": "You turn the exoskeleton off.\n>>Initiating shutdown sequence…\n>>Shutting down.", "target": "combat_exoskeleton_light" diff --git a/data/json/items/melee/swords_and_blades.json b/data/json/items/melee/swords_and_blades.json index c60ffc1297000..010a6d49adae8 100644 --- a/data/json/items/melee/swords_and_blades.json +++ b/data/json/items/melee/swords_and_blades.json @@ -2913,6 +2913,7 @@ "qualities": [ [ "AXE", 3 ], [ "BUTCHER", -120 ] ], "use_action": { "type": "effect_on_conditions", + "ammo_scale": 0, "menu_text": "Turn off", "effect_on_conditions": [ { @@ -3002,6 +3003,7 @@ "qualities": [ [ "AXE", 3 ] ], "use_action": { "type": "effect_on_conditions", + "ammo_scale": 0, "menu_text": "Turn off", "effect_on_conditions": [ { diff --git a/data/json/items/tool/cooking.json b/data/json/items/tool/cooking.json index ece25f78cdaad..efbb8f9a7d108 100644 --- a/data/json/items/tool/cooking.json +++ b/data/json/items/tool/cooking.json @@ -124,6 +124,7 @@ "qualities": [ [ "CUT", 2 ], [ "BUTCHER", 25 ] ], "use_action": { "type": "effect_on_conditions", + "ammo_scale": 0, "menu_text": "Turn off", "effect_on_conditions": [ { diff --git a/data/json/items/tool/electronics.json b/data/json/items/tool/electronics.json index 89d032b58bd1f..901cd2acf6037 100644 --- a/data/json/items/tool/electronics.json +++ b/data/json/items/tool/electronics.json @@ -276,6 +276,7 @@ "use_action": { "target": "geiger_off", "msg": "The geiger counter's SCANNING LED turns off.", + "ammo_scale": 0, "menu_text": "Turn off", "type": "transform" }, @@ -507,7 +508,7 @@ "use_action": { "target": "noise_emitter_on", "msg": "You turn the noise emitter on.", - "menu_text": "Turn off", + "menu_text": "Turn on", "active": true, "type": "transform" }, @@ -533,6 +534,7 @@ "use_action": { "target": "noise_emitter", "msg": "The infernal racket dies as the noise emitter turns off.", + "ammo_scale": 0, "menu_text": "Turn off", "active": false, "type": "transform" @@ -587,6 +589,7 @@ "type": "transform", "target": "emf_detector", "msg": "The noise of your EMF detector slows to a halt.", + "ammo_scale": 0, "menu_text": "Turn off" }, "tick_action": [ "EMF_PASSIVE_ON" ], @@ -933,7 +936,7 @@ "use_action": { "target": "noise_emitter_super_on", "msg": "You turn the super noise emitter on.", - "menu_text": "Turn off", + "menu_text": "Turn on", "active": true, "type": "transform" }, @@ -959,6 +962,7 @@ "use_action": { "target": "noise_emitter_super", "msg": "The infernal racket dies as the super noise emitter turns off.", + "ammo_scale": 0, "menu_text": "Turn off", "active": false, "type": "transform" diff --git a/data/json/items/tool/landscaping.json b/data/json/items/tool/landscaping.json index 4b617acd43b97..d382dd62085c5 100644 --- a/data/json/items/tool/landscaping.json +++ b/data/json/items/tool/landscaping.json @@ -391,6 +391,7 @@ "revert_to": "trimmer_off", "use_action": { "type": "effect_on_conditions", + "ammo_scale": 0, "menu_text": "Turn off", "effect_on_conditions": [ { diff --git a/data/json/items/tool/lighting.json b/data/json/items/tool/lighting.json index d9996b6b8228f..30baa2743e57e 100644 --- a/data/json/items/tool/lighting.json +++ b/data/json/items/tool/lighting.json @@ -173,7 +173,13 @@ "power_draw": "1 W", "revert_to": "electric_lantern", "use_action": [ - { "menu_text": "Turn off", "type": "transform", "target": "electric_lantern", "msg": "You turn the lamp off." }, + { + "menu_text": "Turn off", + "ammo_scale": 0, + "type": "transform", + "target": "electric_lantern", + "msg": "You turn the lamp off." + }, { "type": "link_up", "cable_length": 2, "charge_rate": "20 W" } ], "flags": [ "RADIO_MODABLE", "RADIO_INVOKE_PROC", "LIGHT_15", "TRADER_AVOID", "ALLOWS_REMOTE_USE" ] diff --git a/data/json/items/tool/masonry.json b/data/json/items/tool/masonry.json index 1c59defbe3b23..0ed0f42d46794 100644 --- a/data/json/items/tool/masonry.json +++ b/data/json/items/tool/masonry.json @@ -56,6 +56,7 @@ "use_action": { "type": "effect_on_conditions", "menu_text": "Turn off", + "ammo_scale": 0, "effect_on_conditions": [ { "id": "EOC_toolweapon_deactivate__masonrysaw", @@ -132,6 +133,7 @@ { "type": "effect_on_conditions", "menu_text": "Turn off", + "ammo_scale": 0, "effect_on_conditions": [ { "id": "EOC_toolweapon_deactivate__electric_masonrysaw", diff --git a/data/json/items/tool/radio_tools.json b/data/json/items/tool/radio_tools.json index 4cd5e8aca4eb6..94c2aeefef018 100644 --- a/data/json/items/tool/radio_tools.json +++ b/data/json/items/tool/radio_tools.json @@ -131,7 +131,7 @@ "use_action": [ "RADIO_ON", { "type": "link_up", "menu_text": "Plug in / Unplug", "ammo_scale": 0, "cable_length": 3, "charge_rate": "5 W" }, - { "type": "transform", "target": "radio", "menu_text": "Turn off" } + { "type": "transform", "target": "radio", "ammo_scale": 0, "menu_text": "Turn off" } ], "tick_action": [ "RADIO_TICK" ], "flags": [ "TRADER_AVOID", "WATER_BREAK", "ELECTRONIC" ] diff --git a/data/json/items/tool/woodworking.json b/data/json/items/tool/woodworking.json index 7fdd5be4cb75a..9e6f467e02b09 100644 --- a/data/json/items/tool/woodworking.json +++ b/data/json/items/tool/woodworking.json @@ -91,6 +91,7 @@ "use_action": { "type": "effect_on_conditions", "menu_text": "Turn off", + "ammo_scale": 0, "effect_on_conditions": [ { "id": "EOC_toolweapon_deactivate__chainsaw", @@ -177,6 +178,7 @@ "use_action": { "type": "effect_on_conditions", "menu_text": "Turn off", + "ammo_scale": 0, "effect_on_conditions": [ { "id": "EOC_toolweapon_deactivate__polesaw", @@ -264,6 +266,7 @@ "use_action": { "type": "effect_on_conditions", "menu_text": "Turn off", + "ammo_scale": 0, "effect_on_conditions": [ { "id": "EOC_toolweapon_deactivate__circsaw", @@ -433,6 +436,7 @@ "use_action": { "type": "effect_on_conditions", "menu_text": "Turn off", + "ammo_scale": 0, "effect_on_conditions": [ { "id": "EOC_toolweapon_deactivate__elec_chainsaw", @@ -504,6 +508,7 @@ { "type": "effect_on_conditions", "menu_text": "Turn off", + "ammo_scale": 0, "effect_on_conditions": [ { "id": "EOC_toolweapon_deactivate__elec_chainsaw_cord", diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index 35574a99c6d7e..083d6516dd2c4 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -1480,6 +1480,7 @@ "revert_to": "dimensional_anchor", "use_action": { "type": "transform", + "ammo_scale": 0, "menu_text": "Turn off", "msg": "The %s LED light flickers off.", "target": "dimensional_anchor" @@ -1630,7 +1631,13 @@ "description": "Covered in interlocking plates of reflective metal, this advanced suit resembles both plate armor and an astronaut's spacesuit. It is turned on, and continually draining power. Use it to turn it off.", "turns_per_charge": 25, "revert_to": "phase_immersion_suit", - "use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Suit shutting down.", "target": "phase_immersion_suit" }, + "use_action": { + "type": "transform", + "ammo_scale": 0, + "menu_text": "Turn off", + "msg": "Suit shutting down.", + "target": "phase_immersion_suit" + }, "environmental_protection": 80, "flags": [ "RAD_PROOF", @@ -1817,7 +1824,13 @@ "flags": [ "WATER_FRIENDLY", "REBREATHER", "UNDERSIZE", "PREFIX_XS", "TRADER_AVOID" ], "turns_per_charge": 60, "revert_to": "rebreather_xs", - "use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Your %s deactivates.", "target": "rebreather_xs" }, + "use_action": { + "type": "transform", + "ammo_scale": 0, + "menu_text": "Turn off", + "msg": "Your %s deactivates.", + "target": "rebreather_xs" + }, "covers": [ "mouth" ], "environmental_protection": 15, "armor": [ { "encumbrance": 20, "coverage": 75, "covers": [ "mouth" ] } ] @@ -3789,7 +3802,13 @@ "ammo": "battery", "power_draw": "60 mW", "revert_to": "flight_helmet", - "use_action": { "type": "transform", "menu_text": "Turn off", "msg": "The %s flicks off.", "target": "flight_helmet" }, + "use_action": { + "type": "transform", + "ammo_scale": 0, + "menu_text": "Turn off", + "msg": "The %s flicks off.", + "target": "flight_helmet" + }, "pocket_data": [ { "pocket_type": "MAGAZINE_WELL", @@ -3883,7 +3902,13 @@ "power_draw": "972216 mW", "//": "Battery should last two hours (02:00:07). Weight capacity bonus should include weight of item AND battery, plus 90kg.", "revert_to": "utility_exoskeleton_off", - "use_action": { "type": "transform", "menu_text": "Turn off", "msg": "The %s disengages.", "target": "utility_exoskeleton_off" } + "use_action": { + "type": "transform", + "ammo_scale": 0, + "menu_text": "Turn off", + "msg": "The %s disengages.", + "target": "utility_exoskeleton_off" + } }, { "id": "ice_utility_exoskeleton_off", @@ -3935,6 +3960,12 @@ "turns_per_charge": 1, "//": "Full tank lasts a bit under three hours (166.66 minutes). Has less carry bonus than the battery one since the weight of the fuel will drop over time.", "revert_to": "ice_utility_exoskeleton_off", - "use_action": { "type": "transform", "menu_text": "Turn off", "msg": "The %s disengages.", "target": "ice_utility_exoskeleton_off" } + "use_action": { + "type": "transform", + "ammo_scale": 0, + "menu_text": "Turn off", + "msg": "The %s disengages.", + "target": "ice_utility_exoskeleton_off" + } } ] diff --git a/data/mods/Aftershock/items/armor/exosuit/exosuit_frame.json b/data/mods/Aftershock/items/armor/exosuit/exosuit_frame.json index 80a6291404a9c..76b1971e61db1 100644 --- a/data/mods/Aftershock/items/armor/exosuit/exosuit_frame.json +++ b/data/mods/Aftershock/items/armor/exosuit/exosuit_frame.json @@ -341,7 +341,15 @@ ], "power_draw": "6460 mW", "revert_to": "modular_exosuit", - "use_action": [ { "type": "transform", "menu_text": "Turn off", "msg": "The %s disengages.", "target": "modular_exosuit" } ], + "use_action": [ + { + "type": "transform", + "ammo_scale": 0, + "menu_text": "Turn off", + "msg": "The %s disengages.", + "target": "modular_exosuit" + } + ], "armor": [ { "material": [ @@ -560,7 +568,15 @@ "relic_data": { "passive_effects": [ { "condition": "ACTIVE", "values": [ { "value": "STRENGTH", "add": 5 } ] } ] }, "power_draw": "5787 mW", "revert_to": "modular_exosuit_light", - "use_action": [ { "type": "transform", "menu_text": "Turn off", "msg": "The %s disengages.", "target": "modular_exosuit_light" } ], + "use_action": [ + { + "type": "transform", + "ammo_scale": 0, + "menu_text": "Turn off", + "msg": "The %s disengages.", + "target": "modular_exosuit_light" + } + ], "armor": [ { "material": [ diff --git a/data/mods/Aftershock/items/armor/exosuit/exosuit_melee.json b/data/mods/Aftershock/items/armor/exosuit/exosuit_melee.json index c4a624b84491d..e56c12ec04fc5 100644 --- a/data/mods/Aftershock/items/armor/exosuit/exosuit_melee.json +++ b/data/mods/Aftershock/items/armor/exosuit/exosuit_melee.json @@ -231,6 +231,7 @@ "target": "exosuit_power_cutter", "msg": "Your power cutter falls quiet.", "menu_text": "Turn off", + "ammo_scale": 0, "type": "transform" }, "qualities": [ [ "CUT", 3 ], [ "SAW_M", 20 ], [ "SAW_M_FINE", 1 ], [ "BUTCHER", -80 ] ], diff --git a/data/mods/Aftershock/items/armor/winter_masks.json b/data/mods/Aftershock/items/armor/winter_masks.json index 5323b8019a936..e4afc4c5c1137 100644 --- a/data/mods/Aftershock/items/armor/winter_masks.json +++ b/data/mods/Aftershock/items/armor/winter_masks.json @@ -58,7 +58,13 @@ "power_draw": "8170 mW", "warmth": 150, "revert_to": "afs_magellan_suit_helmet", - "use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Your %s deactivates.", "target": "afs_magellan_suit_helmet" }, + "use_action": { + "type": "transform", + "ammo_scale": 0, + "menu_text": "Turn off", + "msg": "Your %s deactivates.", + "target": "afs_magellan_suit_helmet" + }, "extend": { "flags": [ "GAS_PROOF", "WATCH", "ALARMCLOCK", "THERMOMETER", "HYGROMETER", "PARTIAL_DEAF", "TRADER_AVOID" ] }, "environmental_protection": 15 }, @@ -115,6 +121,12 @@ "power_draw": "6944 mW", "warmth": 150, "revert_to": "afs_frontier_cryomask", - "use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Your %s deactivates.", "target": "afs_frontier_cryomask" } + "use_action": { + "type": "transform", + "ammo_scale": 0, + "menu_text": "Turn off", + "msg": "Your %s deactivates.", + "target": "afs_frontier_cryomask" + } } ] diff --git a/data/mods/Aftershock/items/armor/winter_suits.json b/data/mods/Aftershock/items/armor/winter_suits.json index a90f846e7df5a..2740f3764f5aa 100644 --- a/data/mods/Aftershock/items/armor/winter_suits.json +++ b/data/mods/Aftershock/items/armor/winter_suits.json @@ -60,7 +60,13 @@ "power_draw": "8170 mW", "warmth": 150, "revert_to": "afs_magellan_suit", - "use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Your %s deactivates.", "target": "afs_magellan_suit" } + "use_action": { + "type": "transform", + "ammo_scale": 0, + "menu_text": "Turn off", + "msg": "Your %s deactivates.", + "target": "afs_magellan_suit" + } }, { "id": "afs_frontier_cryo", @@ -119,7 +125,13 @@ "power_draw": "6944 mW", "warmth": 150, "revert_to": "afs_frontier_cryo", - "use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Your %s deactivates.", "target": "afs_frontier_cryo" } + "use_action": { + "type": "transform", + "ammo_scale": 0, + "menu_text": "Turn off", + "msg": "Your %s deactivates.", + "target": "afs_frontier_cryo" + } }, { "id": "afs_combat_cryo", @@ -177,6 +189,12 @@ "power_draw": "11111 mW", "warmth": 150, "revert_to": "afs_combat_cryo", - "use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Your %s deactivates.", "target": "afs_combat_cryo" } + "use_action": { + "type": "transform", + "ammo_scale": 0, + "menu_text": "Turn off", + "msg": "Your %s deactivates.", + "target": "afs_combat_cryo" + } } ] diff --git a/data/mods/Aftershock/items/tool_armor.json b/data/mods/Aftershock/items/tool_armor.json index ba57a50ede183..6d858e83e79fd 100644 --- a/data/mods/Aftershock/items/tool_armor.json +++ b/data/mods/Aftershock/items/tool_armor.json @@ -54,7 +54,13 @@ "description": "A dark orange bodyglove, hundreds of tubes curl over its surface, tracing the contours of human musculature. Meant to control body temperature during prolonged cryopreservation, it could easily keep you comfortable in any earthly climate. The temperature control units of this high-tech garment are currently active, and continuously draining battery power. Use it to turn them off.", "power_draw": "90 W", "revert_to": "afs_cryopod_bodyglove", - "use_action": { "type": "transform", "menu_text": "Turn off", "msg": "Your %s deactivates.", "target": "afs_cryopod_bodyglove" }, + "use_action": { + "type": "transform", + "ammo_scale": 0, + "menu_text": "Turn off", + "msg": "Your %s deactivates.", + "target": "afs_cryopod_bodyglove" + }, "flags": [ "VARSIZE", "SKINTIGHT", "RAINPROOF", "STURDY", "WATERPROOF", "PADDED", "THERMOMETER", "HYGROMETER" ] } ] diff --git a/data/mods/Aftershock/items/tools.json b/data/mods/Aftershock/items/tools.json index 82f9710209d07..a0d832ae0ea0f 100644 --- a/data/mods/Aftershock/items/tools.json +++ b/data/mods/Aftershock/items/tools.json @@ -314,7 +314,13 @@ "description": "A huge, gas-powered saw with a diamond blade, currently a whirling blur. It's consuming gasoline, but can be used as a fantastic tool for cutting metal. You can also use it as a terrifying weapon, if you're into that sort of thing.", "turns_per_charge": 3, "revert_to": "afs_power_cutter", - "use_action": { "target": "afs_power_cutter", "msg": "Your power cutter falls quiet.", "menu_text": "Turn off", "type": "transform" }, + "use_action": { + "target": "afs_power_cutter", + "msg": "Your power cutter falls quiet.", + "ammo_scale": 0, + "menu_text": "Turn off", + "type": "transform" + }, "qualities": [ [ "CUT", 2 ], [ "SAW_M", 20 ], [ "SAW_M_FINE", 1 ], [ "BUTCHER", -70 ] ], "flags": [ "ALWAYS_TWOHAND", "MESSY", "TRADER_AVOID", "NONCONDUCTIVE" ], "melee_damage": { "bash": 7, "cut": 80 } @@ -348,7 +354,13 @@ "description": "This fearsome weapon is currently whirring loudly and shaking with the force of its own power. Use it to turn it off.", "turns_per_charge": 5, "revert_to": "afs_murdersaw", - "use_action": { "target": "afs_murdersaw", "msg": "Your murdersaw falls quiet.", "menu_text": "Turn off", "type": "transform" }, + "use_action": { + "target": "afs_murdersaw", + "msg": "Your murdersaw falls quiet.", + "ammo_scale": 0, + "menu_text": "Turn off", + "type": "transform" + }, "qualities": [ [ "CUT", 2 ], [ "SAW_M", 10 ], [ "BUTCHER", -50 ] ], "flags": [ "ALWAYS_TWOHAND", "MESSY", "TRADER_AVOID", "NONCONDUCTIVE" ], "melee_damage": { "bash": 6, "cut": 80 } @@ -479,7 +491,13 @@ "name": { "str": "control laptop - lit screen", "str_pl": "control laptops - lit screen" }, "power_draw": "1 W", "revert_to": "control_laptop", - "use_action": { "target": "control_laptop", "msg": "You stop lighting up the screen.", "menu_text": "Turn off", "type": "transform" }, + "use_action": { + "target": "control_laptop", + "msg": "You stop lighting up the screen.", + "ammo_scale": 0, + "menu_text": "Turn off", + "type": "transform" + }, "tick_action": [ "EPIC_MUSIC" ], "flags": [ "WATCH", "LIGHT_10", "TRADER_AVOID" ] }, @@ -550,7 +568,13 @@ "name": { "str": "VR rig - holosuite deployed", "str_pl": "VR rigs - holosuite deployed" }, "power_draw": "1 W", "revert_to": "vr_laptop", - "use_action": { "target": "vr_laptop", "msg": "You power down the virtual overlay.", "menu_text": "Turn off", "type": "transform" }, + "use_action": { + "target": "vr_laptop", + "msg": "You power down the virtual overlay.", + "ammo_scale": 0, + "menu_text": "Turn off", + "type": "transform" + }, "flags": [ "WATCH", "TRADER_AVOID" ], "relic_data": { "passive_effects": [