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

Allow players to flick utility lights on and off #1003

Merged
merged 1 commit into from
Oct 10, 2021

Conversation

chaosvolt
Copy link
Member

Summary

SUMMARY: Content "Add off state for utility lights, allow turning them on and off"

Purpose of change

A simple change making use of the transform feature introduced in #716, allowing players to turn utility lights off. Useful since it makes it less annoying trying to get some shuteye in places like the refugee center.

Describe the solution

Added a terrain entry for an off version of the utility light. Does not use copy-from for reasons mentioned below.

Describe alternatives you've considered

Could give the "concrete floor with overhead light" this feature too. It's not as useful since those tend to only show up in labs where players likely won't make a permanent base in anyway unless they're doing the lab challenge, plus presumably the switch would be either on the wall (not doable) or a hassle to reach. Could still do it if anyone requests however.

Testing

  1. Checked affected file for syntax and load errors.
  2. Ported file change over to test build and spawned in refugee center.
  3. Played with the lights, confirmed transformation goes as planned, that the inactive light has a sprite via looks_like, and that it actually lets you render a lit room dark.

Additional context

Side note, turns out that terrain doesn't properly inherit symbol and color when using copy-from. It also seems that flags don't inherit properly either (TRANSPARENT at minimum visibly did not inherit right), so I quickly discarded my initial idea of using copy-from for it.

@Coolthulhu Coolthulhu self-assigned this Oct 10, 2021
@Coolthulhu
Copy link
Member

Ter/furn loading is copy-from-unfriendly. That could use fixing someday. Also constructions.

@Coolthulhu Coolthulhu merged commit 7011045 into cataclysmbnteam:upload Oct 10, 2021
@chaosvolt
Copy link
Member Author

Recipes are also fucky when it comes to copy-from if I recall, which is a potential problem because the repo does use copy-from for a handful of recipes but avoids using the properties that don't carry over. Mainly an issue since it can and has led to contributors copying from recipes and not recently which properties don't carry over (this happened with uncrafts for badges a while back for example, if I recall).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants