Revert "[MIRROR] /atom New() => Initialize() [MDB IGNORE]"

This commit is contained in:
Novacat
2022-08-27 08:49:56 -04:00
committed by GitHub
parent 0be7af4774
commit 1aa4c73e8d
599 changed files with 3329 additions and 4983 deletions
+2 -2
View File
@@ -16,7 +16,7 @@
var/x_offset = 0 // Offset from the 'center' of where the projector is, so that if it moves, the shield can recalc its position.
var/y_offset = 0 // Ditto.
/obj/effect/directional_shield/Initialize(var/ml, var/new_projector)
/obj/effect/directional_shield/New(var/newloc, var/new_projector)
if(new_projector)
projector = new_projector
var/turf/us = get_turf(src)
@@ -26,7 +26,7 @@
y_offset = us.y - them.y
else
update_color()
. = ..(ml)
..(newloc)
/obj/effect/directional_shield/proc/relocate()
if(!projector)
+3 -3
View File
@@ -28,16 +28,16 @@
qdel(src)
return
/obj/machinery/shield/Initialize()
/obj/machinery/shield/New()
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/weapon/W as obj, mob/user as mob)
if(!istype(W)) return
+2 -2
View File
@@ -24,8 +24,8 @@
var/ticks_recovering = 10
var/max_strength = 10
/obj/effect/energy_field/Initialize(var/ml, var/new_gen)
. = ..(ml)
/obj/effect/energy_field/New(var/newloc, var/new_gen)
..(newloc)
my_gen = new_gen
update_nearby_tiles()
+1 -1
View File
@@ -10,8 +10,8 @@
/obj/item/weapon/shield_diffuser/Initialize()
cell = new(src)
. = ..()
cell = new(src)
/obj/item/weapon/shield_diffuser/Destroy()
QDEL_NULL(cell)
+5 -5
View File
@@ -151,7 +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, src, G) //(ref to this gen, ref to connected gen)
var/obj/machinery/shieldwall/CF = new/obj/machinery/shieldwall/(src, G) //(ref to this gen, ref to connected gen)
CF.loc = T
CF.set_dir(field_dir)
@@ -239,19 +239,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/Initialize(var/ml, var/obj/machinery/shieldwallgen/A, var/obj/machinery/shieldwallgen/B)
. = ..(ml)
/obj/machinery/shieldwall/New(var/obj/machinery/shieldwallgen/A, var/obj/machinery/shieldwallgen/B)
..()
update_nearby_tiles()
src.gen_primary = A
src.gen_secondary = B
if(istype(A) && istype(B) && A.active && B.active)
if(A && B && A.active && B.active)
needs_power = 1
if(prob(50))
A.storedpower -= generate_power_usage
else
B.storedpower -= generate_power_usage
else
return INITIALIZE_HINT_QDEL
qdel(src) //need at least two generator posts
/obj/machinery/shieldwall/Destroy()
update_nearby_tiles()
@@ -16,6 +16,11 @@
/obj/machinery/shield_diffuser/Initialize()
. = ..()
// 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)
hide(!T.is_plating())