mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-04 14:33:30 +00:00
move filter_data to atoms def, add get_overlays
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
// These involve BYOND's built in filters that do visual effects, and not stuff that distinguishes between things.
|
||||
|
||||
// All of this ported from TG.
|
||||
/atom/movable
|
||||
var/list/filter_data // For handling persistent filters
|
||||
|
||||
/proc/cmp_filter_data_priority(list/A, list/B)
|
||||
return A["priority"] - B["priority"]
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -26,8 +26,15 @@
|
||||
///Chemistry.
|
||||
|
||||
// Overlays
|
||||
var/list/our_overlays //our local copy of (non-priority) overlays without byond magic. Use procs in SSoverlays to manipulate
|
||||
var/list/priority_overlays //overlays that should remain on top and not normally removed when using cut_overlay functions, like c4.
|
||||
///Our local copy of (non-priority) overlays without byond magic. Use procs in SSoverlays to manipulate
|
||||
var/list/our_overlays
|
||||
///Overlays that should remain on top and not normally removed when using cut_overlay functions, like c4.
|
||||
var/list/priority_overlays
|
||||
///vis overlays managed by SSvis_overlays to automaticaly turn them like other overlays
|
||||
var/list/managed_vis_overlays
|
||||
|
||||
///Our local copy of filter data so we can add/remove it
|
||||
var/list/filter_data
|
||||
|
||||
//Detective Work, used for the duplicate data points kept in the scanners
|
||||
var/list/original_atom
|
||||
|
||||
Reference in New Issue
Block a user