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

areas_without_lighting in time_of_day_change.dm #2022

Open
valzargaming opened this issue Mar 27, 2023 · 0 comments
Open

areas_without_lighting in time_of_day_change.dm #2022

valzargaming opened this issue Mar 27, 2023 · 0 comments

Comments

@valzargaming
Copy link
Collaborator

var/areacheck = TRUE
if (map)
for (var/area_type in map.areas_without_lighting)
if (istype(a, area_type))
areacheck = FALSE
break
if (a && a.dynamic_lighting && areacheck && (!map || !map.zlevels_without_lighting.Find(T.z)))
T.adjust_lighting_overlay_to_daylight()

Does the first segment of this code have any purpose at all? It seems to be just taking up time iterating through turfs and could be removed in favor of this simplified codes nippet.

if (a && a.dynamic_lighting && (!map || !map.zlevels_without_lighting.Find(T.z)))
	T.adjust_lighting_overlay_to_daylight()
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

No branches or pull requests

1 participant