-
Notifications
You must be signed in to change notification settings - Fork 840
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
Makes lights auto-rotate to walls #17261
base: master
Are you sure you want to change the base?
Conversation
should have used TRUE not true
code/modules/power/lighting.dm
Outdated
return | ||
if(isclosedturf(get_turf(loc))) | ||
return | ||
for(var/i in CARDINAL_DIRS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name this something like direction
code/modules/power/lighting.dm
Outdated
for(var/i in CARDINAL_DIRS) | ||
if(!isclosedturf(get_step(loc, i))) | ||
continue | ||
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary else
Isn't this adding a bunch of init time stuff for something that should be in the map integration checks or something? |
Assuming you even could have the integration tests check for walls around every single light in every single map, I'm not sure it would be worth the added check time. I should really run the profiler and try to see how many seconds of init that this PR adds, but it's probably less than annoying than waiting an additional hour (half hour?) every time you want to run tests because every single light fixture needs checked. |
It shouldn't add any more time, map checks already load the maps, it would just be reporting a failure if the conditions you've setup get met |
Eh, I'm willing to budge and close this PR if there's a map check that works. I still think this is easier for mappers though, since a non-trivial percentage of them would probably be deeply annoyed at being forced into hunting down lights by coordinate since the checks are yelling at them. |
About The Pull Request
I did something similar to posters when porting Hybrisa, this PR makes lights automatically rotate to be against a wall if their rotation would leave them hanging out in the middle of space.
As long as your fixture is properly rotated this PR shouldn't affect you.
Closes #17188
Why It's Good For The Game
Mapper quality of life good, should entirely eliminate mapping errors involving improperly rotated lights, unless they're out in the middle of nowhere with no walls around.
Changelog
🆑
add: Added a system to auto-rotate light fixtures to avoid mapping errors.
/:cl: