[MIRROR] Finish Machinery new to init (#10439)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-03-16 07:44:59 -07:00
committed by GitHub
parent 23d8f3fc97
commit c844cc3dee
113 changed files with 488 additions and 532 deletions

View File

@@ -28,16 +28,16 @@
qdel(src)
return
/obj/machinery/shield/New()
/obj/machinery/shield/Initialize(mapload)
src.set_dir(pick(1,2,3,4))
..()
. = ..()
update_nearby_tiles(need_rebuild=1)
/obj/machinery/shield/Destroy()
opacity = 0
density = FALSE
update_nearby_tiles()
..()
. = ..()
/obj/machinery/shield/attackby(obj/item/W as obj, mob/user as mob)
if(!istype(W)) return

View File

@@ -151,8 +151,7 @@
var/field_dir = get_dir(T2,get_step(T2, NSEW))
T = get_step(T2, NSEW)
T2 = T
var/obj/machinery/shieldwall/CF = new/obj/machinery/shieldwall/(src, G) //(ref to this gen, ref to connected gen)
CF.loc = T
var/obj/machinery/shieldwall/CF = new/obj/machinery/shieldwall(T, src, G) //(ref to this gen, ref to connected gen)
CF.set_dir(field_dir)
@@ -239,19 +238,19 @@
var/power_usage = 2500 //how much power it takes to sustain the shield
var/generate_power_usage = 7500 //how much power it takes to start up the shield
/obj/machinery/shieldwall/New(var/obj/machinery/shieldwallgen/A, var/obj/machinery/shieldwallgen/B)
..()
/obj/machinery/shieldwall/Initialize(mapload, var/obj/machinery/shieldwallgen/A, var/obj/machinery/shieldwallgen/B)
. = ..()
update_nearby_tiles()
src.gen_primary = A
src.gen_secondary = B
if(A && B && A.active && B.active)
if(istype(A) && istype(B) && A.active && B.active)
needs_power = 1
if(prob(50))
A.storedpower -= generate_power_usage
else
B.storedpower -= generate_power_usage
else
qdel(src) //need at least two generator posts
return INITIALIZE_HINT_QDEL
/obj/machinery/shieldwall/Destroy()
update_nearby_tiles()

View File

@@ -16,9 +16,6 @@
/obj/machinery/shield_diffuser/Initialize(mapload)
. = ..()
// TODO - Remove this bit once machines are converted to Initialize
if(ispath(circuit))
circuit = new circuit(src)
default_apply_parts()
var/turf/T = get_turf(src)

View File

@@ -54,9 +54,6 @@
. = ..()
if(!wires)
wires = new(src)
// TODO - Remove this bit once machines are converted to Initialize
if(ispath(circuit))
circuit = new circuit(src)
default_apply_parts()
connect_to_network()