mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-22 20:56:33 +01:00
move filter_data to atoms def, add get_overlays
This commit is contained in:
@@ -222,6 +222,32 @@ var/global/image/appearance_bro = new() // Temporarily super-global because of B
|
||||
else if(cut_old)
|
||||
cut_overlays()
|
||||
|
||||
/**
|
||||
* Returns a list of overlays that the target atom has
|
||||
*
|
||||
* @param priority If true, returns priority overlays as well
|
||||
* @param special If true, returns special overlays like emissives and em_blockers
|
||||
*/
|
||||
/proc/get_overlays(atom/other, priority, special)
|
||||
var/list/including = list()
|
||||
if(!other)
|
||||
return including
|
||||
|
||||
for(var/image/I as anything in other.our_overlays)
|
||||
if(!special && I.plane > 0)
|
||||
continue
|
||||
including += I
|
||||
|
||||
if(!priority)
|
||||
return including
|
||||
|
||||
for(var/image/I as anything in other.priority_overlays)
|
||||
if(!special && I.plane > 0)
|
||||
continue
|
||||
including += I
|
||||
|
||||
return including
|
||||
|
||||
#undef NOT_QUEUED_ALREADY
|
||||
#undef QUEUE_FOR_COMPILE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user