mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-21 15:51:31 +00:00
You brought this upon yourself botany (#21117)
This commit is contained in:
@@ -32,7 +32,10 @@
|
||||
/datum/light_source/New(atom/owner, atom/top)
|
||||
source_atom = owner // Set our new owner.
|
||||
LAZYADD(source_atom.light_sources, src)
|
||||
top_atom = top
|
||||
if(top.flags_2 & BLOCKS_LIGHT_2) // If the top atom blocks light, then our owner becomes the topmost instead. This still allows atoms that block light to be a light of their own.
|
||||
top_atom = source_atom
|
||||
else
|
||||
top_atom = top
|
||||
if(top_atom != source_atom)
|
||||
LAZYADD(top_atom.light_sources, src)
|
||||
|
||||
@@ -77,7 +80,10 @@
|
||||
if(top_atom != source_atom && top_atom.light_sources) // Remove ourselves from the light sources of that top atom.
|
||||
LAZYREMOVE(top_atom.light_sources, src)
|
||||
|
||||
top_atom = new_top_atom
|
||||
if(new_top_atom.flags_2 & BLOCKS_LIGHT_2)
|
||||
top_atom = source_atom
|
||||
else
|
||||
top_atom = new_top_atom
|
||||
|
||||
if(top_atom != source_atom)
|
||||
LAZYADD(top_atom.light_sources, src) // Add ourselves to the light sources of our new top atom.
|
||||
|
||||
Reference in New Issue
Block a user