diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index 670481e9a22..941e0bf0813 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -85,8 +85,8 @@
. = ..()
var/obj/machinery/nuclearbomb/existing = locate("syndienuke") in GLOB.nuke_list
if(existing)
- qdel(src)
- CRASH("Attempted to spawn a syndicate nuke while one already exists at [existing.loc.x],[existing.loc.y],[existing.loc.z]")
+ stack_trace("Attempted to spawn a syndicate nuke while one already exists at [existing.loc.x],[existing.loc.y],[existing.loc.z]")
+ return INITIALIZE_HINT_QDEL
tag = "syndienuke"
/obj/machinery/nuclearbomb/attackby(obj/item/I, mob/user, params)
diff --git a/code/game/machinery/announcement_system.dm b/code/game/machinery/announcement_system.dm
index fcb688cdb98..b1fddc8a76b 100644
--- a/code/game/machinery/announcement_system.dm
+++ b/code/game/machinery/announcement_system.dm
@@ -30,6 +30,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
/obj/machinery/announcement_system/Initialize()
. = ..()
GLOB.announcement_systems += src
+ radio = new /obj/item/device/radio/headset/ai(src)
update_icon()
/obj/machinery/announcement_system/update_icon()
diff --git a/code/game/machinery/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm
index 04e3f4f97d2..a288c9d51ca 100644
--- a/code/game/machinery/computer/apc_control.dm
+++ b/code/game/machinery/computer/apc_control.dm
@@ -16,9 +16,9 @@
var/auth_id = "\[NULL\]"
/obj/machinery/computer/apc_control/Initialize()
+ . = ..()
apcs = list() //To avoid BYOND making the list run through a ton of procs
filters = list("Name" = null, "Charge Above" = null, "Charge Below" = null, "Responsive" = null)
- return ..()
/obj/machinery/computer/apc_control/process()
apcs = list() //Clear the list every tick
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index 42b8d7f6501..ad48c9a12ce 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -59,8 +59,7 @@
var/choice = pick(subtypesof(/obj/item/weapon/circuitboard/computer/arcade))
var/obj/item/weapon/circuitboard/CB = new choice()
new CB.build_path(loc, CB)
- qdel(src)
- return
+ return INITIALIZE_HINT_QDEL
Reset()
#define PULSE_MEDAL "Jackpot"
@@ -75,11 +74,9 @@
new prizeselect(src)
var/atom/movable/prize = pick(contents)
- visible_message(
- "[src] dispenses a [prize]!",
- "You hear a chime and a clunk.")
+ visible_message("[src] dispenses a [prize]!", "You hear a chime and a clunk.")
- prize.loc = loc
+ prize.forceMove(get_turf(src))
#undef PULSE_MEDAL
/obj/machinery/computer/arcade/emp_act(severity)
@@ -154,7 +151,6 @@
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
popup.open()
- return
/obj/machinery/computer/arcade/battle/Topic(href, href_list)
if(..())
diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm
index 7302ee1a413..de18b515430 100644
--- a/code/game/machinery/computer/dna_console.dm
+++ b/code/game/machinery/computer/dna_console.dm
@@ -54,10 +54,7 @@
return ..()
/obj/machinery/computer/scan_consolenew/Initialize()
- ..()
- return INITIALIZE_HINT_LATELOAD
-
-/obj/machinery/computer/scan_consolenew/LateInitialize()
+ . = ..()
for(dir in list(NORTH,EAST,SOUTH,WEST))
connected = locate(/obj/machinery/dna_scannernew, get_step(src, dir))
if(!isnull(connected))
diff --git a/code/game/machinery/computer/gulag_teleporter.dm b/code/game/machinery/computer/gulag_teleporter.dm
index 1d7ebdd3336..4b7fccc2216 100644
--- a/code/game/machinery/computer/gulag_teleporter.dm
+++ b/code/game/machinery/computer/gulag_teleporter.dm
@@ -16,10 +16,7 @@
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/gulag_teleporter_computer/Initialize()
- ..()
- return INITIALIZE_HINT_LATELOAD
-
-/obj/machinery/computer/gulag_teleporter_computer/LateInitialize()
+ . = ..()
scan_machinery()
/obj/machinery/computer/gulag_teleporter_computer/Destroy()
diff --git a/code/game/machinery/computer/teleporter.dm b/code/game/machinery/computer/teleporter.dm
index ea6b21fbfb5..f184d78a1b3 100644
--- a/code/game/machinery/computer/teleporter.dm
+++ b/code/game/machinery/computer/teleporter.dm
@@ -3,23 +3,19 @@
desc = "Used to control a linked teleportation Hub and Station."
icon_screen = "teleport"
icon_keyboard = "teleport_key"
+ light_color = LIGHT_COLOR_BLUE
circuit = /obj/item/weapon/circuitboard/computer/teleporter
- var/obj/item/device/gps/locked = null
+ var/obj/item/device/gps/locked
var/regime_set = "Teleporter"
- var/id = null
+ var/id
var/obj/machinery/teleport/station/power_station
var/calibrating
var/turf/target //Used for one-time-use teleport cards (such as clown planet coordinates.)
- //Setting this to 1 will set src.locked to null after a player enters the portal and will not allow hand-teles to open portals to that location.
-
- light_color = LIGHT_COLOR_BLUE
-
-/obj/machinery/computer/teleporter/New()
- src.id = "[rand(1000, 9999)]"
- ..()
+ //Setting this to 1 will set src.locked to null after a player enters the portal and will not allow hand-teles to open portals to that location.
/obj/machinery/computer/teleporter/Initialize()
. = ..()
+ id = "[rand(1000, 9999)]"
link_power_station()
/obj/machinery/computer/teleporter/Destroy()
@@ -31,7 +27,7 @@
/obj/machinery/computer/teleporter/proc/link_power_station()
if(power_station)
return
- for(dir in list(NORTH,EAST,SOUTH,WEST))
+ for(dir in GLOB.cardinals)
power_station = locate(/obj/machinery/teleport/station, get_step(src, dir))
if(power_station)
break
@@ -50,7 +46,7 @@
return ..()
/obj/machinery/computer/teleporter/attack_ai(mob/user)
- src.attack_hand(user)
+ return attack_hand(user)
/obj/machinery/computer/teleporter/attack_hand(mob/user)
if(..())
@@ -88,7 +84,6 @@
var/datum/browser/popup = new(user, "teleporter", name, 400, 400)
popup.set_content(data)
popup.open()
- return
/obj/machinery/computer/teleporter/Topic(href, href_list)
if(..())
@@ -144,10 +139,10 @@
/obj/machinery/computer/teleporter/proc/check_hub_connection()
if(!power_station)
- return
+ return FALSE
if(!power_station.teleporter_hub)
- return
- return 1
+ return FALSE
+ return TRUE
/obj/machinery/computer/teleporter/proc/reset_regime()
target = null
@@ -158,7 +153,7 @@
/obj/machinery/computer/teleporter/proc/eject()
if(locked)
- locked.loc = loc
+ locked.forceMove(get_turf(src))
locked = null
/obj/machinery/computer/teleporter/proc/set_target(mob/user)
diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm
index a015bf38465..936f16320d8 100644
--- a/code/game/machinery/magnet.dm
+++ b/code/game/machinery/magnet.dm
@@ -33,11 +33,10 @@
var/turf/T = loc
hide(T.intact)
center = T
-
+ SSradio.add_object(src, freq, GLOB.RADIO_MAGNETS)
return INITIALIZE_HINT_LATELOAD
/obj/machinery/magnetic_module/LateInitialize()
- SSradio.add_object(src, freq, GLOB.RADIO_MAGNETS)
magnetic_process()
/obj/machinery/magnetic_module/Destroy()
@@ -224,10 +223,6 @@
if(path) // check for default path
filter_path() // renders rpath
-
- return INITIALIZE_HINT_LATELOAD
-
-/obj/machinery/magnetic_controller/LateInitialize()
radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_MAGNETS)
/obj/machinery/magnetic_controller/Destroy()
diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm
index c52e46712c4..b4a097d5593 100644
--- a/code/game/machinery/porta_turret/portable_turret.dm
+++ b/code/game/machinery/porta_turret/portable_turret.dm
@@ -645,7 +645,7 @@
var/list/obj/machinery/porta_turret/turrets = list()
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
-/obj/machinery/turretid/Initialize(loc, ndir = 0, built = 0)
+/obj/machinery/turretid/Initialize(mapload, ndir = 0, built = 0)
. = ..()
if(built)
setDir(ndir)
diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm
index 466e848588c..23ba93992c5 100644
--- a/code/game/machinery/shieldgen.dm
+++ b/code/game/machinery/shieldgen.dm
@@ -11,8 +11,8 @@
CanAtmosPass = ATMOS_PASS_DENSITY
/obj/structure/emergency_shield/Initialize()
- setDir(pick(1,2,3,4))
. = ..()
+ setDir(pick(1,2,3,4))
air_update_turf(1)
/obj/structure/emergency_shield/Destroy()
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index f4a19968583..b1edee8325d 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -110,7 +110,7 @@
idle_power_usage = 10
active_power_usage = 2000
circuit = /obj/item/weapon/circuitboard/machine/teleporter_station
- var/engaged = 0
+ var/engaged = FALSE
var/obj/machinery/computer/teleporter/teleporter_console
var/obj/machinery/teleport/hub/teleporter_hub
var/list/linked_stations = list()
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 0cb452d1138..cdc160a29f4 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -61,6 +61,8 @@
var/refill_count = 3 //The number of canisters the vending machine uses
/obj/machinery/vending/Initialize()
+ if(refill_canister)
+ circuit = null
. = ..()
wires = new /datum/wires/vending(src)
if(!refill_canister) //constructable vending machine
diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
index 58258edd005..c3d4a1802b6 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
@@ -224,5 +224,5 @@
var/mob/M = AM
if(M.loc == input_plate)
- M.loc = src
+ M.forceMove(src)
M.gib()
\ No newline at end of file
diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
index 324f625fec1..018e6cfc795 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
@@ -11,7 +11,7 @@
idle_power_usage = 5
active_power_usage = 50
circuit = /obj/item/weapon/circuitboard/machine/processor
- var/broken = 0
+ var/broken = FALSE
var/processing = FALSE
var/rating_speed = 1
var/rating_amount = 1
diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm
index 61171a56cd9..9cfc6de2396 100644
--- a/code/modules/mining/laborcamp/laborstacker.dm
+++ b/code/modules/mining/laborcamp/laborstacker.dm
@@ -16,12 +16,9 @@
/obj/machinery/mineral/labor_claim_console/Initialize()
- ..()
+ . = ..()
Radio = new/obj/item/device/radio(src)
- Radio.listening = 0
- return INITIALIZE_HINT_LATELOAD
-
-/obj/machinery/mineral/labor_claim_console/LateInitialize()
+ Radio.listening = FALSE
locate_stacking_machine()
/obj/machinery/mineral/labor_claim_console/attackby(obj/item/I, mob/user, params)
diff --git a/code/modules/mining/machine_input_output_plates.dm b/code/modules/mining/machine_input_output_plates.dm
index 1cac26ea49e..b6f68d4c89e 100644
--- a/code/modules/mining/machine_input_output_plates.dm
+++ b/code/modules/mining/machine_input_output_plates.dm
@@ -7,7 +7,7 @@
density = FALSE
anchored = TRUE
-/obj/machinery/mineral/input/New()
+/obj/machinery/mineral/input/Initialize()
. = ..()
icon_state = "blank"
@@ -18,7 +18,7 @@
density = FALSE
anchored = TRUE
-/obj/machinery/mineral/output/New()
+/obj/machinery/mineral/output/Initialize()
. = ..()
icon_state = "blank"
diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm
index 19e65369302..1e4baee4be4 100644
--- a/code/modules/power/singularity/emitter.dm
+++ b/code/modules/power/singularity/emitter.dm
@@ -33,7 +33,7 @@
// The following 3 vars are mostly for the prototype
var/manual = FALSE
var/charge = 0
- var/atom/target = null
+ var/atom/target
/obj/machinery/power/emitter/anchored
anchored = TRUE
diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm
index a561f171cf1..452a793bd6a 100644
--- a/code/modules/power/smes.dm
+++ b/code/modules/power/smes.dm
@@ -46,9 +46,6 @@
/obj/machinery/power/smes/Initialize()
..()
- return INITIALIZE_HINT_LATELOAD
-
-/obj/machinery/power/smes/LateInitialize()
dir_loop:
for(var/d in GLOB.cardinals)
var/turf/T = get_step(src, d)