mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Makes syndicate depot structures Initialize() (#15120)
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
name = "sentry mine"
|
||||
|
||||
/obj/effect/mine/depot/mineEffect(mob/living/victim)
|
||||
var/area/syndicate_depot/core/depotarea = areaMaster
|
||||
var/area/syndicate_depot/core/depotarea = get_area(src)
|
||||
if(istype(depotarea))
|
||||
if(depotarea.mine_triggered(victim))
|
||||
explosion(loc, 1, 0, 0, 1) // devastate the tile you are on, but leave everything else untouched
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/syndicate/depot/proc/loot_pickup()
|
||||
if(!ignore_use)
|
||||
var/area/syndicate_depot/core/depotarea = areaMaster
|
||||
var/area/syndicate_depot/core/depotarea = get_area(src)
|
||||
if(istype(depotarea))
|
||||
depotarea.locker_looted()
|
||||
if(is_armory)
|
||||
|
||||
@@ -9,17 +9,16 @@
|
||||
var/area/syndicate_depot/core/depotarea
|
||||
var/has_overloaded = FALSE
|
||||
|
||||
/obj/structure/fusionreactor/New()
|
||||
/obj/structure/fusionreactor/Initialize(mapload)
|
||||
. = ..()
|
||||
// Do not attempt to put the code below into Initialize() or even LateInitialize() with a "return INITIALIZE_HINT_LATELOAD". It won't work!
|
||||
depotarea = areaMaster
|
||||
depotarea = get_area(src)
|
||||
if(istype(depotarea))
|
||||
depotarea.reactor = src
|
||||
for(var/obj/machinery/porta_turret/syndicate/T in range(50, loc))
|
||||
if(!istype(T.depotarea))
|
||||
T.depotarea = depotarea
|
||||
else
|
||||
log_debug("[src] at [x],[y],[z] failed depotarea istype check during New()! Either it was spawned outside the depot area (bad idea), or a bug is happening.")
|
||||
log_debug("[src] at [x],[y],[z] failed depotarea istype check during Initialize()! Either it was spawned outside the depot area (bad idea), or a bug is happening.")
|
||||
|
||||
/obj/structure/fusionreactor/Destroy()
|
||||
if(istype(depotarea))
|
||||
@@ -81,18 +80,17 @@
|
||||
var/max_cycles = 10
|
||||
var/area/syndicate_depot/core/depotarea
|
||||
|
||||
/obj/effect/overload/New()
|
||||
/obj/effect/overload/Initialize(mapload)
|
||||
. = ..()
|
||||
// Do not attempt to put the code below into Initialize() or even LateInitialize() with a "return INITIALIZE_HINT_LATELOAD". It won't work!
|
||||
START_PROCESSING(SSobj, src)
|
||||
depotarea = areaMaster
|
||||
depotarea = get_area(src)
|
||||
if(istype(depotarea))
|
||||
if(!depotarea.used_self_destruct)
|
||||
depotarea.used_self_destruct = TRUE // Silences all further alerts from this point onwards.
|
||||
depotarea.updateicon()
|
||||
depotarea.shields_down()
|
||||
else
|
||||
log_debug("[src] at [x],[y],[z] failed depotarea istype check during New()! Either it was spawned outside the depot area (bad idea), or a bug is happening.")
|
||||
log_debug("[src] at [x],[y],[z] failed depotarea istype check during Initialize()! Either it was spawned outside the depot area (bad idea), or a bug is happening.")
|
||||
|
||||
/obj/effect/overload/process()
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -103,7 +101,7 @@
|
||||
return
|
||||
|
||||
if(!istype(depotarea))
|
||||
depotarea = areaMaster
|
||||
depotarea = get_area(src)
|
||||
if(istype(depotarea))
|
||||
depotarea.destroyed = TRUE
|
||||
depotarea.updateicon()
|
||||
|
||||
Reference in New Issue
Block a user