Skip to content

Commit

Permalink
Update all active items to new tick action system and remove old syst…
Browse files Browse the repository at this point in the history
…em (CleverRaven#67352)

* remove bool t uses

* remove bool t uses

* remove bool t uses

* split multicooker

* split remoteveh

* remove bool t uses

* lint

* unused

* radiocaron

* radiocontrol

* foodperson

* ehandcuffs

* Update data/json/items/tool/radio_tools.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* laptop music

* robotcontrol

* portable_game

* gasmask

* dive_tank

* unused

* mp3

* geiger

* noise_emitter

* fish trap

* remove bool t

* merge fix

* mods

* merge fix

* merge fix

* better music

* fix mp3

* better messages

* better messages

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
Hirmuolio and github-actions[bot] authored Aug 6, 2023
1 parent d8743f6 commit c6f8dc3
Show file tree
Hide file tree
Showing 31 changed files with 1,370 additions and 1,269 deletions.
11 changes: 3 additions & 8 deletions data/json/item_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@
},
{
"type": "item_action",
"id": "MP3_ON",
"id": "MP3_DEACTIVATE",
"name": { "str": "Turn off music" }
},
{
Expand All @@ -650,12 +650,12 @@
},
{
"type": "item_action",
"id": "GASMASK",
"id": "GASMASK_ACTIVATE",
"name": { "str": "Prepare to use" }
},
{
"type": "item_action",
"id": "DIVE_TANK",
"id": "DIVE_TANK_ACTIVATE",
"name": { "str": "Use regulator" }
},
{
Expand All @@ -678,11 +678,6 @@
"id": "MYCUS",
"name": { "str": "Consume" }
},
{
"type": "item_action",
"id": "NOISE_EMITTER_OFF",
"name": { "str": "Turn on" }
},
{
"type": "item_action",
"id": "NOISE_EMITTER_ON",
Expand Down
1 change: 1 addition & 0 deletions data/json/items/fake.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"description": "Extremely thin lenses provides user with augmented reality overlay allowing the user to zoom, and it displays handy information about local topology.",
"charges_per_use": 1,
"use_action": [ "CAMERA", "PORTABLE_GAME", "EINKTABLETPC", "ELECTRICSTORAGE", "EBOOKSAVE", "EBOOKREAD" ],
"tick_action": [ "EPIC_MUSIC" ],
"pocket_data": [
{
"pocket_type": "EBOOK",
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 @@ -665,6 +665,7 @@
"flags": [ "WATER_BREAK", "ELECTRONIC", "ALLOWS_REMOTE_USE" ],
"power_draw": "100 W",
"qualities": [ [ "CONTAIN", 1 ] ],
"tick_action": "MULTICOOKER_TICK",
"use_action": [ "MULTICOOKER", { "type": "link_up", "cable_length": 2, "charge_rate": "1000 W" } ],
"pocket_data": [
{
Expand Down
34 changes: 29 additions & 5 deletions data/json/items/tool/electronics.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"max_charges": 3000,
"turns_per_charge": 1,
"use_action": [ "EHANDCUFFS" ],
"tick_action": [ "EHANDCUFFS_TICK" ],
"//": "Don't add ELECTRONIC flag here, since these handcuffs have their own behavior when affected by EMP blast",
"flags": [ "ALWAYS_TWOHAND", "TRADER_AVOID", "WATER_BREAK" ],
"melee_damage": { "cut": 1 }
Expand Down Expand Up @@ -205,6 +206,7 @@
},
{ "type": "link_up", "cable_length": 4, "charge_rate": "10 W" }
],
"tick_action": [ "EPIC_MUSIC" ],
"//": "LIGHT_10 is the bare minimum for reading without penalties",
"flags": [ "LIGHT_10", "TRADER_AVOID", "WATCH", "WATER_BREAK", "ELECTRONIC" ]
},
Expand Down Expand Up @@ -269,7 +271,13 @@
"description": "A tool for measuring radiation. It is in continuous scan mode, and will produce quiet clicking sounds in the presence of ambient radiation. Using it allows you to turn it off, or scan yourself or the ground.",
"power_draw": "200 mW",
"revert_to": "geiger_off",
"use_action": [ "GEIGER" ],
"use_action": {
"target": "geiger_off",
"msg": "The geiger counter's SCANNING LED turns off.",
"menu_text": "Turn off",
"type": "transform"
},
"tick_action": [ "GEIGER_ACTIVE" ],
"flags": [ "TRADER_AVOID", "WATER_BREAK" ]
},
{
Expand Down Expand Up @@ -412,6 +420,7 @@
},
{ "type": "link_up", "cable_length": 5, "charge_rate": "140 W" }
],
"tick_action": [ "EPIC_MUSIC" ],
"flags": [ "WATCH", "LIGHT_10", "TRADER_AVOID", "WATER_BREAK", "ELECTRONIC" ]
},
{
Expand Down Expand Up @@ -448,7 +457,8 @@
"description": "This mp3 player is turned on and playing some great tunes, raising your morale steadily while on your person. It runs through batteries quickly; you can turn it off by using it. It also obscures your hearing.",
"power_draw": "1 W",
"revert_to": "mp3",
"use_action": [ "MP3_ON", { "type": "link_up", "cable_length": 4, "charge_rate": "5 W" } ],
"tick_action": [ "MP3_ON" ],
"use_action": [ "MP3_DEACTIVATE", { "type": "link_up", "cable_length": 4, "charge_rate": "5 W" } ],
"flags": [ "TRADER_AVOID", "WATER_BREAK", "ELECTRONIC" ]
},
{
Expand All @@ -466,7 +476,13 @@
"color": "yellow",
"ammo": [ "battery" ],
"charges_per_use": 1,
"use_action": [ "NOISE_EMITTER_OFF" ],
"use_action": {
"target": "noise_emitter_on",
"msg": "You turn the noise emitter on.",
"menu_text": "Turn off",
"active": true,
"type": "transform"
},
"flags": [ "RADIO_MODABLE", "RADIO_INVOKE_PROC", "WATER_BREAK" ],
"pocket_data": [
{
Expand All @@ -486,7 +502,14 @@
"description": "A homemade device that is emitting horrible crackles, pops, and other loud static sounds. Quick, get away from it before it draws zombies to you!",
"power_draw": "10 W",
"revert_to": "noise_emitter",
"use_action": [ "NOISE_EMITTER_ON" ],
"use_action": {
"target": "noise_emitter",
"msg": "The infernal racket dies as the noise emitter turns off.",
"menu_text": "Turn off",
"active": false,
"type": "transform"
},
"tick_action": [ "NOISE_EMITTER_ON" ],
"flags": [ "RADIO_MODABLE", "RADIO_INVOKE_PROC", "TRADER_AVOID", "WATER_BREAK" ]
},
{
Expand Down Expand Up @@ -637,13 +660,14 @@
"power_draw": "300 mW",
"revert_to": "smart_phone",
"use_action": [
"MP3_ON",
"MP3_DEACTIVATE",
"PORTABLE_GAME",
"EINKTABLETPC",
"EBOOKSAVE",
"EBOOKREAD",
{ "type": "link_up", "cable_length": 3, "charge_rate": "20 W" }
],
"tick_action": [ "MP3_ON" ],
"extend": { "flags": [ "TRADER_AVOID" ] }
},
{
Expand Down
6 changes: 4 additions & 2 deletions data/json/items/tool/fishing.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"color": "green",
"ammo": [ "fish_bait" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "ammo_restriction": { "fish_bait": 5 } } ],
"qualities": [ [ "FISH_TRAP", 1 ] ]
"qualities": [ [ "FISH_TRAP", 1 ] ],
"tick_action": [ "FISH_TRAP_TICK" ]
},
{
"id": "fish_trap_basket",
Expand All @@ -32,7 +33,8 @@
"color": "brown",
"ammo": [ "fish_bait" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "ammo_restriction": { "fish_bait": 10 } } ],
"qualities": [ [ "FISH_TRAP", 1 ] ]
"qualities": [ [ "FISH_TRAP", 1 ] ],
"tick_action": [ "FISH_TRAP_TICK" ]
},
{
"id": "fishing_hook_basic",
Expand Down
11 changes: 11 additions & 0 deletions data/json/items/tool/radio_tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"price": 6000,
"price_postapoc": 250,
"use_action": [ "RADIOCONTROL" ],
"tick_action": [ "RADIOCONTROL_TICK" ],
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
Expand Down Expand Up @@ -65,6 +66,15 @@
"turns_per_charge": 5,
"revert_to": "radio_car",
"use_action": [ "RADIOCARON" ],
"tick_action": [
{
"type": "sound",
"sound_message": "buzzz…",
"sound_volume": 0,
"sound_id": "misc",
"sound_variant": "rc_car_drives"
}
],
"flags": [ "LIGHT_15", "RADIO_CONTAINER", "TRADER_AVOID", "RADIOCAR", "WATER_BREAK", "ELECTRONIC" ]
},
{
Expand Down Expand Up @@ -171,6 +181,7 @@
"charges_per_use": 1,
"turns_per_charge": 10,
"use_action": [ "REMOTEVEH" ],
"tick_action": "REMOTEVEH_TICK",
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
Expand Down
Loading

0 comments on commit c6f8dc3

Please sign in to comment.