Skip to content

Commit

Permalink
No cost to turn off (CleverRaven#75892)
Browse files Browse the repository at this point in the history
* No cost to turn off

* lint

---------

Co-authored-by: Anton Simakov <[email protected]>
  • Loading branch information
2 people authored and Knut-Aage-Hofseth committed Aug 29, 2024
1 parent bb56f9b commit 26db58f
Show file tree
Hide file tree
Showing 16 changed files with 153 additions and 21 deletions.
3 changes: 3 additions & 0 deletions data/json/items/armor/combat_exoskeleton.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions data/json/items/melee/swords_and_blades.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down Expand Up @@ -3002,6 +3003,7 @@
"qualities": [ [ "AXE", 3 ] ],
"use_action": {
"type": "effect_on_conditions",
"ammo_scale": 0,
"menu_text": "Turn off",
"effect_on_conditions": [
{
Expand Down
1 change: 1 addition & 0 deletions data/json/items/tool/cooking.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
8 changes: 6 additions & 2 deletions data/json/items/tool/electronics.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
},
Expand All @@ -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"
Expand Down Expand Up @@ -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" ],
Expand Down Expand Up @@ -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"
},
Expand All @@ -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"
Expand Down
1 change: 1 addition & 0 deletions data/json/items/tool/landscaping.json
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@
"revert_to": "trimmer_off",
"use_action": {
"type": "effect_on_conditions",
"ammo_scale": 0,
"menu_text": "Turn off",
"effect_on_conditions": [
{
Expand Down
8 changes: 7 additions & 1 deletion data/json/items/tool/lighting.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down
2 changes: 2 additions & 0 deletions data/json/items/tool/masonry.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -132,6 +133,7 @@
{
"type": "effect_on_conditions",
"menu_text": "Turn off",
"ammo_scale": 0,
"effect_on_conditions": [
{
"id": "EOC_toolweapon_deactivate__electric_masonrysaw",
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/tool/radio_tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down
5 changes: 5 additions & 0 deletions data/json/items/tool/woodworking.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
41 changes: 36 additions & 5 deletions data/json/items/tool_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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" ] } ]
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
}
}
]
20 changes: 18 additions & 2 deletions data/mods/Aftershock/items/armor/exosuit/exosuit_frame.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -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": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] ],
Expand Down
16 changes: 14 additions & 2 deletions data/mods/Aftershock/items/armor/winter_masks.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down Expand Up @@ -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"
}
}
]
24 changes: 21 additions & 3 deletions data/mods/Aftershock/items/armor/winter_suits.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
}
}
]
8 changes: 7 additions & 1 deletion data/mods/Aftershock/items/tool_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
}
]
Loading

0 comments on commit 26db58f

Please sign in to comment.