Files
Polaris/code/modules/mob/freelook/update_triggers.dm
MistakeNot4892 b22a0568a3 Sideports a couple of init unit tests from Neb. (#7893)
* Sideports a couple of init unit tests from Neb.

* Trying to unfuck initialize logic.

* Removing del()s.

* Adjusting return values to Initialize().

* Moving some dangerous object logic from obj onto the two types that use it.

* Rolling back some init changes and commenting out initialized atom unit test.

* this comment formatting is a minor war crime

* Removed sleep() from signaler circuit Initialize().

* Additional Init fixes post-rebase.

* Uncomments subsystem test since that's passing.
2021-02-21 12:03:34 -09:00

53 lines
995 B
Plaintext

//UPDATE TRIGGERS, when the chunk (and the surrounding chunks) should update.
// TURFS
/proc/updateVisibility(atom/A, var/opacity_check = 1)
if(ticker)
for(var/datum/visualnet/VN in visual_nets)
VN.updateVisibility(A, opacity_check)
/turf
var/list/image/obfuscations
/turf/drain_power()
return -1
/turf/simulated/Destroy()
updateVisibility(src)
return ..()
/turf/simulated/Initialize()
. = ..()
updateVisibility(src)
// STRUCTURES
/obj/structure/Destroy()
updateVisibility(src)
return ..()
/obj/structure/New()
..()
updateVisibility(src)
// EFFECTS
/obj/effect/Destroy()
updateVisibility(src)
return ..()
/obj/effect/Initialize()
. = ..()
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, 0)