mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user