mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
All atoms changing opacity will recalculate visibility (#10352)
This commit is contained in:
@@ -1,20 +1,19 @@
|
||||
//UPDATE TRIGGERS, when the chunk (and the surrounding chunks) should update.
|
||||
|
||||
// TURFS
|
||||
|
||||
/proc/updateVisibility(atom/A, var/opacity_check = TRUE)
|
||||
if(SSticker)
|
||||
for(var/datum/visualnet/VN in visual_nets)
|
||||
VN.update_visibility(A, opacity_check)
|
||||
|
||||
/turf/drain_power()
|
||||
return -1
|
||||
|
||||
/atom/Destroy()
|
||||
if(opacity)
|
||||
updateVisibility(src)
|
||||
. = ..()
|
||||
|
||||
/atom/set_opacity()
|
||||
. = ..()
|
||||
if(.)
|
||||
updateVisibility(src, FALSE)
|
||||
|
||||
/atom/movable/Move()
|
||||
. = ..()
|
||||
@@ -26,16 +25,6 @@
|
||||
if(opacity && .)
|
||||
updateVisibility(src)
|
||||
|
||||
// DOORS
|
||||
|
||||
// Simply updates the visibility of the area when it opens/closes/destroyed.
|
||||
/obj/machinery/door/update_nearby_tiles(need_rebuild)
|
||||
. = ..(need_rebuild)
|
||||
// Glass door glass = 1
|
||||
// don't check then?
|
||||
if(!glass)
|
||||
updateVisibility(src, FALSE)
|
||||
|
||||
/turf/ChangeTurf()
|
||||
. = ..()
|
||||
if(.)
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
// If drain_check is set it will not actually drain power, just return a value.
|
||||
// If surge is set, it will destroy/damage the recipient and not return any power.
|
||||
// Not sure where to define this, so it can sit here for the rest of time.
|
||||
/atom/proc/drain_power(var/drain_check,var/surge, var/amount = 0)
|
||||
/atom/proc/drain_power(var/drain_check, var/surge, var/amount = 0)
|
||||
return -1
|
||||
|
||||
// Show a message to all mobs and objects in earshot of this one
|
||||
|
||||
Reference in New Issue
Block a user