Skip to content

Commit

Permalink
Add a construction to convert street lights to use local power (catac…
Browse files Browse the repository at this point in the history
…lysmbnteam#3273)

* Add an option to convert street lights to use local power

* style(autofix.ci): automated formatting

* Update furniture-appliances.json

* Update furniture-appliances.json

* Couple more fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
chaosvolt and autofix-ci[bot] authored Sep 27, 2023
1 parent 8aa0a1b commit d6026df
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 1 deletion.
13 changes: 13 additions & 0 deletions data/json/construction.json
Original file line number Diff line number Diff line change
Expand Up @@ -4696,5 +4696,18 @@
"pre_note": "Will only work if constructed in/on a building that has an electric grid with a mounted battery.",
"pre_special": "check_empty",
"post_furniture": "f_floor_lamp_off"
},
{
"type": "construction",
"id": "constr_rewire_street_light",
"group": "rewire_street_light",
"category": "WORKSHOP",
"required_skills": [ [ "electronics", 4 ] ],
"time": "30 m",
"qualities": [ [ { "id": "WRENCH", "level": 1 } ], [ { "id": "SAW_M", "level": 1 } ], [ { "id": "SCREW", "level": 1 } ] ],
"components": [ [ [ "cable", 2 ] ], [ [ "amplifier", 2 ] ] ],
"pre_note": "Will only work if constructed in/on a building that has an electric grid with a mounted battery.",
"pre_furniture": "f_street_light",
"post_furniture": "f_street_light_rewired_off"
}
]
5 changes: 5 additions & 0 deletions data/json/construction_group.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@
"id": "build_floor_lamp",
"name": "Build floor lamp"
},
{
"type": "construction_group",
"id": "rewire_street_light",
"name": "Rewire Street Light"
},
{
"type": "construction_group",
"id": "build_improvised_shelter",
Expand Down
4 changes: 3 additions & 1 deletion data/json/external_tileset/External_Tileset_DP_Tall.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
{ "id": "corpse_mon_bear_armored", "fg": 3 },
{ "id": "t_tree_cherry_season_spring", "fg": 4 },
{ "id": "t_tree_cherry_harvested_season_spring", "fg": 5 },
{ "id": "t_tree_cherry_season_summer", "fg": 6 }
{ "id": "t_tree_cherry_season_summer", "fg": 6 },
{ "id": [ "f_street_light_rewired_off", "f_street_light_rewired" ], "fg": 7 },
{ "id": "f_street_light_rewired_on", "fg": 8 }
],
"sprite_width": 64,
"sprite_height": 80,
Expand Down
Binary file modified data/json/external_tileset/External_Tileset_DP_Tall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions data/json/furniture_and_terrain/furniture-appliances.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,89 @@
}
]
},
{
"type": "furniture",
"id": "f_street_light_rewired_off",
"copy-from": "f_floor_lamp_base",
"name": "rewired street light (off)",
"description": "A source of light used to illuminate streets and the surrounding area. It's been rewired to draw power from a local grid, but is currently switched off.",
"symbol": "Y",
"color": "light_gray",
"looks_like": "f_street_light",
"move_cost_mod": -1,
"coverage": 40,
"required_str": 32,
"flags": [ "BASHABLE" ],
"examine_action": "transform",
"transforms_into": "f_street_light_rewired_on",
"prompt": "Switch on the street light.",
"message": "You switch on the street light.",
"deconstruct": {
"items": [
{ "item": "pipe", "count": 8 },
{ "item": "sheet_metal", "count": 2 },
{ "item": "amplifier", "count": 6 },
{ "item": "light_bulb", "count": 2 },
{ "item": "cable", "charges": 6 },
{ "item": "plastic_chunk", "count": 4 }
]
},
"bash": {
"str_min": 30,
"str_max": 100,
"sound": "metal screeching!",
"sound_fail": "clang!",
"items": [
{ "item": "pipe", "count": [ 1, 7 ] },
{ "item": "scrap", "count": [ 3, 12 ] },
{ "item": "amplifier", "count": [ 1, 5 ] },
{ "item": "light_bulb", "count": [ 0, 2 ] },
{ "item": "cable", "charges": [ 1, 4 ] },
{ "item": "plastic_chunk", "count": [ 2, 4 ] }
]
}
},
{
"type": "furniture",
"id": "f_street_light_rewired",
"copy-from": "f_street_light_rewired_off",
"name": "rewired street light (no power)",
"description": "A source of light used to illuminate streets and the surrounding area. It's been rewired to draw power from a local grid, but lacks power at the moment.",
"symbol": "Y",
"color": "light_gray",
"looks_like": "f_street_light",
"examine_action": "transform",
"transforms_into": "f_street_light_rewired_off",
"prompt": "Switch off the street light.",
"message": "You switch off the street light.",
"active": [
"charge_watcher",
{ "min_power": 15, "transform": { "id": "f_street_light_rewired_on", "msg": "The street light lights up." } }
]
},
{
"type": "furniture",
"id": "f_street_light_rewired_on",
"copy-from": "f_street_light_rewired_off",
"name": "rewired street light (on)",
"description": "A source of light used to illuminate streets and the surrounding area. It's been rewired to draw power from a local grid, brightening up the night once again.",
"symbol": "Y",
"color": "yellow",
"looks_like": "f_street_light",
"examine_action": "transform",
"transforms_into": "f_street_light_rewired_off",
"prompt": "Switch off the street light.",
"message": "You switch off the street light.",
"light_emitted": 320,
"active": [
"steady_consumer",
{
"power": 1,
"consume_every": "50 s",
"transform": { "id": "f_street_light_rewired", "msg": "The street light flickers and dies." }
}
]
},
{
"type": "furniture",
"abstract": "f_glass_fridge_base",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Links to relevant pull requests, for content covered below:
- Buckler and welded shield: [#2878](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/2878)
- Battle masks and bronze arm guards:
[#3221](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3221)
- Rewired street lights: [3273](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3273)

## Undead People

Expand Down Expand Up @@ -79,3 +80,4 @@ Ultica are planned for the future.
- Scaled bear, including corpse. Monster specific to BN.
- Cherry tree uses summer sprite (plus cherry blossom coloration), summer sprite depicted without
berries, due to harvest season being moved in BN.
- Rewired street light, including active state. Furniture specific to BN.

0 comments on commit d6026df

Please sign in to comment.