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

Add a construction to convert street lights to use local power #3273

Conversation

chaosvolt
Copy link
Member

@chaosvolt chaosvolt commented Sep 26, 2023

Summary

SUMMARY: Content "Add a construction entry for converting street lights to use local grid power as a lighting option"

Purpose of change

This adds what was going to be the highlight (heh) of #3265 before the sheer number of locations to give street lights to quickly became two PRs (one still yet to be written) worth of work alone.

Describe the solution

  1. Added furniture for rewired street lights, when turned on provide twice the light of floor lamps and draw power twice as fast.
  2. Added construction and construction group for rewiring a street light. Idea is making use of existing cables to connect to whatever infrastructure the survivor has jury-rigged to power their base with, should they choose a location that already has a street light already handy. Includes amplifiers to adjust for different voltage and a small amount of added wiring.
  3. Added sprites for rewired lamp to UDP external tileset.
  4. Updated documentation of external tileset accordingly.

As I found out, for some reason it doesn't work right if it inherits from normal street lights, but making it inherit from f_floor_lamp_base while overriding basically all the properties the abstract defines which should thus be the same net effect? That's fine somehow, fucking weird.

My guess is because street lights are in furniture-terrains.json and might thus count as a later file in the load order, a rare case of load order being more fiddly than normal.

Describe alternatives you've considered

  1. Messing with the skill requirement of rewiring to be more involved in some way.
  2. Just letting you build you own big-ass light towers.

Testing

  1. Load-tested in compiled build.
  2. Spawned in a street light at an evac shelter and converted it.
  3. Tested turning it on and off, works as expected.

Additional context

Lamp off, daytime:
image

Lamp on, nighttime:
image

@github-actions github-actions bot added the JSON related to game datas in JSON format. label Sep 26, 2023
@chaosvolt chaosvolt marked this pull request as ready for review September 26, 2023 19:52
@scarf005 scarf005 self-assigned this Sep 26, 2023
@scarf005 scarf005 self-requested a review September 26, 2023 23:02
Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2023-09-27_13-20-47.mp4

nice. wish it would auto turn on/off when it's night/day, but that's probably very Lua

@scarf005 scarf005 added this pull request to the merge queue Sep 27, 2023
Merged via the queue into cataclysmbnteam:upload with commit d6026df Sep 27, 2023
12 checks passed
@chaosvolt chaosvolt deleted the this-machine-attracts-moths-2-moth-harder branch September 27, 2023 04:38
scarf005 pushed a commit to scarf005/Cataclysm-BN that referenced this pull request Sep 28, 2023
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JSON related to game datas in JSON format.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants