Convert a fuck ton of machines to Initialize() (#2985)

Needs testing, but shouldn't break anything. Also adds Destroy() to the SMES base class.
This commit is contained in:
Lohikar
2017-07-14 20:08:59 +03:00
committed by skull132
parent 12ccc4e7a7
commit b5472e50f4
43 changed files with 104 additions and 116 deletions
+8 -6
View File
@@ -19,13 +19,15 @@
var/charge_rate = 100000 //100 kW
var/obj/machinery/shield_gen/owned_gen
/obj/machinery/shield_capacitor/New()
spawn(10)
for(var/obj/machinery/shield_gen/possible_gen in range(1, src))
if(get_dir(src, possible_gen) == src.dir)
possible_gen.owned_capacitor = src
break
/obj/machinery/shield_capacitor/Initialize()
..()
return INITIALIZE_HINT_LATELOAD
/obj/machinery/shield_capacitor/LateInitialize()
for(var/obj/machinery/shield_gen/possible_gen in range(1, src))
if(get_dir(src, possible_gen) == src.dir)
possible_gen.owned_capacitor = src
break
/obj/machinery/shield_capacitor/emag_act(var/remaining_charges, var/mob/user)
if(prob(75))
@@ -4,9 +4,6 @@
/obj/machinery/shield_gen/external
name = "hull shield generator"
/obj/machinery/shield_gen/external/New()
..()
//NOT MULTIZ COMPATIBLE
//Search for space turfs within range that are adjacent to a simulated turf.
/obj/machinery/shield_gen/external/get_shielded_turfs()