[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 10:44:09 +02:00
committed by GitHub
parent c38ebd6f6d
commit 7f083e7cb6
25 changed files with 68 additions and 96 deletions
+3 -9
View File
@@ -145,7 +145,7 @@
var/static/list/blacklisted_turfs
/obj/structure/alien/weeds/Initialize()
/obj/structure/alien/weeds/Initialize(mapload)
pixel_x = -4
pixel_y = -4 //so the sprites line up right in the map editor
@@ -161,6 +161,7 @@
set_base_icon()
last_expand = world.time + rand(growth_cooldown_low, growth_cooldown_high)
AddElement(/datum/element/atmos_sensitive, mapload)
///Randomizes the weeds' starting icon, gets redefined by children for them not to share the behavior.
@@ -178,11 +179,6 @@
base_icon_state = "weeds3"
set_smoothed_icon_state(smoothing_junction)
/obj/structure/alien/weeds/ComponentInitialize()
. = ..()
AddElement(/datum/element/atmos_sensitive)
/obj/structure/alien/weeds/proc/expand()
var/turf/U = get_turf(src)
if(is_type_in_typecache(U, blacklisted_turfs))
@@ -286,9 +282,7 @@
if(status == BURST)
obj_integrity = integrity_failure * max_integrity
/obj/structure/alien/egg/ComponentInitialize()
. = ..()
AddElement(/datum/element/atmos_sensitive)
AddElement(/datum/element/atmos_sensitive, mapload)
/obj/structure/alien/egg/update_icon_state()
switch(status)
+2 -2
View File
@@ -244,9 +244,9 @@
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_PLASMA_WALLS)
canSmoothWith = list(SMOOTH_GROUP_PLASMA_WALLS)
/obj/structure/falsewall/plasma/ComponentInitialize()
/obj/structure/falsewall/plasma/Initialize(mapload)
. = ..()
AddElement(/datum/element/atmos_sensitive)
AddElement(/datum/element/atmos_sensitive, mapload)
/obj/structure/falsewall/plasma/attackby(obj/item/W, mob/user, params)
if(W.get_temperature() > 300)
+2 -2
View File
@@ -18,9 +18,9 @@
var/grille_type = null
var/broken_type = /obj/structure/grille/broken
/obj/structure/grille/ComponentInitialize()
/obj/structure/grille/Initialize(mapload)
. = ..()
AddElement(/datum/element/atmos_sensitive)
AddElement(/datum/element/atmos_sensitive, mapload)
/obj/structure/grille/Destroy()
update_cable_icons_on_turf(get_turf(src))
@@ -249,9 +249,9 @@
icon_state = "plasma"
sheetType = /obj/item/stack/sheet/mineral/plasma
/obj/structure/mineral_door/transparent/plasma/ComponentInitialize()
/obj/structure/mineral_door/transparent/plasma/Initialize(mapload)
. = ..()
AddElement(/datum/element/atmos_sensitive)
AddElement(/datum/element/atmos_sensitive, mapload)
/obj/structure/mineral_door/transparent/plasma/welder_act(mob/living/user, obj/item/I)
return
+2 -2
View File
@@ -91,9 +91,9 @@
name = "statue of a scientist"
icon_state = "sci"
/obj/structure/statue/plasma/ComponentInitialize()
/obj/structure/statue/plasma/Initialize(mapload)
. = ..()
AddElement(/datum/element/atmos_sensitive)
AddElement(/datum/element/atmos_sensitive, mapload)
/obj/structure/statue/plasma/bullet_act(obj/projectile/Proj)
var/burn = FALSE
+3 -3
View File
@@ -67,6 +67,7 @@
flags_1 |= ALLOW_DARK_PAINTS_1
RegisterSignal(src, COMSIG_OBJ_PAINTED, .proc/on_painted)
AddElement(/datum/element/atmos_sensitive, mapload)
var/static/list/loc_connections = list(
COMSIG_ATOM_EXIT = .proc/on_exit,
@@ -77,8 +78,7 @@
/obj/structure/window/ComponentInitialize()
. = ..()
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ,null,CALLBACK(src, .proc/can_be_rotated),CALLBACK(src,.proc/after_rotation))
AddElement(/datum/element/atmos_sensitive)
AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ,null,CALLBACK(src, .proc/can_be_rotated),CALLBACK(src,.proc/after_rotation))
/obj/structure/window/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
switch(the_rcd.mode)
@@ -498,7 +498,7 @@
glass_type = /obj/item/stack/sheet/plasmaglass
rad_insulation = RAD_NO_INSULATION
/obj/structure/window/plasma/ComponentInitialize()
/obj/structure/window/plasma/Initialize(mapload, direct)
. = ..()
RemoveElement(/datum/element/atmos_sensitive)