diff --git a/archive/maps/gateway_archive_vr/labyrinth.dm b/archive/maps/gateway_archive_vr/labyrinth.dm
index 07f9a05a3f..708079b657 100644
--- a/archive/maps/gateway_archive_vr/labyrinth.dm
+++ b/archive/maps/gateway_archive_vr/labyrinth.dm
@@ -89,10 +89,11 @@
name = "Catacombs"
desc = "In a temple like this, these doors could be booby trapped..."
-/obj/machinery/door/airlock/vault/temple/New()
+/obj/machinery/door/airlock/vault/temple/Initialize(mapload)
+ . = ..()
if(prob(33))
new /obj/structure/falsewall/cultspecial(src.loc)
- qdel(src)
+ return INITIALIZE_HINT_QDEL
if(prob(33))
safe = 0
if(prob(33))
diff --git a/archive/maps/submaps/depreciated_vr/talon.dm b/archive/maps/submaps/depreciated_vr/talon.dm
index a6143d0c64..3d5b2205f4 100644
--- a/archive/maps/submaps/depreciated_vr/talon.dm
+++ b/archive/maps/submaps/depreciated_vr/talon.dm
@@ -5,9 +5,9 @@ var/global/list/latejoin_talon = list()
name = "JoinLateTalon"
delete_me = 1
-/obj/effect/landmark/talon/New()
+/obj/effect/landmark/talon/Initialize(mapload)
+ . = ..()
latejoin_talon += loc // Register this turf as tram latejoin.
- ..()
/datum/spawnpoint/talon
display_name = "ITV Talon Cryo"
@@ -175,8 +175,8 @@ Once in open space, consider disabling nonessential power-consuming electronics
. = ..()
access = list(access_talon, access_synth)
-/obj/machinery/power/smes/buildable/offmap_spawn/New()
- ..(1)
+/obj/machinery/power/smes/buildable/offmap_spawn/Initialize(mapload)
+ . = ..()
charge = 1e7
RCon = TRUE
input_level = input_level_max
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 9a4058873b..b2c0608cf6 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -707,17 +707,20 @@
plane = PLANE_PLAYER_HUD_ABOVE
var/client/holder
-/obj/screen/splash/New(client/C, visible)
+INITIALIZE_IMMEDIATE(/obj/screen/splash)
+/obj/screen/splash/Initialize(mapload, visible)
. = ..()
- holder = C
+ if(!isclient(loc))
+ return INITIALIZE_HINT_QDEL
+
+ holder = loc
if(!visible)
alpha = 0
if(!lobby_image)
- qdel(src)
- return
+ return INITIALIZE_HINT_QDEL
icon = lobby_image.icon
icon_state = lobby_image.icon_state
diff --git a/code/game/gamemodes/technomancer/spells/insert/asphyxiation.dm b/code/game/gamemodes/technomancer/spells/insert/asphyxiation.dm
index 51fe210fe7..d5996cb855 100644
--- a/code/game/gamemodes/technomancer/spells/insert/asphyxiation.dm
+++ b/code/game/gamemodes/technomancer/spells/insert/asphyxiation.dm
@@ -18,26 +18,34 @@
// maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() - halloss
/obj/item/inserted_spell/asphyxiation/on_insert()
- spawn(1)
- if(ishuman(host))
- var/mob/living/carbon/human/H = host
- if(H.isSynthetic() || H.does_not_breathe) // It's hard to choke a robot or something that doesn't breathe.
- on_expire()
- return
- to_chat(H, span_warning("You are having difficulty breathing!"))
- var/pulses = 3
- var/warned_victim = 0
- while(pulses)
- if(!warned_victim)
- warned_victim = predict_crit(pulses, H, 0)
- sleep(4 SECONDS)
- H.adjustOxyLoss(5)
- var/health_lost = H.getMaxHealth() - H.getOxyLoss() + H.getToxLoss() + H.getFireLoss() + H.getBruteLoss() + H.getCloneLoss()
- H.adjustOxyLoss(round(abs(health_lost * 0.25)))
- //to_world("Inflicted [round(abs(health_lost * 0.25))] damage!")
- pulses--
- if(src) //We might've been dispelled at this point and deleted, better safe than sorry.
- on_expire()
+ if(ishuman(host))
+ var/mob/living/carbon/human/H = host
+ if(H.isSynthetic() || H.does_not_breathe) // It's hard to choke a robot or something that doesn't breathe.
+ on_expire()
+ return
+ to_chat(H, span_warning("You are having difficulty breathing!"))
+ var/pulses = 3
+ var/warned_victim = 0
+ if(!warned_victim)
+ warned_victim = predict_crit(pulses, H, 0)
+
+ looped_insert(3, H, warned_victim)
+
+
+/obj/item/inserted_spell/mend_wires/looped_insert(remaining_callbacks, mob/living/carbon/human/H, var/warned)
+ if(H)
+ remaining_callbacks --
+ H.adjustOxyLoss(5)
+ var/health_lost = H.getMaxHealth() - H.getOxyLoss() + H.getToxLoss() + H.getFireLoss() + H.getBruteLoss() + H.getCloneLoss()
+ H.adjustOxyLoss(round(abs(health_lost * 0.25)))
+
+ if(remaining_callbacks > 0)
+ if(!warned)
+ warned = predict_crit(pulses, H, 0)
+ addtimer(CALLBACK(src, PROC_REF(looped_insert), remaining_callbacks, H, warned), 4 SECONDS, TIMER_DELETE_ME)
+ return
+
+ on_expire()
/obj/item/inserted_spell/asphyxiation/on_expire()
..()
diff --git a/code/game/gamemodes/technomancer/spells/insert/insert.dm b/code/game/gamemodes/technomancer/spells/insert/insert.dm
index ec28e185f8..eaa0970553 100644
--- a/code/game/gamemodes/technomancer/spells/insert/insert.dm
+++ b/code/game/gamemodes/technomancer/spells/insert/insert.dm
@@ -20,18 +20,21 @@
var/mob/living/host = null
var/spell_power_at_creation = 1.0 // This is here because the spell object that made this object probably won't exist.
-/obj/item/inserted_spell/New(var/newloc, var/user, var/obj/item/spell/insert/inserter)
- ..(newloc)
- host = newloc
+/obj/item/inserted_spell/Initialize(mapload, var/user, var/obj/item/spell/insert/inserter)
+ . = ..()
+ host = loc
origin = user
if(light_color)
- spawn(1)
- set_light(inserter.spell_light_range, inserter.spell_light_intensity, inserter.spell_color)
+ set_light(inserter.spell_light_range, inserter.spell_light_intensity, inserter.spell_color)
on_insert()
/obj/item/inserted_spell/proc/on_insert()
return
+/obj/item/inserted_spell/proc/looped_insert(var/remaining_callbacks, var/mob/living/carbon/human/H)
+ PROTECTED_RPOC(TRUE)
+ return
+
/obj/item/inserted_spell/proc/on_expire(var/dispelled = 0)
qdel(src)
return
diff --git a/code/game/gamemodes/technomancer/spells/insert/mend_burns.dm b/code/game/gamemodes/technomancer/spells/insert/mend_burns.dm
index 365dd18616..2efdc440d3 100644
--- a/code/game/gamemodes/technomancer/spells/insert/mend_burns.dm
+++ b/code/game/gamemodes/technomancer/spells/insert/mend_burns.dm
@@ -17,14 +17,21 @@
inserting = /obj/item/inserted_spell/mend_burns
/obj/item/inserted_spell/mend_burns/on_insert()
- spawn(1)
- if(ishuman(host))
- var/mob/living/carbon/human/H = host
- var/heal_power = host == origin ? 10 : 30
- heal_power = round(heal_power * spell_power_at_creation, 1)
- origin.adjust_instability(10)
- for(var/i = 0, i<5,i++)
- if(H)
- H.adjustFireLoss(-heal_power / 5)
- sleep(1 SECOND)
- on_expire()
+ if(ishuman(host))
+ var/mob/living/carbon/human/H = host
+ var/heal_power = host == origin ? 10 : 30
+ heal_power = round(heal_power * spell_power_at_creation, 1)
+ origin.adjust_instability(10)
+ looped_insert(5, H)
+
+
+/obj/item/inserted_spell/mend_wires/looped_insert(remaining_callbacks, mob/living/carbon/human/H)
+ if(H)
+ remaining_callbacks --
+ H.adjustFireLoss(-heal_power / 5)
+
+ if(remaining_callbacks > 0)
+ addtimer(CALLBACK(src, PROC_REF(looped_insert), remaining_callbacks, H), 1 SECOND, TIMER_DELETE_ME)
+ return
+
+ on_expire()
diff --git a/code/game/gamemodes/technomancer/spells/insert/mend_metal.dm b/code/game/gamemodes/technomancer/spells/insert/mend_metal.dm
index 53ab439df6..5922fd8fbd 100644
--- a/code/game/gamemodes/technomancer/spells/insert/mend_metal.dm
+++ b/code/game/gamemodes/technomancer/spells/insert/mend_metal.dm
@@ -17,17 +17,24 @@
inserting = /obj/item/inserted_spell/mend_metal
/obj/item/inserted_spell/mend_metal/on_insert()
- spawn(1)
- if(ishuman(host))
- var/mob/living/carbon/human/H = host
- var/heal_power = host == origin ? 10 : 30
- heal_power = round(heal_power * spell_power_at_creation, 1)
- origin.adjust_instability(10)
- for(var/i = 0, i<5,i++)
- if(H)
- for(var/obj/item/organ/external/O in H.organs)
- if(O.robotic < ORGAN_ROBOT) // Robot parts only.
- continue
- O.heal_damage(heal_power / 5, 0, internal = 1, robo_repair = 1)
- sleep(1 SECOND)
- on_expire()
+ if(ishuman(host))
+ var/mob/living/carbon/human/H = host
+ var/heal_power = host == origin ? 10 : 30
+ heal_power = round(heal_power * spell_power_at_creation, 1)
+ origin.adjust_instability(10)
+ looped_insert(5, H)
+
+
+/obj/item/inserted_spell/mend_metal/looped_insert(remaining_callbacks, mob/living/carbon/human/H)
+ if(H)
+ remaining_callbacks --
+ for(var/obj/item/organ/external/O in H.organs)
+ if(O.robotic < ORGAN_ROBOT) // Robot parts only.
+ continue
+ O.heal_damage(heal_power / 5, 0, internal = 1, robo_repair = 1)
+
+ if(remaining_callbacks > 0)
+ addtimer(CALLBACK(src, PROC_REF(looped_insert), remaining_callbacks, H), 1 SECOND, TIMER_DELETE_ME)
+ return
+
+ on_expire()
diff --git a/code/game/gamemodes/technomancer/spells/insert/mend_organs.dm b/code/game/gamemodes/technomancer/spells/insert/mend_organs.dm
index dfe513f554..c3d8467ee8 100644
--- a/code/game/gamemodes/technomancer/spells/insert/mend_organs.dm
+++ b/code/game/gamemodes/technomancer/spells/insert/mend_organs.dm
@@ -18,39 +18,45 @@
inserting = /obj/item/inserted_spell/mend_organs
/obj/item/inserted_spell/mend_organs/on_insert()
- spawn(1)
- if(ishuman(host))
- var/mob/living/carbon/human/H = host
- var/heal_power = host == origin ? 2 : 5
- heal_power = round(heal_power * spell_power_at_creation, 1)
- origin.adjust_instability(15)
+ if(ishuman(host))
+ var/mob/living/carbon/human/H = host
+ var/heal_power = host == origin ? 2 : 5
+ heal_power = round(heal_power * spell_power_at_creation, 1)
+ origin.adjust_instability(15)
- for(var/i = 0, i<5,i++)
- if(H)
- for(var/obj/item/organ/O in H.internal_organs)
- if(O.damage > 0) // Fix internal damage
- O.damage = max(O.damage - (heal_power / 5), 0)
- if(O.damage <= 5 && O.organ_tag == O_EYES) // Fix eyes
- H.sdisabilities &= ~BLIND
+ looped_insert(5, H)
- for(var/obj/item/organ/external/O in H.organs) // Fix limbs
- if(!O.robotic < ORGAN_ROBOT) // No robot parts for this.
- continue
- O.heal_damage(0, heal_power / 5, internal = 1, robo_repair = 0)
- for(var/obj/item/organ/E in H.bad_external_organs) // Fix bones
- var/obj/item/organ/external/affected = E
- if((affected.damage < affected.min_broken_damage * config.organ_health_multiplier) && (affected.status & ORGAN_BROKEN))
- affected.status &= ~ORGAN_BROKEN
+/obj/item/inserted_spell/mend_wires/looped_insert(remaining_callbacks, mob/living/carbon/human/H)
+ if(H)
+ remaining_callbacks --
+ for(var/obj/item/organ/O in H.internal_organs)
+ if(O.damage > 0) // Fix internal damage
+ O.damage = max(O.damage - (heal_power / 5), 0)
+ if(O.damage <= 5 && O.organ_tag == O_EYES) // Fix eyes
+ H.sdisabilities &= ~BLIND
- for(var/datum/wound/W in affected.wounds) // Fix IB
- if(istype(W, /datum/wound/internal_bleeding))
- affected.wounds -= W
- affected.update_damages()
+ for(var/obj/item/organ/external/O in H.organs) // Fix limbs
+ if(!O.robotic < ORGAN_ROBOT) // No robot parts for this.
+ continue
+ O.heal_damage(0, heal_power / 5, internal = 1, robo_repair = 0)
- H.restore_blood() // Fix bloodloss
+ for(var/obj/item/organ/E in H.bad_external_organs) // Fix bones
+ var/obj/item/organ/external/affected = E
+ if((affected.damage < affected.min_broken_damage * config.organ_health_multiplier) && (affected.status & ORGAN_BROKEN))
+ affected.status &= ~ORGAN_BROKEN
- H.adjustBruteLoss(-heal_power)
+ for(var/datum/wound/W in affected.wounds) // Fix IB
+ if(istype(W, /datum/wound/internal_bleeding))
+ affected.wounds -= W
+ affected.update_damages()
- sleep(1 SECOND)
- on_expire()
+ H.restore_blood() // Fix bloodloss
+
+ H.adjustBruteLoss(-heal_power)
+
+ if(remaining_callbacks > 0)
+ addtimer(CALLBACK(src, PROC_REF(looped_insert), remaining_callbacks, H), 1 SECOND, TIMER_DELETE_ME)
+ return
+
+ on_expire()
diff --git a/code/game/gamemodes/technomancer/spells/insert/mend_wires.dm b/code/game/gamemodes/technomancer/spells/insert/mend_wires.dm
index 72585ef208..d000da54e1 100644
--- a/code/game/gamemodes/technomancer/spells/insert/mend_wires.dm
+++ b/code/game/gamemodes/technomancer/spells/insert/mend_wires.dm
@@ -17,17 +17,23 @@
inserting = /obj/item/inserted_spell/mend_wires
/obj/item/inserted_spell/mend_wires/on_insert()
- spawn(1)
- if(ishuman(host))
- var/mob/living/carbon/human/H = host
- var/heal_power = host == origin ? 10 : 30
- heal_power = round(heal_power * spell_power_at_creation, 1)
- origin.adjust_instability(10)
- for(var/i = 0, i<5,i++)
- if(H)
- for(var/obj/item/organ/external/O in H.organs)
- if(O.robotic < ORGAN_ROBOT) // Robot parts only.
- continue
- O.heal_damage(0, heal_power / 5, internal = 1, robo_repair = 1)
- sleep(1 SECOND)
- on_expire()
+ if(ishuman(host))
+ var/mob/living/carbon/human/H = host
+ var/heal_power = host == origin ? 10 : 30
+ heal_power = round(heal_power * spell_power_at_creation, 1)
+ origin.adjust_instability(10)
+ looped_insert(5, H)
+
+/obj/item/inserted_spell/mend_wires/looped_insert(remaining_callbacks, mob/living/carbon/human/H)
+ if(H)
+ remaining_callbacks --
+ for(var/obj/item/organ/external/O in H.organs)
+ if(O.robotic < ORGAN_ROBOT) // Robot parts only.
+ continue
+ O.heal_damage(0, heal_power / 5, internal = 1, robo_repair = 1)
+
+ if(remaining_callbacks > 0)
+ addtimer(CALLBACK(src, PROC_REF(looped_insert), remaining_callbacks, H), 1 SECOND, TIMER_DELETE_ME)
+ return
+
+ on_expire()
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index f0196ee12b..06e2311d41 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -42,7 +42,7 @@
var/list/camera_computers_using_this = list()
-/obj/machinery/camera/New()
+/obj/machinery/camera/Initialize(mapload)
wires = new(src)
assembly = new(src)
assembly.state = 4
@@ -65,7 +65,9 @@
if(!c_tag)
var/area/A = get_area(src)
c_tag = "[A ? A.name : "Unknown"] #[rand(111,999)]"
- ..()
+
+ . = ..()
+
if (dir == NORTH)
layer = ABOVE_MOB_LAYER
// VOREStation Edit End
diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm
index dd66b87b60..c3c97acaf8 100644
--- a/code/game/machinery/computer/Operating.dm
+++ b/code/game/machinery/computer/Operating.dm
@@ -20,8 +20,8 @@
var/healthAlarm = 50
var/oxy = 1 //oxygen beeping toggle
-/obj/machinery/computer/operating/New()
- ..()
+/obj/machinery/computer/operating/Initialize(mapload)
+ . = ..()
for(var/direction in list(NORTH,EAST,SOUTH,WEST))
table = locate(/obj/machinery/optable, get_step(src, direction))
if(table)
diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm
index 3ab9d84455..d6e3d21826 100644
--- a/code/game/machinery/computer/atmos_control.dm
+++ b/code/game/machinery/computer/atmos_control.dm
@@ -15,9 +15,6 @@
var/list/monitored_alarm_ids = null
var/datum/tgui_module/atmos_control/atmos_control
-/obj/machinery/computer/atmoscontrol/New()
- ..()
-
/obj/machinery/computer/atmoscontrol/laptop //[TO DO] Change name to PCU and update mapdata to include replacement computers
name = "\improper Atmospherics PCU"
desc = "A personal computer unit. It seems to have only the Atmosphereics Control program installed."
diff --git a/code/game/machinery/computer/timeclock_vr.dm b/code/game/machinery/computer/timeclock_vr.dm
index d10b7dfa4b..d0cfb480eb 100644
--- a/code/game/machinery/computer/timeclock_vr.dm
+++ b/code/game/machinery/computer/timeclock_vr.dm
@@ -246,8 +246,8 @@
/obj/item/card/id
var/last_job_switch
-/obj/item/card/id/New()
- .=..()
+/obj/item/card/id/Initialize(mapload)
+ . = ..()
last_job_switch = world.time
//
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index c79f58547c..54f3e83893 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -27,8 +27,8 @@
var/image/fluid
-/obj/machinery/atmospherics/unary/cryo_cell/New()
- ..()
+/obj/machinery/atmospherics/unary/cryo_cell/Initialize(mapload)
+ . = ..()
icon = 'icons/obj/cryogenics_split.dmi'
icon_state = "base"
initialize_directions = dir
diff --git a/code/game/machinery/deployable_vr.dm b/code/game/machinery/deployable_vr.dm
index 9e332b218d..c47981c56b 100644
--- a/code/game/machinery/deployable_vr.dm
+++ b/code/game/machinery/deployable_vr.dm
@@ -17,7 +17,7 @@
var/static/list/cutout_types
var/static/list/painters = list(/obj/item/reagent_containers/glass/paint, /obj/item/floor_painter)//, /obj/item/closet_painter)
-/obj/structure/barricade/cutout/New()
+/obj/structure/barricade/cutout/Initialize(mapload)
. = ..()
color = null
if(human_name)
diff --git a/code/game/machinery/doorbell_vr.dm b/code/game/machinery/doorbell_vr.dm
index 9dbace42f1..25fdb71de4 100644
--- a/code/game/machinery/doorbell_vr.dm
+++ b/code/game/machinery/doorbell_vr.dm
@@ -90,8 +90,8 @@
icon_state = "doorbell-standby"
use_power = USE_POWER_OFF
-/obj/machinery/button/doorbell/New(var/loc, var/dir, var/building = 0)
- ..()
+/obj/machinery/button/doorbell/Initialize(mapload, var/dir, var/building = FALSE)
+ . = ..()
if(building)
pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32)
pixel_y = (dir & 3)? (dir ==1 ? -27 : 27) : 0
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 07f7e53008..dcff34c462 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -1514,9 +1514,7 @@ About the new airlock wires panel:
return 0
return ..(M)
-/obj/machinery/door/airlock/New(var/newloc, var/obj/structure/door_assembly/assembly=null)
- ..()
-
+/obj/machinery/door/airlock/Initialize(mapload, var/obj/structure/door_assembly/assembly=null)
//if assembly is given, create the new door from the assembly
if (assembly && istype(assembly))
assembly_type = assembly.type
@@ -1543,7 +1541,7 @@ About the new airlock wires panel:
set_dir(assembly.dir)
//wires
- var/turf/T = get_turf(newloc)
+ var/turf/T = get_turf(src)
if(T && (T.z in using_map.admin_levels))
secured_wires = 1
if (secured_wires)
@@ -1551,14 +1549,17 @@ About the new airlock wires panel:
else
wires = new/datum/wires/airlock(src)
-/obj/machinery/door/airlock/Initialize(mapload)
+ . = ..()
+
if(src.closeOtherId != null)
for (var/obj/machinery/door/airlock/A in machines)
if(A.closeOtherId == src.closeOtherId && A != src)
src.closeOther = A
break
name = "\improper [name]"
- . = ..()
+ if(frequency)
+ set_frequency(frequency)
+ update_icon()
/obj/machinery/door/airlock/Destroy()
qdel(wires)
diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm
index 0b7751475d..2d7e4984dd 100644
--- a/code/game/machinery/doors/airlock_control.dm
+++ b/code/game/machinery/doors/airlock_control.dm
@@ -143,14 +143,6 @@
if(new_frequency)
radio_connection = radio_controller.add_object(src, new_frequency, RADIO_AIRLOCK)
-
-/obj/machinery/door/airlock/Initialize(mapload)
- . = ..()
- if(frequency)
- set_frequency(frequency)
-
- update_icon()
-
/obj/machinery/door/airlock/Destroy()
if(frequency && radio_controller)
radio_controller.remove_object(src,frequency)
diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm
index f913ba8a2a..0aeff00218 100644
--- a/code/game/machinery/frame.dm
+++ b/code/game/machinery/frame.dm
@@ -269,7 +269,7 @@
for(var/obj/ct as anything in req_components)
req_component_names[ct] = initial(ct.name)
-/obj/structure/frame/New(var/loc, var/dir, var/building = 0, var/datum/frame/frame_types/type, mob/user as mob)
+/obj/structure/frame/Initialize(mapload, var/dir, var/building = 0, var/datum/frame/frame_types/type, mob/user as mob)
..()
if(building)
frame_type = type
@@ -278,9 +278,6 @@
if(dir)
set_dir(dir)
- if(loc)
- src.loc = loc
-
if(frame_type.x_offset)
pixel_x = (dir & 3)? 0 : (dir == EAST ? -frame_type.x_offset : frame_type.x_offset)
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index d0b95daf63..27871c6800 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -121,15 +121,10 @@ Class Procs:
blocks_emissive = EMISSIVE_BLOCK_GENERIC
-/obj/machinery/New(l, d=0)
- ..()
+/obj/machinery/Initialize(mapload, d=0)
+ . = ..()
if(isnum(d))
set_dir(d)
- if(ispath(circuit))
- circuit = new circuit(src)
-
-/obj/machinery/Initialize(mapload)
- . = ..()
SSmachines.all_machines += src
if(ispath(circuit))
circuit = new circuit(src)
diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm
index 81638d91f0..c4dbb902ad 100644
--- a/code/game/machinery/magnet.dm
+++ b/code/game/machinery/magnet.dm
@@ -27,18 +27,16 @@
var/center_y = 0
var/max_dist = 20 // absolute value of center_x,y cannot exceed this integer
-/obj/machinery/magnetic_module/New()
- ..()
+/obj/machinery/magnetic_module/Initialize(mapload)
+ . = ..()
var/turf/T = loc
hide(!T.is_plating())
center = T
- spawn(10) // must wait for map loading to finish
- if(radio_controller)
- radio_controller.add_object(src, freq, RADIO_MAGNETS)
+ if(radio_controller)
+ radio_controller.add_object(src, freq, RADIO_MAGNETS)
- spawn()
- magnetic_process()
+ magnetic_process()
// update the invisibility and icon
/obj/machinery/magnetic_module/hide(var/intact)
@@ -159,10 +157,14 @@
update_icon()
-/obj/machinery/magnetic_module/proc/magnetic_process() // proc that actually does the pulling
- if(pulling) return
- while(on)
+/obj/machinery/magnetic_module/proc/magnetic_process(var/called_back) // proc that actually does the pulling
+ if(called_back)
+ pulling = 0
+ if(pulling)
+ return
+
+ if(on)
pulling = 1
center = locate(x+center_x, y+center_y, z)
if(center)
@@ -175,7 +177,7 @@
step_towards(S, center)
use_power(electricity_level * 5)
- sleep(13 - electricity_level)
+ addtimer(CALLBACK(src, PROC_REF(magnetic_process), TRUE), 13 - electricity_level, TIMER_DELETE_ME)
pulling = 0
@@ -209,8 +211,8 @@
var/datum/radio_frequency/radio_connection
-/obj/machinery/magnetic_controller/New()
- ..()
+/obj/machinery/magnetic_controller/Initialize(mapload)
+ . = ..()
if(autolink)
for(var/obj/machinery/magnetic_module/M in machines)
@@ -218,9 +220,8 @@
magnets.Add(M)
- spawn(45) // must wait for map loading to finish
- if(radio_controller)
- radio_connection = radio_controller.add_object(src, frequency, RADIO_MAGNETS)
+ if(radio_controller)
+ radio_connection = radio_controller.add_object(src, frequency, RADIO_MAGNETS)
if(path) // check for default path
diff --git a/code/game/machinery/pointdefense.dm b/code/game/machinery/pointdefense.dm
index 08155c6b84..d17bad63f7 100644
--- a/code/game/machinery/pointdefense.dm
+++ b/code/game/machinery/pointdefense.dm
@@ -26,9 +26,6 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
if(PC != src && PC.id_tag == id_tag)
warning("Two [src] with the same id_tag of [id_tag]")
id_tag = null
- // TODO - Remove this bit once machines are converted to Initialize
- if(ispath(circuit))
- circuit = new circuit(src)
default_apply_parts()
/obj/machinery/pointdefense_control/get_description_interaction()
@@ -139,9 +136,6 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
/obj/machinery/power/pointdefense/Initialize(mapload)
. = ..()
- // TODO - Remove this bit once machines are converted to Initialize
- if(ispath(circuit))
- circuit = new circuit(src)
default_apply_parts()
if(anchored)
connect_to_network()
diff --git a/code/game/machinery/records_scanner.dm b/code/game/machinery/records_scanner.dm
index e7fa6f487b..314714e67f 100644
--- a/code/game/machinery/records_scanner.dm
+++ b/code/game/machinery/records_scanner.dm
@@ -8,7 +8,8 @@
anchored = TRUE
var/lastuser = null
-/obj/machinery/scanner/New()
+/obj/machinery/scanner/Initialize(mapload)
+ . = ..()
if(!outputdir)
switch(dir)
if(1)
diff --git a/code/game/machinery/supplybeacon.dm b/code/game/machinery/supplybeacon.dm
index c70e567c8b..3b37c479ba 100644
--- a/code/game/machinery/supplybeacon.dm
+++ b/code/game/machinery/supplybeacon.dm
@@ -36,8 +36,8 @@
var/expended
var/drop_type
-/obj/machinery/power/supply_beacon/New()
- ..()
+/obj/machinery/power/supply_beacon/Initialize(mapload)
+ . = ..()
if(!drop_type) drop_type = pick(supply_drop_random_loot_types())
/obj/machinery/power/supply_beacon/supermatter
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index 6f5d9cfa66..973404be5e 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -13,14 +13,11 @@
//Setting this to 1 will set locked to null after a player enters the portal and will not allow hand-teles to open portals to that location.
var/datum/tgui_module/teleport_control/teleport_control
-/obj/machinery/computer/teleporter/New()
+/obj/machinery/computer/teleporter/Initialize(mapload)
id = "[rand(1000, 9999)]"
- ..()
+ . = ..()
underlays.Cut()
underlays += image('icons/obj/stationobjs_vr.dmi', icon_state = "telecomp-wires") //VOREStation Edit: different direction for wires to account for dirs
-
-/obj/machinery/computer/teleporter/Initialize(mapload)
- . = ..()
teleport_control = new(src)
var/obj/machinery/teleport/station/station = null
var/obj/machinery/teleport/hub/hub = null
diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm
index 10a53e37a6..e0768fa71f 100644
--- a/code/game/mecha/mecha_wreckage.dm
+++ b/code/game/mecha/mecha_wreckage.dm
@@ -12,14 +12,9 @@
opacity = 0
var/list/welder_salvage = list(/obj/item/stack/material/plasteel,/obj/item/stack/material/steel,/obj/item/stack/rods)
var/list/wirecutters_salvage = list(/obj/item/stack/cable_coil)
- var/list/crowbar_salvage
+ var/list/crowbar_salvage = list()
var/salvage_num = 5
-/obj/effect/decal/mecha_wreckage/New()
- ..()
- crowbar_salvage = new
- return
-
/obj/effect/decal/mecha_wreckage/ex_act(severity)
if(severity < 2)
spawn
@@ -80,8 +75,8 @@
name = "Gygax wreckage"
icon_state = "gygax-broken"
-/obj/effect/decal/mecha_wreckage/gygax/New()
- ..()
+/obj/effect/decal/mecha_wreckage/gygax/Initialize(mapload)
+ . = ..()
var/list/parts = list(/obj/item/mecha_parts/part/gygax_torso,
/obj/item/mecha_parts/part/gygax_head,
/obj/item/mecha_parts/part/gygax_left_arm,
@@ -93,7 +88,6 @@
var/part = pick(parts)
welder_salvage += part
parts -= part
- return
/obj/effect/decal/mecha_wreckage/gygax/dark
name = "Dark Gygax wreckage"
@@ -128,8 +122,8 @@
name = "Ripley wreckage"
icon_state = "ripley-broken"
-/obj/effect/decal/mecha_wreckage/ripley/New()
- ..()
+/obj/effect/decal/mecha_wreckage/ripley/Initialize(mapload)
+ . = ..()
var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
/obj/item/mecha_parts/part/ripley_left_arm,
/obj/item/mecha_parts/part/ripley_right_arm,
@@ -140,14 +134,13 @@
var/part = pick(parts)
welder_salvage += part
parts -= part
- return
/obj/effect/decal/mecha_wreckage/ripley/firefighter
name = "Firefighter wreckage"
icon_state = "firefighter-broken"
-/obj/effect/decal/mecha_wreckage/ripley/firefighter/New()
- ..()
+/obj/effect/decal/mecha_wreckage/ripley/firefighter/Initialize(mapload)
+ . = ..()
var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
/obj/item/mecha_parts/part/ripley_left_arm,
/obj/item/mecha_parts/part/ripley_right_arm,
@@ -159,7 +152,6 @@
var/part = pick(parts)
welder_salvage += part
parts -= part
- return
/obj/effect/decal/mecha_wreckage/ripley/deathripley
name = "Death-Ripley wreckage"
@@ -169,8 +161,8 @@
name = "Durand wreckage"
icon_state = "durand-broken"
-/obj/effect/decal/mecha_wreckage/durand/New()
- ..()
+/obj/effect/decal/mecha_wreckage/durand/Initialize(mapload)
+ . = ..()
var/list/parts = list(
/obj/item/mecha_parts/part/durand_torso,
/obj/item/mecha_parts/part/durand_head,
@@ -183,7 +175,6 @@
var/part = pick(parts)
welder_salvage += part
parts -= part
- return
/obj/effect/decal/mecha_wreckage/phazon
name = "Phazon wreckage"
@@ -194,8 +185,8 @@
name = "Odysseus wreckage"
icon_state = "odysseus-broken"
-/obj/effect/decal/mecha_wreckage/odysseus/New()
- ..()
+/obj/effect/decal/mecha_wreckage/odysseus/Initialize(mapload)
+ . = ..()
var/list/parts = list(
/obj/item/mecha_parts/part/odysseus_torso,
/obj/item/mecha_parts/part/odysseus_head,
@@ -208,7 +199,6 @@
var/part = pick(parts)
welder_salvage += part
parts -= part
- return
/obj/effect/decal/mecha_wreckage/odysseus/murdysseus
icon_state = "murdysseus-broken"
diff --git a/code/game/objects/effects/alien/aliens.dm b/code/game/objects/effects/alien/aliens.dm
index a86577b6c8..4677d1ea2e 100644
--- a/code/game/objects/effects/alien/aliens.dm
+++ b/code/game/objects/effects/alien/aliens.dm
@@ -252,8 +252,8 @@
var/ticks = 0
var/target_strength = 0
-/obj/effect/alien/acid/New(loc, target)
- ..(loc)
+/obj/effect/alien/acid/Initialize(mapload, target)
+ . = ..()
src.target = target
if(isturf(target)) // Turf take twice as long to take down.
diff --git a/code/game/objects/effects/landmarks_poi_vr.dm b/code/game/objects/effects/landmarks_poi_vr.dm
index d984ab241e..9f037220b0 100644
--- a/code/game/objects/effects/landmarks_poi_vr.dm
+++ b/code/game/objects/effects/landmarks_poi_vr.dm
@@ -9,7 +9,6 @@ var/global/list/global_used_pois = list()
var/poi_type = null
var/remove_from_pool = TRUE
-/obj/effect/landmark/poi_loader/New()
INITIALIZE_IMMEDIATE(/obj/effect/landmark/poi_loader)
/obj/effect/landmark/poi_loader/Initialize(mapload)
diff --git a/code/game/objects/items/antag_spawners.dm b/code/game/objects/items/antag_spawners.dm
index 63c56d0b5c..fb0c5309f7 100644
--- a/code/game/objects/items/antag_spawners.dm
+++ b/code/game/objects/items/antag_spawners.dm
@@ -6,8 +6,8 @@
var/datum/effect/effect/system/spark_spread/sparks
var/datum/ghost_query/Q //This is used so we can unregister ourself.
-/obj/item/antag_spawner/New()
- ..()
+/obj/item/antag_spawner/Initialize(mapload)
+ . = ..()
sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(5, 0, src)
sparks.attach(loc)
diff --git a/code/game/objects/items/devices/body_snatcher_vr.dm b/code/game/objects/items/devices/body_snatcher_vr.dm
index 41e001a610..eeb3a651ed 100644
--- a/code/game/objects/items/devices/body_snatcher_vr.dm
+++ b/code/game/objects/items/devices/body_snatcher_vr.dm
@@ -11,10 +11,7 @@
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2, TECH_ILLEGAL = 1)
pickup_sound = 'sound/items/pickup/device.ogg'
drop_sound = 'sound/items/drop/device.ogg'
-
-/obj/item/bodysnatcher/New()
- ..()
- flags |= NOBLUDGEON //So borgs don't spark.
+ flags = NOBLUDGEON
/obj/item/bodysnatcher/attack(mob/living/M, mob/living/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm
index 607374058f..e3443caa50 100644
--- a/code/game/objects/items/devices/communicator/communicator.dm
+++ b/code/game/objects/items/devices/communicator/communicator.dm
@@ -349,8 +349,8 @@ var/global/list/obj/item/communicator/all_communicators = list()
/obj/machinery/camera/communicator
network = list(NETWORK_COMMUNICATORS)
-/obj/machinery/camera/communicator/New()
- ..()
+/obj/machinery/camera/communicator/Initialize(mapload)
+ . = ..()
client_huds |= global_hud.whitense
client_huds |= global_hud.darkMask
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index 44fb1f8f16..1cd93ea0b0 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -31,17 +31,17 @@
/obj/item/laser_pointer/purple
pointer_icon_state = "purple_laser"
-/obj/item/laser_pointer/New()
- ..()
- diode = new(src)
+/obj/item/laser_pointer/Initialize(mapload, var/laser_path)
+ . = ..()
+ if(ispath(laser_path))
+ diode = new laser_path
+ else
+ diode = new(src)
if(!pointer_icon_state)
pointer_icon_state = pick("red_laser","green_laser","blue_laser","purple_laser")
-/obj/item/laser_pointer/upgraded/New()
- ..()
- diode = new /obj/item/stock_parts/micro_laser/ultra
-
-
+/obj/item/laser_pointer/upgraded/Initialize(mapload)
+ . = ..(mapload, /obj/item/stock_parts/micro_laser/ultra)
/obj/item/laser_pointer/attack(mob/living/M, mob/user)
laser_act(M, user)
diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm
index 5a622223ab..01f0219010 100644
--- a/code/game/objects/items/devices/lightreplacer.dm
+++ b/code/game/objects/items/devices/lightreplacer.dm
@@ -56,9 +56,9 @@
pickup_sound = 'sound/items/pickup/device.ogg'
drop_sound = 'sound/items/drop/device.ogg'
-/obj/item/lightreplacer/New()
+/obj/item/lightreplacer/Initialize(mapload)
+ . = ..()
failmsg = "The [name]'s refill light blinks red."
- ..()
/obj/item/lightreplacer/examine(mob/user)
. = ..()
@@ -241,10 +241,6 @@
var/dimming = 0.7 // multiply value to dim lights from setcolor to nightcolor
-
-/obj/item/lightpainter/New()
- . = ..()
-
/obj/item/lightpainter/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 2)
diff --git a/code/game/objects/items/devices/scanners/mass_spectrometer.dm b/code/game/objects/items/devices/scanners/mass_spectrometer.dm
index f8de73ad8c..d578560943 100644
--- a/code/game/objects/items/devices/scanners/mass_spectrometer.dm
+++ b/code/game/objects/items/devices/scanners/mass_spectrometer.dm
@@ -19,8 +19,8 @@
pickup_sound = 'sound/items/pickup/device.ogg'
drop_sound = 'sound/items/drop/device.ogg'
-/obj/item/mass_spectrometer/New()
- ..()
+/obj/item/mass_spectrometer/Initialize(mapload)
+ . = ..()
var/datum/reagents/R = new/datum/reagents(5)
reagents = R
R.my_atom = src
diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm
index 26a57d9984..e77c654a18 100644
--- a/code/game/objects/items/devices/spy_bug.dm
+++ b/code/game/objects/items/devices/spy_bug.dm
@@ -20,8 +20,8 @@
pickup_sound = 'sound/items/pickup/device.ogg'
drop_sound = 'sound/items/drop/device.ogg'
-/obj/item/camerabug/New()
- ..()
+/obj/item/camerabug/Initialize(mapload)
+ . = ..()
// radio = new(src)
camera = new camtype(src)
@@ -168,7 +168,7 @@
drop_sound = 'sound/items/drop/device.ogg'
/*
-/obj/item/bug_monitor/New()
+/obj/item/bug_monitor/Initialize(mapload)
radio = new(src)
*/
/obj/item/bug_monitor/attack_self(mob/user)
@@ -252,8 +252,8 @@
/obj/machinery/camera/bug
network = list(NETWORK_SECURITY)
-/obj/machinery/camera/bug/New()
- ..()
+/obj/machinery/camera/bug/Initialize(mapload)
+ . = ..()
name = "Camera #[rand(1000,9999)]"
c_tag = name
@@ -261,8 +261,8 @@
// These cheap toys are accessible from the mercenary camera console as well - only the antag ones though!
network = list(NETWORK_MERCENARY)
-/obj/machinery/camera/bug/spy/New()
- ..()
+/obj/machinery/camera/bug/spy/Initialize(mapload)
+ . = ..()
name = "DV-136ZB #[rand(1000,9999)]"
c_tag = name
diff --git a/code/game/objects/items/pizza_voucher_vr.dm b/code/game/objects/items/pizza_voucher_vr.dm
index 9829bd8321..ccff331418 100644
--- a/code/game/objects/items/pizza_voucher_vr.dm
+++ b/code/game/objects/items/pizza_voucher_vr.dm
@@ -7,8 +7,8 @@
var/special_delivery = FALSE
w_class = ITEMSIZE_SMALL
-/obj/item/pizzavoucher/New()
- ..()
+/obj/item/pizzavoucher/Initialize(mapload)
+ . = ..()
var/list/descstrings = list("24/7 PIZZA PIE HEAVEN",
"WE ALWAYS DELIVER!",
"24-HOUR PIZZA PIE POWER!",
diff --git a/code/game/objects/items/weapons/chewables.dm b/code/game/objects/items/weapons/chewables.dm
index 5e352b4d5b..9a5ba54793 100644
--- a/code/game/objects/items/weapons/chewables.dm
+++ b/code/game/objects/items/weapons/chewables.dm
@@ -172,11 +172,11 @@
var/closed_state
/obj/item/storage/box/fancy/chewables/tobacco/nico/Initialize(mapload)
- . = ..()
if(!open_state)
open_state = "[initial(icon_state)]0"
if(!closed_state)
closed_state = "[initial(icon_state)]"
+ . = ..()
/obj/item/storage/box/fancy/chewables/tobacco/nico/update_icon()
cut_overlays()
diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm
index cc44fc117d..6aa787451e 100644
--- a/code/game/objects/items/weapons/implants/implant.dm
+++ b/code/game/objects/items/weapons/implants/implant.dm
@@ -373,8 +373,8 @@ Can only be loaded while still in its original case.
the implant may become unstable and either pre-maturely inject the subject or simply break."}
return dat
-/obj/item/implant/chem/New()
- ..()
+/obj/item/implant/chem/Initialize(mapload)
+ . = ..()
var/datum/reagents/R = new/datum/reagents(50)
reagents = R
R.my_atom = src
diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm
index 4369659fb5..0f5bf2fbc8 100644
--- a/code/game/objects/items/weapons/implants/implantchair.dm
+++ b/code/game/objects/items/weapons/implants/implantchair.dm
@@ -19,8 +19,8 @@
var/mob/living/carbon/occupant = null
var/injecting = 0
-/obj/machinery/implantchair/New()
- ..()
+/obj/machinery/implantchair/Initialize(mapload)
+ . = ..()
add_implants()
diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm
index adb622d11b..13c403c1fe 100644
--- a/code/game/objects/items/weapons/storage/fancy.dm
+++ b/code/game/objects/items/weapons/storage/fancy.dm
@@ -62,11 +62,11 @@
starts_with = list(/obj/item/reagent_containers/food/snacks/egg = 12)
/obj/item/storage/fancy/egg_box/Initialize(mapload)
- . = ..()
if(!open_state)
open_state = "[initial(icon_state)]0"
if(!closed_state)
closed_state = "[initial(icon_state)]"
+ . = ..()
/obj/item/storage/fancy/egg_box/update_icon()
cut_overlays()
@@ -264,11 +264,11 @@
C.desc += " This one is \a [brand]."
/obj/item/storage/fancy/cigarettes/Initialize(mapload)
- . = ..()
if(!open_state)
open_state = "[initial(icon_state)]_open"
if(!closed_state)
closed_state = "[initial(icon_state)]"
+ . = ..()
/obj/item/storage/fancy/cigarettes/update_icon()
cut_overlays()
@@ -411,11 +411,11 @@
return ..()
/obj/item/storage/fancy/cigar/Initialize(mapload)
- . = ..()
if(!open_state)
open_state = "[initial(icon_state)]0"
if(!closed_state)
closed_state = "[initial(icon_state)]"
+ . = ..()
/obj/item/storage/fancy/cigar/update_icon()
cut_overlays()
diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm
index f3a108324b..6e212e0f58 100644
--- a/code/game/objects/items/weapons/storage/storage.dm
+++ b/code/game/objects/items/weapons/storage/storage.dm
@@ -813,11 +813,11 @@
icon_state = closed_state
/obj/item/storage/trinketbox/Initialize(mapload)
- . = ..()
if(!open_state)
open_state = "[initial(icon_state)]_open"
if(!closed_state)
closed_state = "[initial(icon_state)]"
+ . = ..()
/obj/item/storage/trinketbox/attack_self()
open = !open
diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm
index b6f1e9bef1..649c46e2ab 100644
--- a/code/modules/awaymissions/gateway.dm
+++ b/code/modules/awaymissions/gateway.dm
@@ -66,7 +66,8 @@ GLOBAL_DATUM(gateway_station, /obj/machinery/gateway/centerstation)
return
icon_state = "offcenter"
/* VOREStation Removal - Doesn't do anything
-/obj/machinery/gateway/centerstation/New()
+/obj/machinery/gateway/centerstation/Initialize(mapload)
+ . = ..()
density = TRUE
*/ //VOREStation Removal End
@@ -249,7 +250,8 @@ GLOBAL_DATUM(gateway_away, /obj/machinery/gateway/centeraway)
var/ready = 0
var/obj/machinery/gateway/centerstation/stationgate = null
-/obj/machinery/gateway/centeraway/New()
+/obj/machinery/gateway/centeraway/Initialize(mapload)
+ . = ..()
density = TRUE
/obj/machinery/gateway/centeraway/Initialize(mapload)
diff --git a/code/modules/clothing/accessories/accessory_vr.dm b/code/modules/clothing/accessories/accessory_vr.dm
index 8578c2e5f1..158a3c6f6e 100644
--- a/code/modules/clothing/accessories/accessory_vr.dm
+++ b/code/modules/clothing/accessories/accessory_vr.dm
@@ -18,8 +18,8 @@
)
//Forces different sprite sheet on equip
-/obj/item/clothing/accessory/choker/New()
- ..()
+/obj/item/clothing/accessory/choker/Initialize(mapload)
+ . = ..()
icon_previous_override = icon_override
/obj/item/clothing/accessory/choker/equipped() //Solution for race-specific sprites for an accessory which is also a suit. Suit icons break if you don't use icon override which then also overrides race-specific sprites.
@@ -57,8 +57,8 @@
)
//Forces different sprite sheet on equip
-/obj/item/clothing/accessory/collar/New()
- ..()
+/obj/item/clothing/accessory/collar/Initialize(mapload)
+ . = ..()
icon_previous_override = icon_override
/obj/item/clothing/accessory/collar/equipped() //Solution for race-specific sprites for an accessory which is also a suit. Suit icons break if you don't use icon override which then also overrides race-specific sprites.
diff --git a/code/modules/clothing/accessories/badges_vr.dm b/code/modules/clothing/accessories/badges_vr.dm
index 91a70be318..005f994e2d 100644
--- a/code/modules/clothing/accessories/badges_vr.dm
+++ b/code/modules/clothing/accessories/badges_vr.dm
@@ -11,8 +11,8 @@
slot_flags = SLOT_TIE
var/obj/item/dosimeter_film/current_film = null
-/obj/item/clothing/accessory/dosimeter/New()
- ..()
+/obj/item/clothing/accessory/dosimeter/Initialize(mapload)
+ . = ..()
current_film = new /obj/item/dosimeter_film(src)
update_state(current_film.state)
START_PROCESSING(SSobj, src)
@@ -119,8 +119,8 @@
max_storage_space = (ITEMSIZE_COST_SMALL * 4) + (ITEMSIZE_COST_TINY * 1)
w_class = ITEMSIZE_SMALL
-/obj/item/storage/box/dosimeter/New()
- ..()
+/obj/item/storage/box/dosimeter/Initialize(mapload)
+ . = ..()
new /obj/item/paper/dosimeter_manual(src)
new /obj/item/clothing/accessory/dosimeter(src)
new /obj/item/dosimeter_film(src)
diff --git a/code/modules/clothing/accessories/watches.dm b/code/modules/clothing/accessories/watches.dm
index 5a93cb94f0..d97fc22867 100644
--- a/code/modules/clothing/accessories/watches.dm
+++ b/code/modules/clothing/accessories/watches.dm
@@ -58,7 +58,8 @@
var/datum/gas_mixture/env = T.return_air()
. += span_notice("Pressure: [env.return_pressure()]kPa / Temperature: [env.temperature]K ")
-/obj/item/clothing/accessory/watch/survival/New()
+/obj/item/clothing/accessory/watch/survival/Initialize(mapload)
+ . = ..()
gps = new/obj/item/gps/watch(src)
/obj/item/gps/watch
diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm
index ffb9bdc169..f831e846e0 100644
--- a/code/modules/clothing/chameleon.dm
+++ b/code/modules/clothing/chameleon.dm
@@ -304,8 +304,8 @@
origin_tech = list(TECH_ILLEGAL = 3)
var/list/global/clothing_choices
-/obj/item/clothing/glasses/chameleon/New()
- ..()
+/obj/item/clothing/glasses/chameleon/Initialize(mapload)
+ . = ..()
if(!clothing_choices)
clothing_choices = generate_chameleon_choices(/obj/item/clothing/glasses, list(src.type))
diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm
index fbe2499a64..6c4697d338 100644
--- a/code/modules/clothing/glasses/glasses.dm
+++ b/code/modules/clothing/glasses/glasses.dm
@@ -97,8 +97,8 @@ BLIND // can't see anything
vision_flags = SEE_TURFS
enables_planes = list(VIS_FULLBRIGHT, VIS_MESONS)
-/obj/item/clothing/glasses/meson/New()
- ..()
+/obj/item/clothing/glasses/meson/Initialize(mapload)
+ . = ..()
overlay = global_hud.meson
/obj/item/clothing/glasses/meson/prescription
@@ -142,8 +142,8 @@ BLIND // can't see anything
actions_types = list(/datum/action/item_action/toggle_goggles)
item_flags = AIRTIGHT
-/obj/item/clothing/glasses/science/New()
- ..()
+/obj/item/clothing/glasses/science/Initialize(mapload)
+ . = ..()
overlay = global_hud.science
/obj/item/clothing/glasses/goggles
@@ -172,8 +172,8 @@ BLIND // can't see anything
species_restricted = list("Vox")
flags = PHORONGUARD
-/obj/item/clothing/glasses/night/New()
- ..()
+/obj/item/clothing/glasses/night/Initialize(mapload)
+ . = ..()
overlay = global_hud.nvg
/obj/item/clothing/glasses/eyepatch
@@ -264,8 +264,8 @@ BLIND // can't see anything
flash_protection = FLASH_PROTECTION_REDUCED
enables_planes = list(VIS_FULLBRIGHT, VIS_MESONS)
-/obj/item/clothing/glasses/graviton/New()
- ..()
+/obj/item/clothing/glasses/graviton/Initialize(mapload)
+ . = ..()
overlay = global_hud.material
/obj/item/clothing/glasses/regular
@@ -551,8 +551,8 @@ BLIND // can't see anything
M.disabilities &= ~NEARSIGHTED
..()
-/obj/item/clothing/glasses/thermal/New()
- ..()
+/obj/item/clothing/glasses/thermal/Initialize(mapload)
+ . = ..()
overlay = global_hud.thermal
/obj/item/clothing/glasses/thermal/syndi //These are now a traitor item, concealed as mesons. -Pete
diff --git a/code/modules/clothing/glasses/hud_vr.dm b/code/modules/clothing/glasses/hud_vr.dm
index 101ec2b3c3..94e268bd89 100644
--- a/code/modules/clothing/glasses/hud_vr.dm
+++ b/code/modules/clothing/glasses/hud_vr.dm
@@ -16,8 +16,8 @@
var/ar_toggled = TRUE //Used for toggle_ar_planes() verb
-/obj/item/clothing/glasses/omnihud/New()
- ..()
+/obj/item/clothing/glasses/omnihud/Initialize(mapload)
+ . = ..()
if(tgarscreen_path)
tgarscreen = new tgarscreen_path(src)
diff --git a/code/modules/clothing/masks/gasmask_vr.dm b/code/modules/clothing/masks/gasmask_vr.dm
index de2b97d88a..b34e29e16b 100644
--- a/code/modules/clothing/masks/gasmask_vr.dm
+++ b/code/modules/clothing/masks/gasmask_vr.dm
@@ -1,8 +1,8 @@
// Our clear gas masks don't hide faces, but changing the var on mask/gas would require un-chaging it on all children. This is nicer.
-/obj/item/clothing/mask/gas/New()
+/obj/item/clothing/mask/gas/Initialize(mapload)
+ . = ..()
if(type == /obj/item/clothing/mask/gas)
flags_inv &= ~HIDEFACE
- ..()
// Since we changed the gas mask sprite, if we want the old one for some reason use this.
/obj/item/clothing/mask/gas/wwii
diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm
index 0fd79e952a..51c76b783a 100644
--- a/code/modules/clothing/masks/miscellaneous.dm
+++ b/code/modules/clothing/masks/miscellaneous.dm
@@ -15,8 +15,8 @@
item_state_slots = list(slot_r_hand_str = null, slot_l_hand_str = null)
w_class = ITEMSIZE_TINY
-/obj/item/clothing/mask/muzzle/New()
- ..()
+/obj/item/clothing/mask/muzzle/Initialize(mapload)
+ . = ..()
say_messages = list("Mmfph!", "Mmmf mrrfff!", "Mmmf mnnf!")
say_verbs = list("mumbles", "says")
@@ -217,8 +217,8 @@
w_class = ITEMSIZE_SMALL
body_parts_covered = HEAD|FACE
*/
-/obj/item/clothing/mask/horsehead/New()
- ..()
+/obj/item/clothing/mask/horsehead/Initialize(mapload)
+ . = ..()
// The horse mask doesn't cause voice changes by default, the wizard spell changes the flag as necessary
say_messages = list("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
say_verbs = list("whinnies", "neighs", "says")
@@ -232,7 +232,8 @@
body_parts_covered = 0
var/mob/observer/eye/aiEye/eye
-/obj/item/clothing/mask/ai/New()
+/obj/item/clothing/mask/ai/Initialize(mapload)
+ . = ..()
eye = new(src)
/obj/item/clothing/mask/ai/equipped(var/mob/user, var/slot)
diff --git a/code/modules/clothing/masks/voice.dm b/code/modules/clothing/masks/voice.dm
index 122bcdb1c0..21581faa15 100644
--- a/code/modules/clothing/masks/voice.dm
+++ b/code/modules/clothing/masks/voice.dm
@@ -33,6 +33,6 @@
changer.voice = null
to_chat(usr, span_notice("You have reset your voice changer's mimicry feature."))
-/obj/item/clothing/mask/gas/voice/New()
- ..()
+/obj/item/clothing/mask/gas/voice/Initialize(mapload)
+ . = ..()
changer = new(src)
diff --git a/code/modules/clothing/spacesuits/rig/modules/combat.dm b/code/modules/clothing/spacesuits/rig/modules/combat.dm
index e54980b213..61878a9f7c 100644
--- a/code/modules/clothing/spacesuits/rig/modules/combat.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/combat.dm
@@ -119,8 +119,8 @@
var/gun_type = /obj/item/gun/energy/lasercannon/mounted
var/obj/item/gun/gun
-/obj/item/rig_module/mounted/New()
- ..()
+/obj/item/rig_module/mounted/Initialize(mapload)
+ . = ..()
gun = new gun_type(src)
/obj/item/rig_module/mounted/engage(atom/target)
diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm
index 4f6c2deb68..928ed5483b 100644
--- a/code/modules/clothing/spacesuits/rig/modules/computer.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/computer.dm
@@ -237,11 +237,7 @@
interface_name = "contact datajack"
interface_desc = "An induction-powered high-throughput datalink suitable for hacking encrypted networks."
- var/list/stored_research
-
-/obj/item/rig_module/datajack/New()
- ..()
- stored_research = list()
+ var/list/stored_research = list()
/obj/item/rig_module/datajack/engage(atom/target)
diff --git a/code/modules/clothing/spacesuits/rig/modules/ninja.dm b/code/modules/clothing/spacesuits/rig/modules/ninja.dm
index 90a3b06be8..a6d583fc04 100644
--- a/code/modules/clothing/spacesuits/rig/modules/ninja.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/ninja.dm
@@ -182,8 +182,8 @@
interface_name = "dead man's switch"
interface_desc = "An integrated self-destruct module. When the wearer dies, they vanish in smoke. Do not press this button."
-/obj/item/rig_module/self_destruct/New()
- ..()
+/obj/item/rig_module/self_destruct/Initialize(mapload)
+ . = ..()
src.smoke = new /datum/effect/effect/system/smoke_spread/bad()
src.smoke.attach(src)
diff --git a/code/modules/detectivework/tools/crimekit.dm b/code/modules/detectivework/tools/crimekit.dm
index 6b1d828d02..f2df0bb55d 100644
--- a/code/modules/detectivework/tools/crimekit.dm
+++ b/code/modules/detectivework/tools/crimekit.dm
@@ -8,8 +8,8 @@
drop_sound = 'sound/items/drop/toolbox.ogg'
pickup_sound = 'sound/items/pickup/toolbox.ogg'
-/obj/item/storage/briefcase/crimekit/New()
- ..()
+/obj/item/storage/briefcase/crimekit/Initialize(mapload)
+ . = ..()
new /obj/item/storage/box/swabs(src)
new /obj/item/storage/box/fingerprints(src)
new /obj/item/reagent_containers/spray/luminol(src)
diff --git a/code/modules/detectivework/tools/sample_kits.dm b/code/modules/detectivework/tools/sample_kits.dm
index 30b2724d0d..552a8b66b4 100644
--- a/code/modules/detectivework/tools/sample_kits.dm
+++ b/code/modules/detectivework/tools/sample_kits.dm
@@ -4,14 +4,14 @@
w_class = ITEMSIZE_TINY
var/list/evidence = list()
-/obj/item/sample/New(var/newloc, var/atom/supplied)
- ..(newloc)
+/obj/item/sample/Initialize(mapload, var/atom/supplied)
+ . = ..()
if(supplied)
copy_evidence(supplied)
name = "[initial(name)] (\the [supplied])"
-/obj/item/sample/print/New(var/newloc, var/atom/supplied)
- ..(newloc, supplied)
+/obj/item/sample/print/Initialize(mapload, supplied)
+ . = ..()
if(evidence && evidence.len)
icon_state = "fingerprint1"
diff --git a/code/modules/detectivework/tools/storage.dm b/code/modules/detectivework/tools/storage.dm
index 7490d4ab53..f6c73402d5 100644
--- a/code/modules/detectivework/tools/storage.dm
+++ b/code/modules/detectivework/tools/storage.dm
@@ -6,8 +6,8 @@
can_hold = list(/obj/item/forensics/swab)
storage_slots = 14
-/obj/item/storage/box/swabs/New()
- ..()
+/obj/item/storage/box/swabs/Initialize(mapload)
+ . = ..()
for(var/i = 1 to storage_slots) // Fill 'er up.
new /obj/item/forensics/swab(src)
@@ -17,8 +17,8 @@
storage_slots = 7
can_hold = list(/obj/item/evidencebag)
-/obj/item/storage/box/evidence/New()
- ..()
+/obj/item/storage/box/evidence/Initialize(mapload)
+ . = ..()
for(var/i = 1 to storage_slots)
new /obj/item/evidencebag(src)
@@ -30,7 +30,7 @@
can_hold = list(/obj/item/sample/print)
storage_slots = 14
-/obj/item/storage/box/fingerprints/New()
- ..()
+/obj/item/storage/box/fingerprints/Initialize(mapload)
+ . = ..()
for(var/i = 1 to storage_slots)
new /obj/item/sample/print(src)
diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm
index 914dfbf948..9b63e8a728 100644
--- a/code/modules/economy/ATM.dm
+++ b/code/modules/economy/ATM.dm
@@ -35,9 +35,9 @@ log transactions
var/view_screen = NO_SCREEN
var/datum/effect/effect/system/spark_spread/spark_system
-/obj/machinery/atm/New()
- ..()
+/obj/machinery/atm/Initialize(mapload)
machine_id = "[station_name()] RT #[num_financial_terminals++]"
+ . = ..()
spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
diff --git a/code/modules/economy/Accounts_DB.dm b/code/modules/economy/Accounts_DB.dm
index c0b352d790..e2d914501f 100644
--- a/code/modules/economy/Accounts_DB.dm
+++ b/code/modules/economy/Accounts_DB.dm
@@ -40,9 +40,9 @@
Generated By: [held_card.registered_name], [held_card.assignment]
"}
-/obj/machinery/account_database/New()
+/obj/machinery/account_database/Initialize(mapload)
machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]"
- ..()
+ . = ..()
/obj/machinery/account_database/attackby(obj/O, mob/user)
if(!istype(O, /obj/item/card/id))
diff --git a/code/modules/economy/cash_register.dm b/code/modules/economy/cash_register.dm
index 261f6fb1d6..8d52e7a06f 100644
--- a/code/modules/economy/cash_register.dm
+++ b/code/modules/economy/cash_register.dm
@@ -25,8 +25,9 @@
// Claim machine ID
-/obj/machinery/cash_register/New()
+/obj/machinery/cash_register/Initialize(mapload)
machine_id = "[station_name()] RETAIL #[num_financial_terminals++]"
+ . = ..()
cash_stored = rand(10, 70)*10
transaction_devices += src // Global reference list to be properly set up by /proc/setup_economy()
diff --git a/code/modules/food/food/drinks/drinkingglass.dm b/code/modules/food/food/drinks/drinkingglass.dm
index 3f60de7665..a33ccf165b 100644
--- a/code/modules/food/food/drinks/drinkingglass.dm
+++ b/code/modules/food/food/drinks/drinkingglass.dm
@@ -100,12 +100,12 @@
price_tag = null
// for /obj/machinery/vending/sovietsoda
-/obj/item/reagent_containers/food/drinks/drinkingglass/soda/New()
- ..()
+/obj/item/reagent_containers/food/drinks/drinkingglass/soda/Initialize(mapload)
+ . = ..()
reagents.add_reagent(REAGENT_ID_SODAWATER, 50)
-/obj/item/reagent_containers/food/drinks/drinkingglass/cola/New()
- ..()
+/obj/item/reagent_containers/food/drinks/drinkingglass/cola/Initialize(mapload)
+ . = ..()
reagents.add_reagent(REAGENT_ID_COLA, 50)
/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass
diff --git a/code/modules/games/cardemon.dm b/code/modules/games/cardemon.dm
index 7a56b4ab24..236cfb1fe4 100644
--- a/code/modules/games/cardemon.dm
+++ b/code/modules/games/cardemon.dm
@@ -7,8 +7,8 @@
icon_state = "card_pack_cardemon"
parentdeck = "cardemon"
-/obj/item/pack/cardemon/New()
- ..()
+/obj/item/pack/cardemon/Initialize(mapload)
+ . = ..()
var/datum/playingcard/P
var/i
for(i=0; i<5; i++)
diff --git a/code/modules/games/egy_cards_vr.dm b/code/modules/games/egy_cards_vr.dm
index 29b59f66fb..2d2a7fd629 100644
--- a/code/modules/games/egy_cards_vr.dm
+++ b/code/modules/games/egy_cards_vr.dm
@@ -8,8 +8,8 @@
-/obj/item/deck/egy/New()
- ..()
+/obj/item/deck/egy/Initialize(mapload)
+ . = ..()
var/datum/playingcard/P
//Universal cards
for(var/i=0; i<=3; i++)
diff --git a/code/modules/games/schnapsen_vr.dm b/code/modules/games/schnapsen_vr.dm
index 0104ac6841..162239bc56 100644
--- a/code/modules/games/schnapsen_vr.dm
+++ b/code/modules/games/schnapsen_vr.dm
@@ -8,8 +8,8 @@
desc = "An ancient trick-taking card game from a bygone-Earth country. For 2 players!"
icon_state = "deck"
-/obj/item/deck/schnapsen/New()
- ..()
+/obj/item/deck/schnapsen/Initialize(mapload)
+ . = ..()
var/datum/playingcard/P
var/colour
for(var/suit in list("acorns","leaves","bells","hearts"))
diff --git a/code/modules/holodeck/HolodeckControl.dm b/code/modules/holodeck/HolodeckControl.dm
index 7781f145e9..17c3992460 100644
--- a/code/modules/holodeck/HolodeckControl.dm
+++ b/code/modules/holodeck/HolodeckControl.dm
@@ -187,8 +187,8 @@
if (last_to_emag)
C.friends = list(last_to_emag)
-/obj/machinery/computer/HolodeckControl/New()
- ..()
+/obj/machinery/computer/HolodeckControl/Initialize(mapload)
+ . = ..()
current_program = powerdown_program
linkedholodeck = locate(projection_area)
if(!linkedholodeck)
diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm
index e2b7350edc..c73f61e9cf 100644
--- a/code/modules/holodeck/HolodeckObjects.dm
+++ b/code/modules/holodeck/HolodeckObjects.dm
@@ -301,11 +301,11 @@
unacidable = TRUE
var/active = 0
-/obj/item/holo/esword/green/New()
- lcolor = "#008000"
+/obj/item/holo/esword/green
+ lcolor = "#008000"
-/obj/item/holo/esword/red/New()
- lcolor = "#FF0000"
+/obj/item/holo/esword/red
+ lcolor = "#FF0000"
/obj/item/holo/esword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(active && default_parry_check(user, attacker, damage_source) && prob(50))
@@ -431,10 +431,6 @@
to_chat(user, "The station AI is not to interact with these devices!")
return
-/obj/machinery/readybutton/New()
- ..()
-
-
/obj/machinery/readybutton/attackby(obj/item/W, mob/user)
to_chat(user, "The device is a solid button, there's nothing you can do with it!")
@@ -501,8 +497,8 @@
meat_amount = 0
meat_type = null
-/mob/living/simple_mob/animal/space/carp/holodeck/New()
- ..()
+/mob/living/simple_mob/animal/space/carp/holodeck/Initialize(mapload)
+ . = ..()
set_light(2) //hologram lighting
/mob/living/simple_mob/animal/space/carp/holodeck/proc/set_safety(var/safe)
diff --git a/code/modules/holomap/station_holomap.dm b/code/modules/holomap/station_holomap.dm
index 74f816bfd9..be3af2dac2 100644
--- a/code/modules/holomap/station_holomap.dm
+++ b/code/modules/holomap/station_holomap.dm
@@ -29,10 +29,7 @@
var/original_zLevel = 1 // zLevel on which the station map was initialized.
var/bogus = TRUE // set to 0 when you initialize the station map on a zLevel that has its own icon formatted for use by station holomaps.
var/datum/station_holomap/holomap_datum
-
-/obj/machinery/station_map/New()
- ..()
- flags |= ON_BORDER // Why? It doesn't help if its not density
+ flags = ON_BORDER
/obj/machinery/station_map/Initialize(mapload)
. = ..()
diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm
index 3bc48017f3..5345a7c341 100644
--- a/code/modules/hydroponics/grown.dm
+++ b/code/modules/hydroponics/grown.dm
@@ -375,12 +375,11 @@
var/list/fruit_icon_cache = list()
-/obj/item/reagent_containers/food/snacks/fruit_slice/New(var/newloc, var/datum/seed/S)
- ..(newloc)
+/obj/item/reagent_containers/food/snacks/fruit_slice/Initialize(mapload, var/datum/seed/S)
+ . = ..()
// Need to go through and make a general image caching controller. Todo.
if(!istype(S))
- qdel(src)
- return
+ return INITIALIZE_HINT_QDEL
name = "[S.seed_name] slice"
desc = "A slice of \a [S.seed_name]. Tasty, probably."
diff --git a/code/modules/hydroponics/seed_storage.dm b/code/modules/hydroponics/seed_storage.dm
index ca6728c6b9..c10fedadb0 100644
--- a/code/modules/hydroponics/seed_storage.dm
+++ b/code/modules/hydroponics/seed_storage.dm
@@ -39,8 +39,8 @@
var/lockdown = 0
var/datum/wires/seedstorage/wires = null
-/obj/machinery/seed_storage/New()
- ..()
+/obj/machinery/seed_storage/Initialize(mapload)
+ . = ..()
wires = new(src)
if(!contraband_seeds.len)
contraband_seeds = pick( /// Some form of ambrosia in all lists.
@@ -83,7 +83,6 @@
/obj/item/seeds/deathberryseed = 1 /// Very ow.
)
)
- return
/obj/machinery/seed_storage/process()
..()
diff --git a/code/modules/hydroponics/trays/tray_soil.dm b/code/modules/hydroponics/trays/tray_soil.dm
index b5c54e504e..75eabd4b0d 100644
--- a/code/modules/hydroponics/trays/tray_soil.dm
+++ b/code/modules/hydroponics/trays/tray_soil.dm
@@ -23,8 +23,8 @@
else
return ..()
-/obj/machinery/portable_atmospherics/hydroponics/soil/New()
- ..()
+/obj/machinery/portable_atmospherics/hydroponics/soil/Initialize(mapload)
+ . = ..()
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/close_lid_verb
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/remove_label
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/setlight
diff --git a/code/modules/integrated_electronics/subtypes/output.dm b/code/modules/integrated_electronics/subtypes/output.dm
index 4ae1fe683c..d0acdcdba4 100644
--- a/code/modules/integrated_electronics/subtypes/output.dm
+++ b/code/modules/integrated_electronics/subtypes/output.dm
@@ -287,8 +287,8 @@
power_draw_idle = 5 // Raises to 80 when on.
var/obj/machinery/camera/network/circuits/camera
-/obj/item/integrated_circuit/output/video_camera/New()
- ..()
+/obj/item/integrated_circuit/output/video_camera/Initialize(mapload)
+ . = ..()
extended_desc = list()
extended_desc += "Network choices are; "
extended_desc += jointext(networks, ", ")
diff --git a/code/modules/mining/machinery/machine_input_output_plates.dm b/code/modules/mining/machinery/machine_input_output_plates.dm
index f60652452b..3b57bc42ca 100644
--- a/code/modules/mining/machinery/machine_input_output_plates.dm
+++ b/code/modules/mining/machinery/machine_input_output_plates.dm
@@ -7,7 +7,8 @@
density = FALSE
anchored = TRUE
-/obj/machinery/mineral/input/New()
+/obj/machinery/mineral/input/Initialize(mapload)
+ . = ..()
icon_state = "blank"
/obj/machinery/mineral/output
@@ -17,5 +18,6 @@
density = FALSE
anchored = TRUE
-/obj/machinery/mineral/output/New()
+/obj/machinery/mineral/output/Initialize(mapload)
+ . = ..()
icon_state = "blank"
diff --git a/code/modules/mining/machinery/machine_stacking.dm b/code/modules/mining/machinery/machine_stacking.dm
index 9b74555e7a..7c145c509a 100644
--- a/code/modules/mining/machinery/machine_stacking.dm
+++ b/code/modules/mining/machinery/machine_stacking.dm
@@ -10,19 +10,16 @@
var/obj/machinery/mineral/stacking_machine/machine = null
//var/machinedir = SOUTHEAST //This is really dumb, so lets burn it with fire.
-/obj/machinery/mineral/stacking_unit_console/New()
-
- ..()
-
- spawn(7)
- //src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir)) //No.
- src.machine = locate(/obj/machinery/mineral/stacking_machine) in range(5,src)
- if (machine)
- machine.console = src
- else
- //Silently failing and causing mappers to scratch their heads while runtiming isn't ideal.
- to_world(span_danger("Warning: Stacking machine console at [src.x], [src.y], [src.z] could not find its machine!"))
- qdel(src)
+/obj/machinery/mineral/stacking_unit_console/Initialize(mapload)
+ . = ..()
+ //src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir)) //No.
+ src.machine = locate(/obj/machinery/mineral/stacking_machine) in range(5,src)
+ if (machine)
+ machine.console = src
+ else
+ //Silently failing and causing mappers to scratch their heads while runtiming isn't ideal.
+ to_world(span_danger("Warning: Stacking machine console at [src.x], [src.y], [src.z] could not find its machine!"))
+ return INITIALIZE_HINT_QDEL
/obj/machinery/mineral/stacking_unit_console/attack_hand(mob/user)
add_fingerprint(user)
@@ -84,23 +81,19 @@
var/list/stack_paths[0]
var/stack_amt = 50; // Amount to stack before releassing
-/obj/machinery/mineral/stacking_machine/New()
- ..()
-
+/obj/machinery/mineral/stacking_machine/Initialize(mapload)
+ . = ..()
for(var/obj/item/stack/material/S as anything in (subtypesof(/obj/item/stack/material) - typesof(/obj/item/stack/material/cyborg)))
var/s_matname = initial(S.default_type)
stack_storage[s_matname] = 0
stack_paths[s_matname] = S
- spawn( 5 )
- for (var/dir in cardinal)
- src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
- if(src.input) break
- for (var/dir in cardinal)
- src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
- if(src.output) break
- return
- return
+ for (var/dir in cardinal)
+ src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
+ if(src.input) break
+ for (var/dir in cardinal)
+ src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
+ if(src.output) break
/obj/machinery/mineral/stacking_machine/proc/toggle_speed(var/forced)
if(forced)
diff --git a/code/modules/mob/freelook/ai/update_triggers.dm b/code/modules/mob/freelook/ai/update_triggers.dm
index 3ce11bb42c..99a8a83734 100644
--- a/code/modules/mob/freelook/ai/update_triggers.dm
+++ b/code/modules/mob/freelook/ai/update_triggers.dm
@@ -43,8 +43,8 @@
src.set_light(0)
cameranet.removeCamera(src)
-/obj/machinery/camera/New()
- ..()
+/obj/machinery/camera/Initialize(mapload)
+ . = ..()
//Camera must be added to global list of all cameras no matter what...
if(cameranet.cameras_unsorted || !ticker)
cameranet.cameras += src
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 20390a8eda..e5a9bcdf23 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -313,15 +313,17 @@ var/list/ai_verbs_default = list(
var/mob/living/silicon/ai/powered_ai = null
invisibility = 100
-/obj/machinery/ai_powersupply/New(var/mob/living/silicon/ai/ai=null)
- powered_ai = ai
+/obj/machinery/ai_powersupply/Initialize(mapload)
+ . = ..()
+ powered_ai = loc
+ if(!istype(powered_ai))
+ return INITIALIZE_HINT_QDEL
powered_ai.psupply = src
if(istype(powered_ai,/mob/living/silicon/ai/announcer)) //Don't try to get a loc for a nullspace announcer mob, just put it into it
forceMove(powered_ai)
else
forceMove(powered_ai.loc)
- ..()
use_power(1) // Just incase we need to wake up the power system.
/obj/machinery/ai_powersupply/Destroy()
diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm
index b66c8f3ef0..da7e3c196a 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm
@@ -34,9 +34,6 @@
fabricator_tag = "Upper Level Mining"
drone_type = /mob/living/silicon/robot/drone/mining
-/obj/machinery/drone_fabricator/New()
- ..()
-
/obj/machinery/drone_fabricator/power_change()
..()
if (stat & NOPOWER)
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm
index f1c2ef7641..31abf4f0a5 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm
@@ -253,13 +253,13 @@ var/global/list/grub_machine_overlays = list()
ignored_targets += A
-/obj/machinery/abstract_grub_machine/New()
- ..()
+/obj/machinery/abstract_grub_machine/Initialize(mapload)
+ . = ..()
shuffle_power_usages()
grub = loc
if(!istype(grub))
grub = null
- qdel(src)
+ return INITIALIZE_HINT_QDEL
/obj/machinery/abstract_grub_machine/Destroy()
grub = null
diff --git a/code/modules/modular_computers/NTNet/NTNet_relay.dm b/code/modules/modular_computers/NTNet/NTNet_relay.dm
index 47b591f585..e814815aad 100644
--- a/code/modules/modular_computers/NTNet/NTNet_relay.dm
+++ b/code/modules/modular_computers/NTNet/NTNet_relay.dm
@@ -95,8 +95,8 @@
ntnet_global.add_log("Manual override: Network blacklist cleared.")
. = TRUE
-/obj/machinery/ntnet_relay/New()
- ..()
+/obj/machinery/ntnet_relay/Initialize(mapload)
+ . = ..()
assign_uid()
default_apply_parts()
diff --git a/code/modules/multiz/pipes.dm b/code/modules/multiz/pipes.dm
index d5a3614a8a..94e5f96558 100644
--- a/code/modules/multiz/pipes.dm
+++ b/code/modules/multiz/pipes.dm
@@ -28,8 +28,8 @@
level = 1
-/obj/machinery/atmospherics/pipe/zpipe/New()
- ..()
+/obj/machinery/atmospherics/pipe/zpipe/Initialize(mapload)
+ . = ..()
init_dir()
/obj/machinery/atmospherics/pipe/zpipe/init_dir()
diff --git a/code/modules/overmap/disperser/disperser.dm b/code/modules/overmap/disperser/disperser.dm
index 1df8690613..a97a2fecda 100644
--- a/code/modules/overmap/disperser/disperser.dm
+++ b/code/modules/overmap/disperser/disperser.dm
@@ -11,9 +11,6 @@
/obj/machinery/disperser/Initialize(mapload)
. = ..()
- // TODO - Remove this bit once machines are converted to Initialize
- if(ispath(circuit))
- circuit = new circuit(src)
default_apply_parts()
/obj/machinery/disperser/examine(mob/user)
diff --git a/code/modules/planet/virgo4_vr.dm b/code/modules/planet/virgo4_vr.dm
index b5f900fcc3..4898480db9 100644
--- a/code/modules/planet/virgo4_vr.dm
+++ b/code/modules/planet/virgo4_vr.dm
@@ -605,8 +605,8 @@ var/datum/planet/virgo4/planet_virgo4 = null
name = "deep ocean"
alpha = 0
-/obj/machinery/power/smes/buildable/offmap_spawn/empty/New()
- ..(1)
+/obj/machinery/power/smes/buildable/offmap_spawn/empty/Initialize(mapload)
+ . = ..()
charge = 0
RCon = TRUE
input_level = input_level_max
diff --git a/code/modules/power/antimatter/computer.dm b/code/modules/power/antimatter/computer.dm
index c7c1f720f1..9b89f72223 100644
--- a/code/modules/power/antimatter/computer.dm
+++ b/code/modules/power/antimatter/computer.dm
@@ -15,16 +15,14 @@
var/obj/machinery/power/am_engine/injector/connected_I = null
var/state = STATE_DEFAULT
-/obj/machinery/computer/am_engine/New()
- ..()
- spawn( 24 )
- for(var/obj/machinery/power/am_engine/engine/E in world)
- if(E.engine_id == src.engine_id)
- src.connected_E = E
- for(var/obj/machinery/power/am_engine/injector/I in world)
- if(I.engine_id == src.engine_id)
- src.connected_I = I
- return
+/obj/machinery/computer/am_engine/Initialize(mapload)
+ . = ..()
+ for(var/obj/machinery/power/am_engine/engine/E in world)
+ if(E.engine_id == src.engine_id)
+ src.connected_E = E
+ for(var/obj/machinery/power/am_engine/injector/I in world)
+ if(I.engine_id == src.engine_id)
+ src.connected_I = I
/obj/machinery/computer/am_engine/Topic(href, href_list)
if(..())
diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm
index d2bf140605..ffbc08484a 100644
--- a/code/modules/power/antimatter/control.dm
+++ b/code/modules/power/antimatter/control.dm
@@ -29,8 +29,8 @@
var/stored_power = 0//Power to deploy per tick
-/obj/machinery/power/am_control_unit/New()
- ..()
+/obj/machinery/power/am_control_unit/Initialize(mapload)
+ . = ..()
linked_shielding = list()
linked_cores = list()
@@ -227,16 +227,13 @@
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
if(AMS.processing) AMS.shutdown_core()
AMS.control_unit = null
- spawn(10)
- AMS.controllerscan()
+ addtimer(CALLBACK(AMS, TYPE_PROC_REF(/obj/machinery/am_shielding, controllerscan)), 1 SECOND, TIMER_DELETE_ME)
linked_shielding = list()
else
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
AMS.update_icon()
- spawn(20)
- shield_icon_delay = 0
- return
+ VARSET_IN(src, shield_icon_delay, 0, 2 SECONDS)
/obj/machinery/power/am_control_unit/proc/check_core_stability()
@@ -246,8 +243,7 @@
for(var/obj/machinery/am_shielding/AMS in linked_cores)
stored_core_stability += AMS.stability
stored_core_stability/=linked_cores.len
- spawn(40)
- stored_core_stability_delay = 0
+ VARSET_IN(src, stored_core_stability_delay, 0, 4 SECONDS)
return
diff --git a/code/modules/power/antimatter/engine.dm b/code/modules/power/antimatter/engine.dm
index ad3b36ff58..bccb3ddfbe 100644
--- a/code/modules/power/antimatter/engine.dm
+++ b/code/modules/power/antimatter/engine.dm
@@ -28,14 +28,10 @@
//injector
-/obj/machinery/power/am_engine/injector/New()
- ..()
- spawn( 13 )
- var/loc = get_step(src, NORTH)
- src.connected = locate(/obj/machinery/power/am_engine/engine, get_step(loc, NORTH))
- return
- return
-
+/obj/machinery/power/am_engine/injector/Initialize(mapload)
+ . = ..()
+ var/link_loc = get_step(src, NORTH)
+ src.connected = locate(/obj/machinery/power/am_engine/engine, get_step(link_loc, NORTH))
/obj/machinery/power/am_engine/injector/attackby(obj/item/fuel/F, mob/user)
if( (stat & BROKEN) || !connected) return
@@ -72,13 +68,10 @@
//engine
-/obj/machinery/power/am_engine/engine/New()
- ..()
- spawn( 7 )
- var/loc = get_step(src, SOUTH)
- src.connected = locate(/obj/machinery/power/am_engine/injector, get_step(loc, SOUTH))
- return
- return
+/obj/machinery/power/am_engine/engine/Initialize(mapload)
+ . = ..()
+ var/link_loc = get_step(src, SOUTH)
+ src.connected = locate(/obj/machinery/power/am_engine/injector, get_step(link_loc, SOUTH))
/obj/machinery/power/am_engine/engine/proc/engine_go()
diff --git a/code/modules/power/antimatter/shielding.dm b/code/modules/power/antimatter/shielding.dm
index d179da117d..98f7d27d1a 100644
--- a/code/modules/power/antimatter/shielding.dm
+++ b/code/modules/power/antimatter/shielding.dm
@@ -26,45 +26,49 @@
var/efficiency = 1//How many cores this core counts for when doing power processing, phoron in the air and stability could affect this
-/obj/machinery/am_shielding/New(loc)
- ..(loc)
- spawn(10)
- controllerscan()
- return
-
-
-/obj/machinery/am_shielding/proc/controllerscan(var/priorscan = 0)
+/obj/machinery/am_shielding/Initialize(mapload)
+ . = ..()
+ if(!istype(loc, /turf))
+ return INITIALIZE_HINT_QDEL
//Make sure we are the only one here
- if(!istype(src.loc, /turf))
+ for(var/obj/machinery/am_shielding/AMS in loc.contents)
+ if(AMS == src)
+ continue
+ return INITIALIZE_HINT_QDEL
+
+ scan_control_shield()
+
+ if(!control_unit) // Failed to link
+ return INITIALIZE_HINT_QDEL
+
+/obj/machinery/am_shielding/proc/controllerscan()
+ //Make sure we are the only one here
+ if(!istype(loc, /turf))
qdel(src)
return
+
for(var/obj/machinery/am_shielding/AMS in loc.contents)
- if(AMS == src) continue
- spawn(0)
- qdel(src)
+ if(AMS == src)
+ continue
+ qdel(src)
return
+ scan_control_shield()
+
+ if(!control_unit) // Failed to link
+ qdel(src)
+
+/obj/machinery/am_shielding/proc/scan_control_shield()
//Search for shielding first
for(var/obj/machinery/am_shielding/AMS in cardinalrange(src))
if(AMS && AMS.control_unit && link_control(AMS.control_unit))
break
if(!control_unit)//No other guys nearby look for a control unit
- for(var/direction in cardinal)
for(var/obj/machinery/power/am_control_unit/AMC in cardinalrange(src))
if(AMC.add_shielding(src))
break
- if(!control_unit)
- if(!priorscan)
- spawn(20)
- controllerscan(1)//Last chance
- return
- spawn(0)
- qdel(src)
- return
-
-
/obj/machinery/am_shielding/Destroy()
if(control_unit) control_unit.remove_shielding(src)
if(processing) shutdown_core()
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 6d5ba1eff6..9d75645c08 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -190,8 +190,8 @@ GLOBAL_LIST_EMPTY(apcs)
return drained_energy
-/obj/machinery/power/apc/New(turf/loc, var/ndir, var/building=0)
- ..()
+/obj/machinery/power/apc/Initialize(mapload, ndir, building)
+ . = ..()
wires = new(src)
GLOB.apcs += src
@@ -211,12 +211,10 @@ GLOBAL_LIST_EMPTY(apcs)
name = "[area.name] APC"
stat |= MAINT
update_icon()
+ return
-/obj/machinery/power/apc/Initialize(mapload, ndir, building)
- . = ..()
- if(!building)
- init()
- return INITIALIZE_HINT_LATELOAD
+ init()
+ return INITIALIZE_HINT_LATELOAD
/obj/machinery/power/apc/LateInitialize()
. = ..()
diff --git a/code/modules/power/batteryrack.dm b/code/modules/power/batteryrack.dm
index b91e5f688e..bb1a6a997f 100644
--- a/code/modules/power/batteryrack.dm
+++ b/code/modules/power/batteryrack.dm
@@ -28,8 +28,8 @@
should_be_mapped = TRUE
-/obj/machinery/power/smes/batteryrack/New()
- ..()
+/obj/machinery/power/smes/batteryrack/Initialize(mapload)
+ . = ..()
add_parts()
RefreshParts()
diff --git a/code/modules/power/fusion/core/core_control.dm b/code/modules/power/fusion/core/core_control.dm
index 5a7647bd32..3641180ccd 100644
--- a/code/modules/power/fusion/core/core_control.dm
+++ b/code/modules/power/fusion/core/core_control.dm
@@ -12,8 +12,8 @@
var/obj/machinery/power/fusion_core/cur_viewed_device
var/datum/tgui_module/rustcore_monitor/monitor
-/obj/machinery/computer/fusion_core_control/New()
- ..()
+/obj/machinery/computer/fusion_core_control/Initialize(mapload)
+ . = ..()
monitor = new(src)
monitor.core_tag = id_tag
diff --git a/code/modules/power/fusion/fuel_assembly/fuel_control.dm b/code/modules/power/fusion/fuel_assembly/fuel_control.dm
index 78140d0d07..55eb334d25 100644
--- a/code/modules/power/fusion/fuel_assembly/fuel_control.dm
+++ b/code/modules/power/fusion/fuel_assembly/fuel_control.dm
@@ -10,8 +10,8 @@
var/scan_range = 25
var/datum/tgui_module/rustfuel_control/monitor
-/obj/machinery/computer/fusion_fuel_control/New()
- ..()
+/obj/machinery/computer/fusion_fuel_control/Initialize(mapload)
+ . = ..()
monitor = new(src)
monitor.fuel_tag = id_tag
diff --git a/code/modules/power/fusion/gyrotron/gyrotron_control.dm b/code/modules/power/fusion/gyrotron/gyrotron_control.dm
index 5d90dc1875..f11544efed 100644
--- a/code/modules/power/fusion/gyrotron/gyrotron_control.dm
+++ b/code/modules/power/fusion/gyrotron/gyrotron_control.dm
@@ -11,8 +11,8 @@
var/scan_range = 25
var/datum/tgui_module/gyrotron_control/monitor
-/obj/machinery/computer/gyrotron_control/New()
- ..()
+/obj/machinery/computer/gyrotron_control/Initialize(mapload)
+ . = ..()
monitor = new(src)
monitor.gyro_tag = id_tag
monitor.scan_range = scan_range
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index 7fb7f7aa47..359fdb4878 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -31,8 +31,8 @@ var/global/list/light_type_cache = list()
var/cell_connectors = TRUE
-/obj/machinery/light_construct/New(var/atom/newloc, var/newdir, var/building = 0, var/datum/frame/frame_types/frame_type, var/obj/machinery/light/fixture = null)
- ..(newloc)
+/obj/machinery/light_construct/Initialize(mapload, var/newdir, var/building = 0, var/datum/frame/frame_types/frame_type, var/obj/machinery/light/fixture = null)
+ . = ..()
if(fixture)
fixture_type = fixture.type
fixture.transfer_fingerprints_to(src)
diff --git a/code/modules/power/lighting_vr.dm b/code/modules/power/lighting_vr.dm
index a4c882c5da..83b6a308d7 100644
--- a/code/modules/power/lighting_vr.dm
+++ b/code/modules/power/lighting_vr.dm
@@ -7,13 +7,13 @@
layer = BELOW_MOB_LAYER
//Vorestation addition, to override the New() proc further below, since this is a lamp.
-/obj/machinery/light/flamp/New()
- ..()
+/obj/machinery/light/flamp/Initialize(mapload, obj/machinery/light_construct/construct)
layer = initial(layer)
+ . = ..()
// create a new lighting fixture
-/obj/machinery/light/New()
- ..()
+/obj/machinery/light/Initialize(mapload, obj/machinery/light_construct/construct)
+ . = ..()
//Vorestation addition, so large mobs stop looking stupid in front of lights.
if (dir == SOUTH) // Lights are backwards, SOUTH lights face north (they are on south wall)
layer = ABOVE_MOB_LAYER
diff --git a/code/modules/power/port_gen_vr.dm b/code/modules/power/port_gen_vr.dm
index e7e55c16de..2366146497 100644
--- a/code/modules/power/port_gen_vr.dm
+++ b/code/modules/power/port_gen_vr.dm
@@ -95,8 +95,6 @@
/obj/machinery/power/rtg/Initialize(mapload)
. = ..()
- if(ispath(circuit))
- circuit = new circuit(src)
default_apply_parts()
connect_to_network()
diff --git a/code/modules/power/sensors/powernet_sensor.dm b/code/modules/power/sensors/powernet_sensor.dm
index 2cb81231e6..39c62d48e1 100644
--- a/code/modules/power/sensors/powernet_sensor.dm
+++ b/code/modules/power/sensors/powernet_sensor.dm
@@ -25,14 +25,12 @@
var/next_record = 0
var/is_secret_monitor = FALSE
-// Proc: New()
+// Proc: Initialize(mapload)
// Parameters: None
// Description: Automatically assigns name according to ID tag.
-/obj/machinery/power/sensor/New()
- ..()
- auto_set_name()
/obj/machinery/power/sensor/Initialize(mapload)
. = ..()
+ auto_set_name()
history["supply"] = list()
history["demand"] = list()
diff --git a/code/modules/power/sensors/sensor_monitoring.dm b/code/modules/power/sensors/sensor_monitoring.dm
index f601374ccb..79210ca478 100644
--- a/code/modules/power/sensors/sensor_monitoring.dm
+++ b/code/modules/power/sensors/sensor_monitoring.dm
@@ -37,8 +37,8 @@
..()
*/
// On creation automatically connects to active sensors. This is delayed to ensure sensors already exist.
-/obj/machinery/computer/power_monitor/New()
- ..()
+/obj/machinery/computer/power_monitor/Initialize(mapload)
+ . = ..()
power_monitor = new(src)
// On user click opens the UI of this computer.
diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm
index 826938925d..4646c14325 100644
--- a/code/modules/power/singularity/collector.dm
+++ b/code/modules/power/singularity/collector.dm
@@ -17,8 +17,8 @@ var/global/list/rad_collectors = list()
var/locked = 0
var/drainratio = 1
-/obj/machinery/power/rad_collector/New()
- ..()
+/obj/machinery/power/rad_collector/Initialize(mapload)
+ . = ..()
rad_collectors += src
/obj/machinery/power/rad_collector/Destroy()
diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm
index b6dd4121b3..63db2469fb 100644
--- a/code/modules/power/singularity/field_generator.dm
+++ b/code/modules/power/singularity/field_generator.dm
@@ -68,11 +68,10 @@ field_generator power level display
return
-/obj/machinery/field_generator/New()
- ..()
+/obj/machinery/field_generator/Initialize(mapload)
+ . = ..()
fields = list()
connected_gens = list()
- return
/obj/machinery/field_generator/process()
if(Varedit_start == 1)
diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm
index eb2a98de5c..b292fdeb3e 100644
--- a/code/modules/power/singularity/particle_accelerator/particle_control.dm
+++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm
@@ -21,11 +21,11 @@
var/parts = null
var/datum/wires/particle_acc/control_box/wires = null
-/obj/machinery/particle_accelerator/control_box/New()
+/obj/machinery/particle_accelerator/control_box/Initialize(mapload)
+ . = ..()
wires = new(src)
connected_parts = list()
update_active_power_usage(initial(active_power_usage) * (strength + 1))
- ..()
/obj/machinery/particle_accelerator/control_box/Destroy()
if(active)
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index 3871c12f96..0f1d5fbb47 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -109,8 +109,8 @@
var/datum/looping_sound/supermatter/soundloop
-/obj/machinery/power/supermatter/New()
- ..()
+/obj/machinery/power/supermatter/Initialize(mapload)
+ . = ..()
uid = gl_uid++
/obj/machinery/power/supermatter/Initialize(mapload)
diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm
index f0112ff55e..5c8a4b882a 100644
--- a/code/modules/power/terminal.dm
+++ b/code/modules/power/terminal.dm
@@ -14,11 +14,10 @@
layer = WIRES_LAYER+0.01
-/obj/machinery/power/terminal/New()
- ..()
+/obj/machinery/power/terminal/Initialize(mapload)
+ . = ..()
var/turf/T = src.loc
if(level==1) hide(!T.is_plating())
- return
/obj/machinery/power/terminal/Destroy()
if(master)
diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm
index 4bb33b7626..df441a51d8 100644
--- a/code/modules/power/tesla/coil.dm
+++ b/code/modules/power/tesla/coil.dm
@@ -29,8 +29,8 @@
else
. += span_warning("It is not secured!")
-/obj/machinery/power/tesla_coil/New()
- ..()
+/obj/machinery/power/tesla_coil/Initialize(mapload)
+ . = ..()
wires = new(src)
/obj/machinery/power/tesla_coil/Initialize(mapload)
diff --git a/code/modules/reagents/machinery/chem_master.dm b/code/modules/reagents/machinery/chem_master.dm
index 8815733671..008996793e 100644
--- a/code/modules/reagents/machinery/chem_master.dm
+++ b/code/modules/reagents/machinery/chem_master.dm
@@ -23,8 +23,8 @@
flags = OPENCONTAINER
clicksound = "button"
-/obj/machinery/chem_master/New()
- ..()
+/obj/machinery/chem_master/Initialize(mapload)
+ . = ..()
var/datum/reagents/R = new/datum/reagents(900) //Just a huge random number so the buffer should (probably) never dump your reagents.
reagents = R //There should be a nano ui thingy to warn of this.
R.my_atom = src
diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm
index c863a7c321..cd0e6ed246 100644
--- a/code/modules/research/message_server.dm
+++ b/code/modules/research/message_server.dm
@@ -70,17 +70,15 @@ var/global/list/obj/machinery/message_server/message_servers = list()
//Messages having theese tokens will be rejected by server. Case sensitive
var/spamfilter_limit = MESSAGE_SERVER_DEFAULT_SPAM_LIMIT //Maximal amount of tokens
-/obj/machinery/message_server/New()
+/obj/machinery/message_server/Initialize(mapload)
+ . = ..()
message_servers += src
decryptkey = GenerateKey()
send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.")
- ..()
- return
/obj/machinery/message_server/Destroy()
message_servers -= src
- ..()
- return
+ return ..()
/obj/machinery/message_server/examine(mob/user, distance, infix, suffix)
. = ..()
@@ -263,10 +261,11 @@ var/obj/machinery/blackbox_recorder/blackbox
var/list/datum/feedback_variable/feedback = new()
//Only one can exist in the world!
-/obj/machinery/blackbox_recorder/New()
+/obj/machinery/blackbox_recorder/Initialize(mapload)
+ . = ..()
if(blackbox)
if(istype(blackbox,/obj/machinery/blackbox_recorder))
- qdel(src)
+ return INITIALIZE_HINT_QDEL
blackbox = src
/obj/machinery/blackbox_recorder/Destroy()
diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm
index 6a7d12f89c..b1b76d0176 100755
--- a/code/modules/research/rdconsole.dm
+++ b/code/modules/research/rdconsole.dm
@@ -104,8 +104,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
C.files.AddDesign2Known(D)
C.files.RefreshResearch()
-/obj/machinery/computer/rdconsole/New()
- ..()
+/obj/machinery/computer/rdconsole/Initialize(mapload)
+ . = ..()
files = new /datum/research(src) //Setup the research data holder.
if(!id)
for(var/obj/machinery/r_n_d/server/centcom/S in machines)
diff --git a/code/modules/resleeving/machines.dm b/code/modules/resleeving/machines.dm
index cecbf465cb..33539251d3 100644
--- a/code/modules/resleeving/machines.dm
+++ b/code/modules/resleeving/machines.dm
@@ -224,8 +224,8 @@
var/burn_value = 0 //Setting these to 0, if resleeving as organic with unupgraded sleevers gives them no damage, resleeving synths with unupgraded synthfabs should not give them potentially 105 damage.
var/brute_value = 0
-/obj/machinery/transhuman/synthprinter/New()
- ..()
+/obj/machinery/transhuman/synthprinter/Initialize(mapload)
+ . = ..()
component_parts = list()
component_parts += new /obj/item/stock_parts/matter_bin(src)
component_parts += new /obj/item/stock_parts/scanning_module(src)
@@ -461,8 +461,8 @@
var/sleevecards = 2
-/obj/machinery/transhuman/resleever/New()
- ..()
+/obj/machinery/transhuman/resleever/Initialize(mapload)
+ . = ..()
component_parts = list()
component_parts += new /obj/item/stock_parts/scanning_module(src)
component_parts += new /obj/item/stock_parts/scanning_module(src)
diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm
index e3094d57af..e655d00b2d 100644
--- a/code/modules/shieldgen/emergency_shield.dm
+++ b/code/modules/shieldgen/emergency_shield.dm
@@ -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
diff --git a/code/modules/shieldgen/sheldwallgen.dm b/code/modules/shieldgen/sheldwallgen.dm
index 0eb1045707..106a57af49 100644
--- a/code/modules/shieldgen/sheldwallgen.dm
+++ b/code/modules/shieldgen/sheldwallgen.dm
@@ -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()
diff --git a/code/modules/shieldgen/shield_diffuser.dm b/code/modules/shieldgen/shield_diffuser.dm
index 3928c34e22..78f912b8b9 100644
--- a/code/modules/shieldgen/shield_diffuser.dm
+++ b/code/modules/shieldgen/shield_diffuser.dm
@@ -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)
diff --git a/code/modules/shieldgen/shield_generator.dm b/code/modules/shieldgen/shield_generator.dm
index 114f7a96c2..8001612907 100644
--- a/code/modules/shieldgen/shield_generator.dm
+++ b/code/modules/shieldgen/shield_generator.dm
@@ -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()
diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm
index b8979bdf34..61d7269a28 100644
--- a/code/modules/telesci/telepad.dm
+++ b/code/modules/telesci/telepad.dm
@@ -11,8 +11,8 @@
active_power_usage = 5000
var/efficiency
-/obj/machinery/telepad/New()
- ..()
+/obj/machinery/telepad/Initialize(mapload)
+ . = ..()
component_parts = list()
component_parts += new /obj/item/bluespace_crystal(src)
component_parts += new /obj/item/stock_parts/capacitor(src)
diff --git a/code/modules/xenoarcheaology/artifacts/replicator_vr.dm b/code/modules/xenoarcheaology/artifacts/replicator_vr.dm
index 9c05f4b143..a86b44de89 100644
--- a/code/modules/xenoarcheaology/artifacts/replicator_vr.dm
+++ b/code/modules/xenoarcheaology/artifacts/replicator_vr.dm
@@ -33,8 +33,8 @@
//So if xenoarch isn't careful and is just shoving items willy-nilly without taking the proper precautions they can end up in a bit of trouble!
-/obj/machinery/replicator/vore/New() //This replicator turns people into mobs!
- ..() //TODO: Someone can replace the 'alien' interface with something neater sometime. It is simply out of my abilities at the current moment.
+/obj/machinery/replicator/vore/Initialize(mapload) //This replicator turns people into mobs!
+ . = ..() //TODO: Someone can replace the 'alien' interface with something neater sometime. It is simply out of my abilities at the current moment.
for(var/i=0, i