Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Tear out toolweapon_on and toolweapon_off and dependent iuse actions. Add WATER_DISABLE flag. Add need_dry variable to transforms. #5488

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions data/json/flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -2023,6 +2023,12 @@
"type": "json_flag",
"context": [ ]
},
{
"id": "WATER_DISABLE",
"type": "json_flag",
"context": [ "TOOL" ],
"info": "This item <bad>stops working</bad> when <info>submerged in water</info>."
},
{
"id": "WHIP",
"type": "json_flag",
Expand Down
85 changes: 0 additions & 85 deletions data/json/item_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,31 +174,6 @@
"id": "fireweapon_on",
"name": { "str": "Turn off" }
},
{
"type": "item_action",
"id": "CARVER_ON",
"name": { "str": "Turn off" }
},
{
"type": "item_action",
"id": "TRIMMER_ON",
"name": { "str": "Turn off" }
},
{
"type": "item_action",
"id": "CIRCSAW_ON",
"name": { "str": "Turn off" }
},
{
"type": "item_action",
"id": "CHAINSAW_ON",
"name": { "str": "Turn off" }
},
{
"type": "item_action",
"id": "ELEC_CHAINSAW_ON",
"name": { "str": "Turn off" }
},
{
"type": "item_action",
"id": "transform",
Expand Down Expand Up @@ -349,16 +324,6 @@
"id": "CAPTURE_MONSTER_VEH",
"name": { "str": "Capture/place" }
},
{
"type": "item_action",
"id": "CARVER_OFF",
"name": { "str": "Turn on" }
},
{
"type": "item_action",
"id": "CHAINSAW_OFF",
"name": { "str": "Turn on" }
},
{
"type": "item_action",
"id": "CHEW",
Expand All @@ -374,51 +339,11 @@
"id": "COIN_FLIP",
"name": { "str": "Flip" }
},
{
"type": "item_action",
"id": "COMBATSAW_OFF",
"name": { "str": "Turn on" }
},
{
"type": "item_action",
"id": "COMBATSAW_ON",
"name": { "str": "Turn off" }
},
{
"type": "item_action",
"id": "E_COMBATSAW_OFF",
"name": { "str": "Turn on" }
},
{
"type": "item_action",
"id": "E_COMBATSAW_ON",
"name": { "str": "Turn off" }
},
{
"type": "item_action",
"id": "CONTACTS",
"name": { "str": "Apply" }
},
{
"type": "item_action",
"id": "CS_LAJATANG_OFF",
"name": { "str": "Turn on" }
},
{
"type": "item_action",
"id": "CS_LAJATANG_ON",
"name": { "str": "Turn off" }
},
{
"type": "item_action",
"id": "ECS_LAJATANG_OFF",
"name": { "str": "Turn on" }
},
{
"type": "item_action",
"id": "ECS_LAJATANG_ON",
"name": { "str": "Turn off" }
},
{
"type": "item_action",
"id": "DATURA",
Expand Down Expand Up @@ -469,11 +394,6 @@
"id": "EINKTABLETPC",
"name": { "str": "Use" }
},
{
"type": "item_action",
"id": "ELEC_CHAINSAW_OFF",
"name": { "str": "Turn on" }
},
{
"type": "item_action",
"id": "EXTINGUISHER",
Expand Down Expand Up @@ -904,11 +824,6 @@
"id": "TOWEL",
"name": { "str": "Dry/clean yourself" }
},
{
"type": "item_action",
"id": "TRIMMER_OFF",
"name": { "str": "Turn on" }
},
{
"type": "item_action",
"id": "UNFOLD_GENERIC",
Expand Down
60 changes: 48 additions & 12 deletions data/json/items/melee/swords_and_blades.json
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,15 @@
"charges_per_use": 75,
"techniques": [ "WBLOCK_1", "SPIN", "SWEEP" ],
"qualities": [ [ "AXE", 3 ] ],
"use_action": "CS_LAJATANG_OFF",
"use_action": {
"type": "transform",
"active": true,
"target": "cs_lajatang_on",
"msg": "You turn on the chainsaw lajatang.",
"moves": 80,
"transform_charges": 5,
"need_dry": true
},
"flags": [ "NONCONDUCTIVE", "POWERED", "ALWAYS_TWOHAND" ]
},
{
Expand All @@ -1529,11 +1537,12 @@
"cutting": 140,
"to_hit": -1,
"revert_to": "cs_lajatang_off",
"use_action": "CS_LAJATANG_ON",
"revert_msg": "Your chainsaw lajatang goes quiet",
"use_action": { "type": "transform", "target": "cs_lajatang_off", "msg": "You turn off the chainsaw lajatang." },
"qualities": [ [ "BUTCHER", -250 ] ],
"turns_per_charge": 1,
"charges_per_use": 0,
"flags": [ "MESSY", "FRAGILE_MELEE", "TRADER_AVOID", "NONCONDUCTIVE", "ALWAYS_TWOHAND" ]
"flags": [ "MESSY", "FRAGILE_MELEE", "TRADER_AVOID", "NONCONDUCTIVE", "ALWAYS_TWOHAND", "WATER_DISABLE" ]
},
{
"id": "ecs_lajatang_off",
Expand All @@ -1555,7 +1564,15 @@
"charges_per_use": 375,
"techniques": [ "WBLOCK_1", "SPIN", "SWEEP" ],
"qualities": [ [ "AXE", 3 ] ],
"use_action": "ECS_LAJATANG_OFF",
"use_action": {
"type": "transform",
"active": true,
"target": "ecs_lajatang_on",
"msg": "You turn on the chainsaw lajatang.",
"moves": 80,
"transform_charges": 5,
"need_dry": true
},
"flags": [ "NONCONDUCTIVE", "POWERED", "ALWAYS_TWOHAND" ],
"magazines": [
[ "battery", [ "heavy_battery_cell", "heavy_plus_battery_cell", "heavy_atomic_battery_cell", "heavy_disposable_cell" ] ]
Expand All @@ -1574,9 +1591,10 @@
"power_draw": 4000000,
"charges_per_use": 0,
"revert_to": "ecs_lajatang_off",
"use_action": "ECS_LAJATANG_ON",
"revert_msg": "Your chainsaw lajatang goes quiet",
"use_action": { "type": "transform", "target": "cs_lajatang_off", "msg": "You turn off the chainsaw lajatang." },
"qualities": [ [ "BUTCHER", -250 ] ],
"flags": [ "MESSY", "DURABLE_MELEE", "TRADER_AVOID", "NONCONDUCTIVE", "ALWAYS_TWOHAND" ],
"flags": [ "MESSY", "DURABLE_MELEE", "TRADER_AVOID", "NONCONDUCTIVE", "ALWAYS_TWOHAND", "WATER_DISABLE" ],
"magazine_well": "1000 ml"
},
{
Expand Down Expand Up @@ -1701,7 +1719,15 @@
"charges_per_use": 75,
"max_charges": 450,
"qualities": [ [ "AXE", 3 ] ],
"use_action": "COMBATSAW_OFF",
"use_action": {
"type": "transform",
"active": true,
"target": "combatsaw_on",
"msg": "You turn on the combat chainsaw.",
"moves": 60,
"transform_charges": 5,
"need_dry": true
},
"techniques": [ "WBLOCK_1", "SWEEP" ],
"flags": [ "ALWAYS_TWOHAND", "POWERED" ]
},
Expand All @@ -1717,8 +1743,9 @@
"charges_per_use": 0,
"revert_to": "combatsaw_off",
"qualities": [ [ "BUTCHER", -120 ] ],
"use_action": "COMBATSAW_ON",
"flags": [ "MESSY", "DURABLE_MELEE", "TRADER_AVOID", "ALWAYS_TWOHAND" ]
"revert_msg": "Your combat chainsaw goes quiet",
"use_action": { "type": "transform", "target": "combatsaw_off", "msg": "You turn off the combat chainsaw." },
"flags": [ "MESSY", "DURABLE_MELEE", "TRADER_AVOID", "ALWAYS_TWOHAND", "WATER_DISABLE" ]
},
{
"id": "e_combatsaw_off",
Expand All @@ -1739,7 +1766,15 @@
"ammo": "battery",
"charges_per_use": 375,
"qualities": [ [ "AXE", 3 ] ],
"use_action": "E_COMBATSAW_OFF",
"use_action": {
"type": "transform",
"active": true,
"target": "e_combatsaw_on",
"msg": "You turn on the combat chainsaw.",
"moves": 60,
"transform_charges": 5,
"need_dry": true
},
"techniques": [ "WBLOCK_1", "SWEEP" ],
"flags": [ "ALWAYS_TWOHAND", "POWERED" ],
"magazines": [
Expand All @@ -1762,8 +1797,9 @@
"charges_per_use": 0,
"revert_to": "e_combatsaw_off",
"qualities": [ [ "BUTCHER", -120 ] ],
"use_action": "E_COMBATSAW_ON",
"flags": [ "MESSY", "DURABLE_MELEE", "TRADER_AVOID", "ALWAYS_TWOHAND" ],
"revert_msg": "Your combat chainsaw goes quiet",
"use_action": { "type": "transform", "target": "e_combatsaw_off", "msg": "You turn off the combat chainsaw." },
"flags": [ "MESSY", "DURABLE_MELEE", "TRADER_AVOID", "ALWAYS_TWOHAND", "WATER_DISABLE" ],
"magazine_well": "500 ml"
},
{
Expand Down
15 changes: 12 additions & 3 deletions data/json/items/tool/cooking.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,15 @@
"color": "yellow",
"ammo": "battery",
"charges_per_use": 5,
"use_action": "CARVER_OFF",
"use_action": {
"type": "transform",
"active": true,
"target": "carver_on",
"msg": "You turn on the electric carver.",
"moves": 80,
"transform_charges": 1,
"need_dry": true
},
"flags": [ "SHEATH_SWORD", "NONCONDUCTIVE" ],
"magazines": [
[
Expand All @@ -105,8 +113,9 @@
"charges_per_use": 0,
"revert_to": "carver_off",
"qualities": [ [ "CUT", 1 ], [ "BUTCHER", 25 ] ],
"use_action": "CARVER_ON",
"flags": [ "MESSY", "TRADER_AVOID", "NONCONDUCTIVE" ],
"revert_msg": "Your electric carver goes quiet",
"use_action": { "type": "transform", "target": "carver_off", "msg": "You turn off the electric carver." },
"flags": [ "MESSY", "TRADER_AVOID", "NONCONDUCTIVE", "WATER_DISABLE" ],
"magazine_well": "500 ml"
},
{
Expand Down
15 changes: 12 additions & 3 deletions data/json/items/tool/landscaping.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,15 @@
"ammo": "gasoline",
"max_charges": 600,
"charges_per_use": 5,
"use_action": "TRIMMER_OFF",
"use_action": {
"type": "transform",
"active": true,
"target": "trimmer_on",
"msg": "You turn on the hedge trimmer.",
"moves": 80,
"transform_charges": 1,
"need_dry": true
},
"flags": [ "NONCONDUCTIVE" ]
},
{
Expand All @@ -186,8 +194,9 @@
"power_draw": 500000,
"charges_per_use": 0,
"revert_to": "trimmer_off",
"use_action": "TRIMMER_ON",
"revert_msg": "Your hedge trimmer goes quiet",
"use_action": { "type": "transform", "target": "trimmer_off", "msg": "You turn off the hedge trimmer." },
"qualities": [ [ "CUT", 1 ], [ "BUTCHER", -60 ] ],
"flags": [ "MESSY", "TRADER_AVOID", "NONCONDUCTIVE" ]
"flags": [ "MESSY", "TRADER_AVOID", "NONCONDUCTIVE", "WATER_DISABLE" ]
}
]
15 changes: 12 additions & 3 deletions data/json/items/tool/masonry.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@
"max_charges": 450,
"techniques": [ "SWEEP" ],
"qualities": [ [ "AXE", 3 ] ],
"use_action": [ "CHAINSAW_OFF" ],
"use_action": {
"type": "transform",
"active": true,
"target": "masonrysaw_on",
"msg": "You turn on the masonry saw.",
"moves": 80,
"transform_charges": 5,
"need_dry": true
},
"flags": [ "NONCONDUCTIVE", "POWERED", "FRAGILE_MELEE" ]
},
{
Expand All @@ -37,8 +45,9 @@
"revert_to": "masonrysaw_off",
"techniques": [ "SWEEP" ],
"qualities": [ [ "BUTCHER", -100 ] ],
"use_action": [ "CIRCSAW_ON" ],
"flags": [ "MESSY", "TRADER_AVOID", "NONCONDUCTIVE", "FRAGILE_MELEE" ]
"revert_msg": "Your masonry saw goes quiet",
"use_action": { "type": "transform", "target": "masonrysaw_off", "msg": "You turn off the masonry saw." },
"flags": [ "MESSY", "TRADER_AVOID", "NONCONDUCTIVE", "FRAGILE_MELEE", "WATER_DISABLE" ]
},
{
"id": "grinder_blade",
Expand Down
Loading
Loading