mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-24 09:02:27 +00:00
Overmap sensors overhaul (#15666)
This commit is contained in:
9
code/_helpers/overmap.dm
Normal file
9
code/_helpers/overmap.dm
Normal file
@@ -0,0 +1,9 @@
|
||||
var/datum/overmap_sectors = list()
|
||||
var/datum/overmaps_by_name = list()
|
||||
var/datum/overmaps_by_z = list()
|
||||
|
||||
/proc/get_empty_zlevel(var/base_turf_type)
|
||||
if(base_turf_type && base_turf_type != world.turf)
|
||||
for(var/turf/T as anything in block(locate(1, 1, .),locate(world.maxx, world.maxy, .)))
|
||||
T.ChangeTurf(base_turf_type)
|
||||
return world.maxz
|
||||
@@ -9,6 +9,10 @@
|
||||
/proc/cmp_filter_data_priority(list/A, list/B)
|
||||
return A["priority"] - B["priority"]
|
||||
|
||||
// Defining this for future proofing and ease of searching for erroneous usage.
|
||||
/image/proc/add_filter(filter_name, priority, list/params)
|
||||
filters += filter(arglist(params))
|
||||
|
||||
/atom/movable/proc/add_filter(filter_name, priority, list/params)
|
||||
LAZYINITLIST(filter_data)
|
||||
var/list/p = params.Copy()
|
||||
@@ -46,13 +50,13 @@
|
||||
var/list/monkeypatched_params = params.Copy()
|
||||
monkeypatched_params.Insert(1, null)
|
||||
var/index = filter_data.Find(filter_name)
|
||||
|
||||
|
||||
// First, animate ourselves.
|
||||
monkeypatched_params[1] = filters[index]
|
||||
monkeypatched_params[1] = filters[index]
|
||||
animate(arglist(monkeypatched_params))
|
||||
|
||||
// If we're being copied by Z-Mimic, update mimics too.
|
||||
if (bound_overlay)
|
||||
for (var/atom/movable/AM as anything in get_above_oo())
|
||||
monkeypatched_params[1] = AM.filters[index]
|
||||
animate(arglist(monkeypatched_params))
|
||||
animate(arglist(monkeypatched_params))
|
||||
|
||||
Reference in New Issue
Block a user