[MIRROR] Converts the atmos senstive component over to connect_loc (#5376)

* Converts the atmos senstive component over to connect_loc (#58266)

* Makes all uses of atmos_senstive pass in mapload as context

* Converts atmos senstive to connect_loc, does some general cleanup to the element, and makes it check the state of the tile the thing is on assuming creation didn't happen as a part of map loading

* Updates connect loc to match the new arg list

* Converts the atmos senstive component over to connect_loc

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-05-01 09:44:09 +01:00
committed by GitHub
co-authored by LemonInTheDark
parent c38ebd6f6d
commit 7f083e7cb6
25 changed files with 68 additions and 96 deletions
+2 -4
View File
@@ -284,6 +284,8 @@
/obj/machinery/power/apc/Initialize(mapload)
. = ..()
AddElement(/datum/element/atmos_sensitive, mapload)
if(!mapload)
return
has_electronics = APC_ELECTRONICS_SECURED
@@ -312,10 +314,6 @@
addtimer(CALLBACK(src, .proc/update), 5)
/obj/machinery/power/apc/ComponentInitialize()
. = ..()
AddElement(/datum/element/atmos_sensitive)
/obj/machinery/power/apc/should_atmos_process(datum/gas_mixture/air, exposed_temperature)
return (exposed_temperature > 2000)
+1 -4
View File
@@ -357,6 +357,7 @@
cell = new/obj/item/stock_parts/cell/emergency_light(src)
RegisterSignal(src, COMSIG_LIGHT_EATER_ACT, .proc/on_light_eater)
AddElement(/datum/element/atmos_sensitive, mapload)
return INITIALIZE_HINT_LATELOAD
/obj/machinery/light/LateInitialize()
@@ -372,10 +373,6 @@
break_light_tube(1)
addtimer(CALLBACK(src, .proc/update, 0), 1)
/obj/machinery/light/ComponentInitialize()
. = ..()
AddElement(/datum/element/atmos_sensitive)
/obj/machinery/light/Destroy()
var/area/A = get_area(src)
if(A)