[MIRROR] Refactors the notransform variable into a trait. [MDB IGNORE] (#23566)

* Refactors the `notransform` variable into a trait.

* Update robot_upgrades.dm

* modular

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-09-07 20:24:59 -04:00
committed by GitHub
co-authored by san7890 Bloop
parent 990f16796a
commit 71da4ca73f
43 changed files with 191 additions and 192 deletions
@@ -480,14 +480,14 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999))
entered_light.end_processing()
. = ..()
if(ismob(arrived))
var/mob/M = arrived
M.notransform = TRUE
var/mob/target = arrived
ADD_TRAIT(target, TRAIT_NO_TRANSFORM, REF(src))
/obj/item/abstracthotelstorage/Exited(atom/movable/gone, direction)
. = ..()
if(ismob(gone))
var/mob/M = gone
M.notransform = FALSE
var/mob/target = gone
REMOVE_TRAIT(target, TRAIT_NO_TRANSFORM, REF(src))
if(istype(gone, /obj/machinery/light))
var/obj/machinery/light/exited_light = gone
exited_light.begin_processing()