diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm
index b4a0cd9ba7b..43082c38ded 100644
--- a/code/ATMOSPHERICS/datum_pipeline.dm
+++ b/code/ATMOSPHERICS/datum_pipeline.dm
@@ -22,7 +22,7 @@
A.nullifyPipenet(src)
return ..()
-/datum/pipeline/proc/process()//This use to be called called from the pipe networks
+/datum/pipeline/process()//This use to be called called from the pipe networks
if(update)
update = 0
reconcile_air()
diff --git a/code/__DEFINES/MC.dm b/code/__DEFINES/MC.dm
index 1c4c12c243d..cbcf2c1dd90 100644
--- a/code/__DEFINES/MC.dm
+++ b/code/__DEFINES/MC.dm
@@ -21,7 +21,6 @@
#define START_PROCESSING(Processor, Datum) if (!Datum.isprocessing) {Datum.isprocessing = TRUE;Processor.processing += Datum}
#define STOP_PROCESSING(Processor, Datum) Datum.isprocessing = FALSE;Processor.processing -= Datum
-#define START_DEFERRED_PROCESSING(Processor, Datum) if (!Datum.isprocessing) {Datum.isprocessing = TRUE;Processor.processing.Insert(1,Datum)}
//SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier)
diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm
index 5ee80535780..ba0d1858616 100644
--- a/code/__DEFINES/is_helpers.dm
+++ b/code/__DEFINES/is_helpers.dm
@@ -13,6 +13,8 @@
//Objects
#define isitem(A) (istype(A, /obj/item))
+#define ismachinery(A) (istype(A, /obj/machinery))
+
#define ismecha(A) (istype(A, /obj/mecha))
#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune)) //if something is cleanable
diff --git a/code/_compile_options.dm b/code/_compile_options.dm
index 436970567a0..968a2f4d577 100644
--- a/code/_compile_options.dm
+++ b/code/_compile_options.dm
@@ -27,7 +27,5 @@ Due to BYOND features used in this codebase, you must update to version 510 or l
This may require updating to a beta release.
#endif
-var/global/list/processing_objects = list() //This has to be initialized BEFORE world
-
// Macros that must exist before world.dm
-#define to_chat to_chat_filename=__FILE__;to_chat_line=__LINE__;to_chat_src=src;__to_chat
+#define to_chat to_chat_filename=__FILE__;to_chat_line=__LINE__;to_chat_src=src;__to_chat
\ No newline at end of file
diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm
index c7217221585..906bacf0e54 100644
--- a/code/_globalvars/lists/objects.dm
+++ b/code/_globalvars/lists/objects.dm
@@ -19,7 +19,6 @@ GLOBAL_LIST_INIT(navigation_computers, list())
GLOBAL_LIST_INIT(all_areas, list())
GLOBAL_LIST_INIT(machines, list())
-GLOBAL_LIST_INIT(fast_processing, list())
GLOBAL_LIST_INIT(processing_power_items, list()) //items that ask to be called every cycle
GLOBAL_LIST_INIT(rcd_list, list()) //list of Rapid Construction Devices.
diff --git a/code/controllers/ProcessScheduler/core/process.dm b/code/controllers/ProcessScheduler/core/process.dm
index 134eaec96a6..f997109f90b 100644
--- a/code/controllers/ProcessScheduler/core/process.dm
+++ b/code/controllers/ProcessScheduler/core/process.dm
@@ -158,7 +158,7 @@
/datum/controller/process/proc/setup()
-/datum/controller/process/proc/process()
+/datum/controller/process/proc/process_decrepit()
started()
doWork()
finished()
diff --git a/code/controllers/ProcessScheduler/core/processScheduler.dm b/code/controllers/ProcessScheduler/core/processScheduler.dm
index 9fcf6d13759..66d101d178e 100644
--- a/code/controllers/ProcessScheduler/core/processScheduler.dm
+++ b/code/controllers/ProcessScheduler/core/processScheduler.dm
@@ -72,9 +72,9 @@ var/global/datum/controller/processScheduler/processScheduler
scheduler_sleep_interval = world.tick_lag
updateStartDelays()
spawn(0)
- process()
+ process_decrepit()
-/datum/controller/processScheduler/proc/process()
+/datum/controller/processScheduler/proc/process_decrepit()
while(isRunning)
checkRunningProcesses()
queueProcesses()
@@ -154,7 +154,7 @@ var/global/datum/controller/processScheduler/processScheduler
/datum/controller/processScheduler/proc/runProcess(var/datum/controller/process/process)
spawn(0)
- process.process()
+ process.process_decrepit()
/datum/controller/processScheduler/proc/processStarted(var/datum/controller/process/process)
setRunningProcessState(process)
diff --git a/code/controllers/Processes/fast_process.dm b/code/controllers/Processes/fast_process.dm
deleted file mode 100644
index c27a749f526..00000000000
--- a/code/controllers/Processes/fast_process.dm
+++ /dev/null
@@ -1,17 +0,0 @@
-/datum/controller/process/fast_process/setup()
- name = "fast processing"
- schedule_interval = 2 //every 0.2 seconds
- start_delay = 9
- log_startup_progress("Fast Processing starting up.")
-
-/datum/controller/process/fast_process/statProcess()
- ..()
- stat(null, "[GLOB.fast_processing.len] fast processes")
-
-/datum/controller/process/fast_process/doWork()
- for(last_object in GLOB.fast_processing)
- var/obj/O = last_object
- try
- O.process()
- catch(var/exception/e)
- catchException(e, O)
\ No newline at end of file
diff --git a/code/controllers/Processes/obj.dm b/code/controllers/Processes/obj.dm
deleted file mode 100644
index 454709b6194..00000000000
--- a/code/controllers/Processes/obj.dm
+++ /dev/null
@@ -1,28 +0,0 @@
-/datum/controller/process/obj/setup()
- name = "obj"
- schedule_interval = 20 // every 2 seconds
- start_delay = 8
-
-/datum/controller/process/obj/started()
- ..()
- if(!processing_objects)
- processing_objects = list()
-
-/datum/controller/process/obj/statProcess()
- ..()
- stat(null, "[processing_objects.len] objects")
-
-/datum/controller/process/obj/doWork()
- for(last_object in processing_objects)
- var/datum/O = last_object
- if(istype(O) && !QDELETED(O))
- try
- // Reagent datums get shoved in here, but the process proc isn't on the
- // base datum type, so we just call it blindly.
- O:process()
- catch(var/exception/e)
- catchException(e, O)
- SCHECK
- else
- catchBadType(O)
- processing_objects -= O
diff --git a/code/controllers/Processes/ticker.dm b/code/controllers/Processes/ticker.dm
index 8fc476116e5..578c2725710 100644
--- a/code/controllers/Processes/ticker.dm
+++ b/code/controllers/Processes/ticker.dm
@@ -30,7 +30,7 @@ DECLARE_GLOBAL_CONTROLLER(ticker, tickerProcess)
lastTickerTime = currentTime
- ticker.process()
+ ticker.process_decrepit()
/datum/controller/process/ticker/proc/getLastTickerTimeDuration()
return lastTickerTimeDuration
diff --git a/code/controllers/subsystem/processing/fastprocess.dm b/code/controllers/subsystem/processing/fastprocess.dm
new file mode 100644
index 00000000000..732c5a3ba55
--- /dev/null
+++ b/code/controllers/subsystem/processing/fastprocess.dm
@@ -0,0 +1,6 @@
+//Fires five times every second.
+
+PROCESSING_SUBSYSTEM_DEF(fastprocess)
+ name = "Fast Processing"
+ wait = 2
+ stat_tag = "FP"
\ No newline at end of file
diff --git a/code/controllers/subsystem/processing/obj.dm b/code/controllers/subsystem/processing/obj.dm
new file mode 100644
index 00000000000..7ee2bb1f0f3
--- /dev/null
+++ b/code/controllers/subsystem/processing/obj.dm
@@ -0,0 +1,5 @@
+PROCESSING_SUBSYSTEM_DEF(obj)
+ name = "Objects"
+ priority = FIRE_PRIORITY_OBJ
+ flags = SS_NO_INIT
+ wait = 20
\ No newline at end of file
diff --git a/code/controllers/subsystem/processing/processing.dm b/code/controllers/subsystem/processing/processing.dm
index 92254454219..2e06d7ebcc6 100644
--- a/code/controllers/subsystem/processing/processing.dm
+++ b/code/controllers/subsystem/processing/processing.dm
@@ -1,7 +1,5 @@
//Used to process objects. Fires once every second.
-//TODO: Implement fully when process scheduler dies
-/*
SUBSYSTEM_DEF(processing)
name = "Processing"
priority = FIRE_PRIORITY_PROCESS
@@ -16,7 +14,7 @@ SUBSYSTEM_DEF(processing)
..("[stat_tag]:[processing.len]")
/datum/controller/subsystem/processing/fire(resumed = 0)
- if (!resumed)
+ if(!resumed)
currentrun = processing.Copy()
//cache for sanic speed (lists are references anyways)
var/list/current_run = currentrun
@@ -24,15 +22,16 @@ SUBSYSTEM_DEF(processing)
while(current_run.len)
var/datum/thing = current_run[current_run.len]
current_run.len--
- if(QDELETED(thing) || thing.process(wait) == PROCESS_KILL)
+ if(QDELETED(thing))
processing -= thing
- if (MC_TICK_CHECK)
+ else if(thing.process(wait) == PROCESS_KILL)
+ // fully stop so that a future START_PROCESSING will work
+ STOP_PROCESSING(src, thing)
+ if(MC_TICK_CHECK)
return
-*/
+
/datum/var/isprocessing = FALSE
-/*
+
/datum/proc/process()
set waitfor = 0
- STOP_PROCESSING(SSobj, src)
- return 0
-*/
\ No newline at end of file
+ return PROCESS_KILL
\ No newline at end of file
diff --git a/code/datums/helper_datums/global_iterator.dm b/code/datums/helper_datums/global_iterator.dm
index fdba9542412..e3d14743fe1 100644
--- a/code/datums/helper_datums/global_iterator.dm
+++ b/code/datums/helper_datums/global_iterator.dm
@@ -109,7 +109,7 @@ Data storage vars:
CRASH("The global_iterator loop \ref[src] failed to terminate in designated timeframe. This may be caused by server lagging.")
return 1
-/datum/global_iterator/proc/process()
+/datum/global_iterator/process()
return
/datum/global_iterator/proc/active()
diff --git a/code/datums/status_effects/status_effect.dm b/code/datums/status_effects/status_effect.dm
index d312ff9d11d..dd478a8f64c 100644
--- a/code/datums/status_effects/status_effect.dm
+++ b/code/datums/status_effects/status_effect.dm
@@ -32,11 +32,11 @@
var/obj/screen/alert/status_effect/A = owner.throw_alert(id, alert_type)
A.attached_effect = src //so the alert can reference us, if it needs to
linked_alert = A //so we can reference the alert, if we need to
- GLOB.fast_processing.Add(src)
+ START_PROCESSING(SSfastprocess, src)
return TRUE
/datum/status_effect/Destroy()
- GLOB.fast_processing.Remove(src)
+ STOP_PROCESSING(SSfastprocess, src)
if(owner)
owner.clear_alert(id)
LAZYREMOVE(owner.status_effects, src)
@@ -44,7 +44,7 @@
owner = null
return ..()
-/datum/status_effect/proc/process()
+/datum/status_effect/process()
if(!owner)
qdel(src)
return
diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm
index 1e1841bd1b1..bd934eefb44 100644
--- a/code/game/gamemodes/blob/blobs/core.dm
+++ b/code/game/gamemodes/blob/blobs/core.dm
@@ -14,7 +14,7 @@
/obj/structure/blob/core/New(loc, var/h = 200, var/client/new_overmind = null, var/new_rate = 2, offspring)
blob_cores += src
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
GLOB.poi_list |= src
adjustcolors(color) //so it atleast appears
if(!overmind)
@@ -42,7 +42,7 @@
if(overmind)
overmind.blob_core = null
overmind = null
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
GLOB.poi_list.Remove(src)
return ..()
@@ -122,7 +122,7 @@
spawn(0)
if(is_offspring)
B.is_offspring = TRUE
-
+
/obj/structure/blob/core/proc/lateblobtimer()
addtimer(CALLBACK(src, .proc/lateblobcheck), 50)
diff --git a/code/game/gamemodes/blob/blobs/node.dm b/code/game/gamemodes/blob/blobs/node.dm
index e1a08555a10..4a2699802c1 100644
--- a/code/game/gamemodes/blob/blobs/node.dm
+++ b/code/game/gamemodes/blob/blobs/node.dm
@@ -9,7 +9,7 @@
/obj/structure/blob/node/New(loc, var/h = 100)
blob_nodes += src
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
..(loc, h)
/obj/structure/blob/node/adjustcolors(var/a_color)
@@ -26,7 +26,7 @@
/obj/structure/blob/node/Destroy()
blob_nodes -= src
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/structure/blob/node/Life(seconds, times_fired)
diff --git a/code/game/gamemodes/changeling/powers/fleshmend.dm b/code/game/gamemodes/changeling/powers/fleshmend.dm
index 21d97863105..f6f7c16fd21 100644
--- a/code/game/gamemodes/changeling/powers/fleshmend.dm
+++ b/code/game/gamemodes/changeling/powers/fleshmend.dm
@@ -13,10 +13,10 @@
/obj/effect/proc_holder/changeling/fleshmend/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/effect/proc_holder/changeling/fleshmend/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/proc_holder/changeling/fleshmend/process()
diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm
index 6288bed2964..4b5560fe333 100644
--- a/code/game/gamemodes/changeling/powers/mutations.dm
+++ b/code/game/gamemodes/changeling/powers/mutations.dm
@@ -433,7 +433,7 @@
..()
if(ismob(loc))
loc.visible_message("[loc.name]\'s flesh rapidly inflates, forming a bloated mass around [loc.p_their()] body!", "We inflate our flesh, creating a spaceproof suit!", "You hear organic matter ripping and tearing!")
- processing_objects += src
+ START_PROCESSING(SSobj, src)
/obj/item/clothing/suit/space/changeling/process()
if(ishuman(loc))
diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm
index 63e0626f481..60f878257db 100644
--- a/code/game/gamemodes/cult/cult_structures.dm
+++ b/code/game/gamemodes/cult/cult_structures.dm
@@ -193,11 +193,11 @@ var/list/blacklisted_pylon_turfs = typecacheof(list(
return
/obj/structure/cult/functional/pylon/New()
- processing_objects |= src
+ START_PROCESSING(SSobj, src)
..()
/obj/structure/cult/functional/pylon/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/structure/cult/functional/pylon/process()
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 535823ebfee..5f3ed489107 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -88,7 +88,7 @@
///process()
///Called by the gameticker
-/datum/game_mode/proc/process()
+/datum/game_mode/process()
return 0
//Called by the gameticker
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index a68f2db4e53..6ae995a1e77 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -400,7 +400,7 @@ var/round_start_time = 0
if(m)
to_chat(world, "Tip of the round: [html_encode(m)]")
-/datum/controller/gameticker/proc/process()
+/datum/controller/gameticker/proc/process_decrepit()
if(current_state != GAME_STATE_PLAYING)
return 0
diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm
index 830ae26f3c1..bfde102ca35 100644
--- a/code/game/gamemodes/malfunction/Malf_Modules.dm
+++ b/code/game/gamemodes/malfunction/Malf_Modules.dm
@@ -56,7 +56,7 @@
var/announced = 0
/obj/machinery/doomsday_device/Destroy()
- GLOB.fast_processing -= src
+ STOP_PROCESSING(SSfastprocess, src)
SSshuttle.emergencyNoEscape = 0
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
SSshuttle.emergency.mode = SHUTTLE_DOCKED
@@ -67,7 +67,7 @@
/obj/machinery/doomsday_device/proc/start()
detonation_timer = world.time + default_timer
timing = 1
- GLOB.fast_processing += src
+ START_PROCESSING(SSfastprocess, src)
SSshuttle.emergencyNoEscape = 1
/obj/machinery/doomsday_device/proc/seconds_remaining()
@@ -84,7 +84,7 @@
priority_announcement.Announce("Hostile environment resolved. You have 3 minutes to board the Emergency Shuttle.", "Priority Announcement", 'sound/AI/shuttledock.ogg')
qdel(src)
if(!timing)
- GLOB.fast_processing -= src
+ STOP_PROCESSING(SSfastprocess, src)
return
var/sec_left = seconds_remaining()
if(sec_left <= 0)
diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
index 92ac300cc00..827eefb569d 100644
--- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
+++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
@@ -110,15 +110,15 @@
M.SetStunned(0)
M.SetWeakened(0)
combat_cooldown = 0
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/clothing/suit/armor/abductor/vest/process()
combat_cooldown++
if(combat_cooldown==initial(combat_cooldown))
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
/obj/item/clothing/suit/armor/abductor/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
for(var/obj/machinery/abductor/console/C in GLOB.machines)
if(C.vest == src)
C.vest = null
diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm
index 8f058a872e6..fbe1774525f 100644
--- a/code/game/gamemodes/miniantags/abduction/gland.dm
+++ b/code/game/gamemodes/miniantags/abduction/gland.dm
@@ -373,11 +373,11 @@
/obj/effect/cocoon/abductor/proc/Start()
hatch_time = world.time + 600
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/effect/cocoon/abductor/process()
if(world.time > hatch_time)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
for(var/mob/M in contents)
src.visible_message("[src] hatches!")
M.forceMove(get_turf(src))
diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index 94190149848..2e36488cc8a 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -407,7 +407,7 @@ var/bomb_set
/obj/item/disk/nuclear/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
GLOB.poi_list |= src
/obj/item/disk/nuclear/process()
@@ -437,7 +437,7 @@ var/bomb_set
message_admins("[src] has been !!force deleted!! in ([diskturf ? "[diskturf.x], [diskturf.y] ,[diskturf.z] - JMP":"nonexistent location"]).")
log_game("[src] has been !!force deleted!! in ([diskturf ? "[diskturf.x], [diskturf.y] ,[diskturf.z]":"nonexistent location"]).")
GLOB.poi_list.Remove(src)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
if(blobstart.len > 0)
diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm
index dbe3146dd7f..f4c44d7513f 100644
--- a/code/game/gamemodes/wizard/artefact.dm
+++ b/code/game/gamemodes/wizard/artefact.dm
@@ -153,7 +153,7 @@
src.spawn_amt_left = spawn_amt
src.desc = desc
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
//return
/obj/effect/rend/process()
diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm
index 8fefabbf877..75c4e466a79 100644
--- a/code/game/machinery/dance_machine.dm
+++ b/code/game/machinery/dance_machine.dm
@@ -54,6 +54,7 @@
/obj/machinery/disco/Destroy()
dance_over()
selection = null
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/machinery/disco/attackby(obj/item/O, mob/user, params)
@@ -128,7 +129,7 @@
active = TRUE
update_icon()
dance_setup()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
lights_spin()
updateUsrDialog()
else if(active)
@@ -472,7 +473,7 @@
L.stop_sound_channel(CHANNEL_JUKEBOX)
else if(active)
active = FALSE
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
dance_over()
playsound(src,'sound/machines/terminal_off.ogg',50,1)
icon_state = "disco0"
diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm
index 496d8942bcc..5a53381ef07 100644
--- a/code/game/machinery/doors/airlock_control.dm
+++ b/code/game/machinery/doors/airlock_control.dm
@@ -39,8 +39,7 @@
if(command_completed(cur_command))
cur_command = null
else
- if(!isprocessing)
- START_PROCESSING(SSmachines, src)
+ START_PROCESSING(SSmachines, src)
/obj/machinery/door/airlock/proc/do_command(command)
switch(command)
diff --git a/code/game/machinery/embedded_controller/embedded_program_base.dm b/code/game/machinery/embedded_controller/embedded_program_base.dm
index 1fe527df13b..5bd46b2f3e0 100644
--- a/code/game/machinery/embedded_controller/embedded_program_base.dm
+++ b/code/game/machinery/embedded_controller/embedded_program_base.dm
@@ -17,8 +17,8 @@
/datum/computer/file/embedded_program/proc/receive_signal(datum/signal/signal, receive_method, receive_param)
return
-/datum/computer/file/embedded_program/proc/process()
- return
+/datum/computer/file/embedded_program/process()
+ return FALSE
/datum/computer/file/embedded_program/proc/post_signal(datum/signal/signal, comm_line)
if(master)
diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm
index 648cd6dca08..835b0264229 100644
--- a/code/game/machinery/firealarm.dm
+++ b/code/game/machinery/firealarm.dm
@@ -143,7 +143,7 @@ FIRE ALARM
alarm()
time = 0
timing = 0
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
updateDialog()
last_process = world.timeofday
@@ -206,9 +206,9 @@ FIRE ALARM
last_process = world.timeofday
if(oldTiming != timing)
if(timing)
- processing_objects += src
+ START_PROCESSING(SSobj, src)
else
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
else if(href_list["tp"])
var/tp = text2num(href_list["tp"])
time += tp
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index c74ee23d25c..5571a1cbe1f 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -118,25 +118,24 @@ Class Procs:
var/use_log = list()
var/list/settagwhitelist = list()//WHITELIST OF VARIABLES THAT THE set_tag HREF CAN MODIFY, DON'T PUT SHIT YOU DON'T NEED ON HERE, AND IF YOU'RE GONNA USE set_tag (format_tag() proc), ADD TO THIS LIST.
atom_say_verb = "beeps"
- var/defer_process = 0
var/siemens_strength = 0.7 // how badly will it shock you?
-/obj/machinery/Initialize()
- addAtProcessing()
+/obj/machinery/Initialize(mapload)
+ if(!armor)
+ armor = list(melee = 25, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0)
. = ..()
+ GLOB.machines += src
+
+ addAtProcessing()
power_change()
/obj/machinery/proc/addAtProcessing()
if(use_power)
myArea = get_area(src)
if(!speed_process)
- if(!defer_process)
- START_PROCESSING(SSmachines, src)
- else
- START_DEFERRED_PROCESSING(SSmachines, src)
+ START_PROCESSING(SSmachines, src)
else
- GLOB.fast_processing += src
- isprocessing = TRUE // all of these isprocessing = TRUE can be removed when the PS is dead
+ START_PROCESSING(SSfastprocess, src)
// gotta go fast
/obj/machinery/makeSpeedProcess()
@@ -144,7 +143,7 @@ Class Procs:
return
speed_process = TRUE
STOP_PROCESSING(SSmachines, src)
- GLOB.fast_processing += src
+ START_PROCESSING(SSfastprocess, src)
// gotta go slow
/obj/machinery/makeNormalProcess()
@@ -152,20 +151,16 @@ Class Procs:
return
speed_process = FALSE
START_PROCESSING(SSmachines, src)
- GLOB.fast_processing -= src
-
-/obj/machinery/New() //new
- if(!armor)
- armor = list(melee = 25, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0)
- GLOB.machines += src
- ..()
+ STOP_PROCESSING(SSfastprocess, src)
/obj/machinery/Destroy()
if(myArea)
myArea = null
- GLOB.fast_processing -= src
- STOP_PROCESSING(SSmachines, src)
- GLOB.machines -= src
+ GLOB.machines.Remove(src)
+ if(!speed_process)
+ STOP_PROCESSING(SSmachines, src)
+ else
+ STOP_PROCESSING(SSfastprocess, src)
return ..()
/obj/machinery/proc/locate_machinery()
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index f02b8411e38..9f664eaad76 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -39,7 +39,7 @@
/obj/machinery/syndicatebomb/process()
if(!active)
- GLOB.fast_processing -= src
+ STOP_PROCESSING(SSfastprocess, src)
detonation_timer = null
next_beep = null
countdown.stop()
@@ -73,7 +73,7 @@
if(defused && payload in src)
payload.defuse()
countdown.stop()
- GLOB.fast_processing -= src
+ STOP_PROCESSING(SSfastprocess, src)
/obj/machinery/syndicatebomb/New()
wires = new(src)
@@ -86,7 +86,7 @@
/obj/machinery/syndicatebomb/Destroy()
QDEL_NULL(wires)
QDEL_NULL(countdown)
- GLOB.fast_processing -= src
+ STOP_PROCESSING(SSfastprocess, src)
return ..()
/obj/machinery/syndicatebomb/examine(mob/user)
@@ -205,7 +205,7 @@
/obj/machinery/syndicatebomb/proc/activate()
active = TRUE
- GLOB.fast_processing += src
+ START_PROCESSING(SSfastprocess, src)
countdown.start()
next_beep = world.time + 10
detonation_timer = world.time + (timer_set * 10)
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index f1ad010ea93..8a910670201 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -4,7 +4,7 @@
/obj/item/mecha_parts/mecha_equipment/medical/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/mecha_parts/mecha_equipment/medical/can_attach(obj/mecha/medical/M)
@@ -13,19 +13,19 @@
/obj/item/mecha_parts/mecha_equipment/medical/attach(obj/mecha/M)
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/mecha_parts/mecha_equipment/medical/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/process()
if(!chassis)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return 1
/obj/item/mecha_parts/mecha_equipment/medical/detach()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/sleeper
@@ -66,7 +66,7 @@
return
target.forceMove(src)
patient = target
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
update_equip_info()
occupant_message("[target] successfully loaded into [src]. Life support functions engaged.")
chassis.visible_message("[chassis] loads [target] into [src].")
@@ -90,7 +90,7 @@
patient.forceMove(get_turf(src))
occupant_message("[patient] ejected. Life support functions disabled.")
log_message("[patient] ejected. Life support functions disabled.")
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
patient = null
update_equip_info()
@@ -98,7 +98,7 @@
if(patient)
occupant_message("Unable to detach [src] - equipment occupied!")
return
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/get_equip_info()
@@ -221,7 +221,7 @@
set_ready_state(1)
log_message("Deactivated.")
occupant_message("[src] deactivated - no power.")
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
var/mob/living/carbon/M = patient
if(!M)
@@ -263,11 +263,11 @@
processed_reagents = new
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/detach()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/critfail()
@@ -374,7 +374,7 @@
m++
if(processed_reagents.len)
message += " added to production"
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
occupant_message(message)
occupant_message("Reagent processing started.")
log_message("Reagent processing started.")
@@ -513,7 +513,7 @@
if(!processed_reagents.len || reagents.total_volume >= reagents.maximum_volume || !chassis.has_charge(energy_drain))
occupant_message("Reagent processing stopped.")
log_message("Reagent processing stopped.")
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
var/amount = synth_speed / processed_reagents.len
for(var/reagent in processed_reagents)
diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm
index b1a110813e8..edeb2424711 100644
--- a/code/game/mecha/equipment/tools/mining_tools.dm
+++ b/code/game/mecha/equipment/tools/mining_tools.dm
@@ -116,14 +116,14 @@
/obj/item/mecha_parts/mecha_equipment/mining_scanner/attach(obj/mecha/M)
. = ..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
M.occupant_sight_flags |= SEE_TURFS
if(M.occupant)
M.occupant.update_sight()
/obj/item/mecha_parts/mecha_equipment/mining_scanner/detach()
chassis.occupant_sight_flags &= ~SEE_TURFS
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
if(chassis.occupant)
chassis.occupant.update_sight()
return ..()
diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm
index a42e76015c1..4cfbc5c8143 100644
--- a/code/game/mecha/equipment/tools/other_tools.dm
+++ b/code/game/mecha/equipment/tools/other_tools.dm
@@ -193,7 +193,7 @@
selectable = 0
/obj/item/mecha_parts/mecha_equipment/repair_droid/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
if(chassis)
chassis.overlays -= droid_overlay
return ..()
@@ -205,7 +205,7 @@
/obj/item/mecha_parts/mecha_equipment/repair_droid/detach()
chassis.overlays -= droid_overlay
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
/obj/item/mecha_parts/mecha_equipment/repair_droid/get_equip_info()
if(!chassis) return
@@ -217,12 +217,12 @@
if(href_list["toggle_repairs"])
chassis.overlays -= droid_overlay
if(equip_ready)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
droid_overlay = new(icon, icon_state = "repair_droid_a")
log_message("Activated.")
set_ready_state(0)
else
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
droid_overlay = new(icon, icon_state = "repair_droid")
log_message("Deactivated.")
set_ready_state(1)
@@ -232,7 +232,7 @@
/obj/item/mecha_parts/mecha_equipment/repair_droid/process()
if(!chassis)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
set_ready_state(1)
return
var/h_boost = health_boost
@@ -250,10 +250,10 @@
repaired = 1
if(repaired)
if(!chassis.use_power(energy_drain))
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
set_ready_state(1)
else //no repair needed, we turn off
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
set_ready_state(1)
chassis.overlays -= droid_overlay
droid_overlay = new(icon, icon_state = "repair_droid")
@@ -273,11 +273,11 @@
selectable = 0
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/detach()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
..()
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_charge()
@@ -302,11 +302,11 @@
..()
if(href_list["toggle_relay"])
if(equip_ready) //inactive
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
set_ready_state(0)
log_message("Activated.")
else
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
set_ready_state(1)
log_message("Deactivated.")
@@ -317,12 +317,12 @@
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/process()
if(!chassis || chassis.internal_damage & MECHA_INT_SHORT_CIRCUIT)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
set_ready_state(1)
return
var/cur_charge = chassis.get_charge()
if(isnull(cur_charge) || !chassis.cell)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
set_ready_state(1)
occupant_message("No powercell detected.")
return
@@ -358,11 +358,11 @@
/obj/item/mecha_parts/mecha_equipment/generator/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/generator/detach()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
..()
/obj/item/mecha_parts/mecha_equipment/generator/Topic(href, href_list)
@@ -370,11 +370,11 @@
if(href_list["toggle"])
if(equip_ready) //inactive
set_ready_state(0)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
log_message("Activated.")
else
set_ready_state(1)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
log_message("Deactivated.")
/obj/item/mecha_parts/mecha_equipment/generator/get_equip_info()
@@ -447,11 +447,11 @@
/obj/item/mecha_parts/mecha_equipment/generator/process()
if(!chassis)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
set_ready_state(1)
return
if(fuel_amount<=0)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
log_message("Deactivated - no fuel.")
set_ready_state(1)
return
@@ -460,7 +460,7 @@
set_ready_state(1)
occupant_message("No powercell detected.")
log_message("Deactivated.")
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
var/use_fuel = fuel_per_cycle_idle
if(cur_charge < chassis.cell.maxcharge)
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 6cfd1d63942..35b94e2eed2 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -118,7 +118,7 @@
smoke_system.attach(src)
add_cell()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
GLOB.poi_list |= src
log_message("[src] created.")
GLOB.mechas_list += src //global mech list
@@ -670,7 +670,7 @@
QDEL_NULL(cell)
QDEL_NULL(internal_tank)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
GLOB.poi_list.Remove(src)
equipment.Cut()
cell = null
diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm
index 59533b338a4..b44c4e3dd1b 100644
--- a/code/game/objects/effects/effect_system/effects_foam.dm
+++ b/code/game/objects/effects/effect_system/effects_foam.dm
@@ -24,7 +24,7 @@
spawn(3 + metal*3)
process()
spawn(120)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
sleep(30)
if(metal)
diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm
index 405a0ec46f7..ddce32f68fa 100644
--- a/code/game/objects/effects/effect_system/effects_smoke.dm
+++ b/code/game/objects/effects/effect_system/effects_smoke.dm
@@ -30,15 +30,15 @@
/obj/effect/particle_effect/smoke/New()
..()
- processing_objects |= src
+ START_PROCESSING(SSobj, src)
lifetime += rand(-1,1)
/obj/effect/particle_effect/smoke/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/particle_effect/smoke/proc/kill_smoke()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
INVOKE_ASYNC(src, .proc/fade_out)
QDEL_IN(src, 10)
diff --git a/code/game/objects/effects/snowcloud.dm b/code/game/objects/effects/snowcloud.dm
index 08a64d62f17..5723b66bc04 100644
--- a/code/game/objects/effects/snowcloud.dm
+++ b/code/game/objects/effects/snowcloud.dm
@@ -9,12 +9,12 @@
/obj/effect/snowcloud/New(turf, obj/machinery/snow_machine/SM)
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
if(SM && istype(SM))
parent_machine = SM
/obj/effect/snowcloud/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/snowcloud/process()
@@ -73,12 +73,12 @@
anchored = TRUE
/obj/effect/snow/New()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
icon_state = "snow[rand(1,6)]"
..()
/obj/effect/snow/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/snow/process()
diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm
index f0233bb0f9e..d4336aa6cf3 100644
--- a/code/game/objects/effects/spiders.dm
+++ b/code/game/objects/effects/spiders.dm
@@ -107,7 +107,7 @@
..()
pixel_x = rand(3,-3)
pixel_y = rand(3,-3)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/structure/spider/eggcluster/process()
amount_grown += rand(0,2)
@@ -140,10 +140,10 @@
..()
pixel_x = rand(6,-6)
pixel_y = rand(6,-6)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/structure/spider/spiderling/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
entry_vent = null
return ..()
diff --git a/code/game/objects/items/ashtray.dm b/code/game/objects/items/ashtray.dm
index b32176cb155..5a86d3d6213 100644
--- a/code/game/objects/items/ashtray.dm
+++ b/code/game/objects/items/ashtray.dm
@@ -28,7 +28,7 @@
var/obj/item/clothing/mask/cigarette/cig = W
if(cig.lit == 1)
src.visible_message("[user] crushes [cig] in [src], putting it out.")
- processing_objects.Remove(cig)
+ STOP_PROCESSING(SSobj, cig)
var/obj/item/butt = new cig.type_butt(src)
cig.transfer_fingerprints_to(butt)
qdel(cig)
diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm
index 85780484264..5ea13308de5 100644
--- a/code/game/objects/items/candle.dm
+++ b/code/game/objects/items/candle.dm
@@ -18,7 +18,7 @@
light(show_message = 0)
/obj/item/candle/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/candle/update_icon()
@@ -62,7 +62,7 @@
if(show_message)
usr.visible_message(show_message)
set_light(CANDLE_LUM)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
update_icon()
diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm
index 575ce0cb6d6..7bf80244072 100644
--- a/code/game/objects/items/devices/camera_bug.dm
+++ b/code/game/objects/items/devices/camera_bug.dm
@@ -32,7 +32,7 @@
/obj/item/camera_bug/New()
..()
- processing_objects += src
+ START_PROCESSING(SSobj, src)
/obj/item/camera_bug/Destroy()
get_cameras()
diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm
index 27132b75346..5fa2bd692e0 100644
--- a/code/game/objects/items/devices/chameleonproj.dm
+++ b/code/game/objects/items/devices/chameleonproj.dm
@@ -227,7 +227,7 @@
return PROCESS_KILL
/obj/item/borg_chameleon/proc/activate(mob/living/silicon/robot/syndicate/saboteur/user)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
S = user
user.base_icon = disguise
user.icon_state = disguise
@@ -236,7 +236,7 @@
user.update_icons()
/obj/item/borg_chameleon/proc/deactivate(mob/living/silicon/robot/syndicate/saboteur/user)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
S = user
user.base_icon = initial(user.base_icon)
user.icon_state = initial(user.icon_state)
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index d0b8637b280..2fb1aae8ff0 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -207,10 +207,10 @@
/obj/item/flash/cameraflash/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/flash/cameraflash/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/flash/cameraflash/process() //this and the two parts above are part of the charge system.
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index 24c8cbcd3b7..316b937f749 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -183,10 +183,10 @@
turn_off()
if(!fuel)
src.icon_state = "[initial(icon_state)]-empty"
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
/obj/item/flashlight/flare/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/flashlight/flare/proc/turn_off()
@@ -222,7 +222,7 @@
user.visible_message("[user] activates [src].", "You activate [src].")
src.force = on_damage
src.damtype = "fire"
- processing_objects += src
+ START_PROCESSING(SSobj, src)
// GLOWSTICKS
@@ -344,10 +344,10 @@
/obj/item/flashlight/emp/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/flashlight/emp/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/flashlight/emp/process()
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index 32b548c38aa..43b22eb4979 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -167,7 +167,7 @@
if(energy <= max_energy)
if(!recharging)
recharging = 1
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
if(energy <= 0)
to_chat(user, "You've overused the battery of [src], now it needs time to recharge!")
recharge_locked = 1
diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm
index d142136ed23..62fc36863fc 100644
--- a/code/game/objects/items/devices/multitool.dm
+++ b/code/game/objects/items/devices/multitool.dm
@@ -47,10 +47,10 @@
/obj/item/multitool/ai_detect/New()
..()
- processing_objects += src
+ START_PROCESSING(SSobj, src)
/obj/item/multitool/ai_detect/Destroy()
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/multitool/ai_detect/process()
diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm
index 0d0475df8ee..463223f4268 100644
--- a/code/game/objects/items/devices/powersink.dm
+++ b/code/game/objects/items/devices/powersink.dm
@@ -26,7 +26,7 @@
var/obj/structure/cable/attached // the attached cable
/obj/item/powersink/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
GLOB.processing_power_items.Remove(src)
PN = null
attached = null
@@ -53,7 +53,7 @@
return
else
if(mode == 2)
- processing_objects.Remove(src) // Now the power sink actually stops draining the station's power if you unhook it. --NeoFite
+ STOP_PROCESSING(SSobj, src) // Now the power sink actually stops draining the station's power if you unhook it. --NeoFite
GLOB.processing_power_items.Remove(src)
anchored = 0
mode = 0
@@ -76,14 +76,14 @@
src.visible_message("[user] activates [src]!")
mode = 2
icon_state = "powersink1"
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
GLOB.processing_power_items.Add(src)
if(2) //This switch option wasn't originally included. It exists now. --NeoFite
src.visible_message("[user] deactivates [src]!")
mode = 1
set_light(0)
icon_state = "powersink0"
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
GLOB.processing_power_items.Remove(src)
/obj/item/powersink/pwr_drain()
diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm
index 62057880b9b..3064b0ae3c8 100644
--- a/code/game/objects/items/devices/radio/intercom.dm
+++ b/code/game/objects/items/devices/radio/intercom.dm
@@ -49,7 +49,7 @@
..()
buildstage = building
if(buildstage)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
if(ndir)
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
@@ -105,7 +105,7 @@
)
/obj/item/radio/intercom/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
GLOB.global_intercoms.Remove(src)
return ..()
@@ -150,7 +150,7 @@
b_stat = 1
buildstage = 1
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return 1
else return ..()
if(2)
@@ -163,7 +163,7 @@
buildstage = 3
to_chat(user, "You secure the electronics!")
update_icon()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
for(var/i, i<= 5, i++)
wires.UpdateCut(i,1)
return 1
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 4a20a52fa04..9bb036c4d05 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -34,7 +34,7 @@ REAGENT SCANNER
/obj/item/t_scanner/Destroy()
if(on)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/t_scanner/attack_self(mob/user)
@@ -43,12 +43,12 @@ REAGENT SCANNER
icon_state = copytext(icon_state, 1, length(icon_state))+"[on]"
if(on)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/t_scanner/process()
if(!on)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return null
scan()
diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm
index 064b66b78f4..0b9f6c3aca9 100644
--- a/code/game/objects/items/robot/robot_upgrades.dm
+++ b/code/game/objects/items/robot/robot_upgrades.dm
@@ -256,7 +256,7 @@
/obj/item/borg/upgrade/selfrepair/Destroy()
cyborg = null
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
on = 0
return ..()
@@ -264,10 +264,10 @@
on = !on
if(on)
to_chat(cyborg, "You activate the self-repair module.")
- processing_objects |= src
+ START_PROCESSING(SSobj, src)
else
to_chat(cyborg, "You deactivate the self-repair module.")
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
update_icon()
/obj/item/borg/upgrade/selfrepair/update_icon()
@@ -280,7 +280,7 @@
icon_state = "cyborg_upgrade5"
/obj/item/borg/upgrade/selfrepair/proc/deactivate()
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
on = 0
update_icon()
diff --git a/code/game/objects/items/weapons/caution.dm b/code/game/objects/items/weapons/caution.dm
index a4599a2e79f..b1b573f77ad 100644
--- a/code/game/objects/items/weapons/caution.dm
+++ b/code/game/objects/items/weapons/caution.dm
@@ -26,7 +26,7 @@
return
timing = !timing
if(timing)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
armed = 0
timepassed = 0
@@ -34,7 +34,7 @@
/obj/item/caution/proximity_sign/process()
if(!timing)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
timepassed++
if(timepassed >= 15 && !armed)
armed = 1
diff --git a/code/game/objects/items/weapons/chrono_eraser.dm b/code/game/objects/items/weapons/chrono_eraser.dm
index 58c2dd2594f..7e7f1642e3a 100644
--- a/code/game/objects/items/weapons/chrono_eraser.dm
+++ b/code/game/objects/items/weapons/chrono_eraser.dm
@@ -177,7 +177,7 @@
update_icon()
desc = initial(desc) + "
It appears to contain [target.name]."
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/effect/chrono_field/Destroy()
if(gun && gun.field_check(src))
diff --git a/code/game/objects/items/weapons/cigs.dm b/code/game/objects/items/weapons/cigs.dm
index 1378b5c004d..ce9f5d916a2 100644
--- a/code/game/objects/items/weapons/cigs.dm
+++ b/code/game/objects/items/weapons/cigs.dm
@@ -48,7 +48,7 @@ LIGHTERS ARE IN LIGHTERS.DM
/obj/item/clothing/mask/cigarette/Destroy()
QDEL_NULL(reagents)
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/clothing/mask/cigarette/attack(mob/living/M, mob/living/user, def_zone)
@@ -161,7 +161,7 @@ LIGHTERS ARE IN LIGHTERS.DM
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
set_light(2, 0.25, "#E38F46")
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/clothing/mask/cigarette/process()
@@ -213,7 +213,7 @@ LIGHTERS ARE IN LIGHTERS.DM
var/mob/living/M = loc
to_chat(M, "Your [name] goes out.")
M.unEquip(src, 1) //Force the un-equip so the overlays update
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
qdel(src)
@@ -341,7 +341,7 @@ LIGHTERS ARE IN LIGHTERS.DM
if(flavor_text)
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/clothing/mask/cigarette/pipe/process()
var/turf/location = get_turf(src)
@@ -355,7 +355,7 @@ LIGHTERS ARE IN LIGHTERS.DM
icon_state = icon_off
item_state = icon_off
M.update_inv_wear_mask(0)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
smoke()
return
@@ -366,7 +366,7 @@ LIGHTERS ARE IN LIGHTERS.DM
lit = 0
icon_state = icon_off
item_state = icon_off
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
if(smoketime <= 0)
to_chat(user, "You refill the pipe with tobacco.")
diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm
index 75d29c7c6be..dd67d7c67a4 100644
--- a/code/game/objects/items/weapons/flamethrower.dm
+++ b/code/game/objects/items/weapons/flamethrower.dm
@@ -33,7 +33,7 @@
/obj/item/flamethrower/process()
if(!lit)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return null
var/turf/location = loc
if(istype(location, /mob/))
@@ -141,7 +141,7 @@
if(!status) return
lit = !lit
if(lit)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
if(href_list["remove"])
if(!ptank) return
usr.put_in_hands(ptank)
diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm
index dd65df1ea3f..4bddaf551ea 100644
--- a/code/game/objects/items/weapons/garrote.dm
+++ b/code/game/objects/items/weapons/garrote.dm
@@ -44,7 +44,7 @@
strangling = null
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
else
..()
@@ -97,7 +97,7 @@
M.AdjustSilence(1)
garrote_time = world.time + 10
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
strangling = M
update_icon()
@@ -113,14 +113,14 @@
if(!strangling)
// Our mark got gibbed or similar
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
if(!istype(loc, /mob/living/carbon/human))
strangling = null
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
var/mob/living/carbon/human/user = loc
@@ -138,7 +138,7 @@
strangling = null
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
@@ -148,7 +148,7 @@
strangling = null
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm
index 9e471583d3b..a20dd86c897 100644
--- a/code/game/objects/items/weapons/holy_weapons.dm
+++ b/code/game/objects/items/weapons/holy_weapons.dm
@@ -402,10 +402,10 @@
/obj/item/nullrod/tribal_knife/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/nullrod/tribal_knife/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/nullrod/tribal_knife/process()
@@ -432,10 +432,10 @@
/obj/item/nullrod/rosary/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/nullrod/rosary/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/nullrod/rosary/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
diff --git a/code/game/objects/items/weapons/implants/implant_abductor.dm b/code/game/objects/items/weapons/implants/implant_abductor.dm
index a86545f8722..64bb7345f7a 100644
--- a/code/game/objects/items/weapons/implants/implant_abductor.dm
+++ b/code/game/objects/items/weapons/implants/implant_abductor.dm
@@ -13,7 +13,7 @@
if(cooldown == total_cooldown)
home.Retrieve(imp_in,1)
cooldown = 0
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
to_chat(imp_in, "You must wait [(total_cooldown - cooldown)*2] seconds to use [src] again!")
@@ -21,7 +21,7 @@
if(cooldown < total_cooldown)
cooldown++
if(cooldown == total_cooldown)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
/obj/item/implant/abductor/implant(mob/source, mob/user)
if(..())
diff --git a/code/game/objects/items/weapons/implants/implant_death_alarm.dm b/code/game/objects/items/weapons/implants/implant_death_alarm.dm
index dea34b2ba91..68c8e111520 100644
--- a/code/game/objects/items/weapons/implants/implant_death_alarm.dm
+++ b/code/game/objects/items/weapons/implants/implant_death_alarm.dm
@@ -18,7 +18,7 @@
return dat
/obj/item/implant/death_alarm/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/implant/death_alarm/process()
@@ -61,12 +61,12 @@
/obj/item/implant/death_alarm/implant(mob/target)
if(..())
mobname = target.real_name
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
return 1
return 0
/obj/item/implant/death_alarm/removed(mob/target)
if(..())
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return 1
return 0
diff --git a/code/game/objects/items/weapons/lighters.dm b/code/game/objects/items/weapons/lighters.dm
index a2d8b03da84..ab946de5f0f 100644
--- a/code/game/objects/items/weapons/lighters.dm
+++ b/code/game/objects/items/weapons/lighters.dm
@@ -58,7 +58,7 @@
user.visible_message("After a few attempts, [user] manages to light the [src], [user.p_they()] however burn[user.p_s()] [user.p_their()] finger in the process.")
set_light(2)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
lit = 0
w_class = WEIGHT_CLASS_TINY
@@ -74,7 +74,7 @@
user.visible_message("[user] quietly shuts off the [src].")
set_light(0)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
else
return ..()
return
@@ -181,7 +181,7 @@
name = "lit match"
desc = "A match. This one is lit."
attack_verb = list("burnt","singed")
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
update_icon()
return TRUE
@@ -196,7 +196,7 @@
name = "burnt match"
desc = "A match. This one has seen better days."
attack_verb = list("flicked")
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return TRUE
/obj/item/match/dropped(mob/user)
diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm
index e642e3b994a..7c5c6f9421f 100644
--- a/code/game/objects/items/weapons/mop.dm
+++ b/code/game/objects/items/weapons/mop.dm
@@ -89,14 +89,14 @@
/obj/item/mop/advanced/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/mop/advanced/attack_self(mob/user)
refill_enabled = !refill_enabled
if(refill_enabled)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
to_chat(user, "You set the condenser switch to the '[refill_enabled ? "ON" : "OFF"]' position.")
playsound(user, 'sound/machines/click.ogg', 30, 1)
@@ -111,7 +111,7 @@
/obj/item/mop/advanced/Destroy()
if(refill_enabled)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm
index 03cf28b25ed..e8a181a197b 100644
--- a/code/game/objects/items/weapons/storage/bags.dm
+++ b/code/game/objects/items/weapons/storage/bags.dm
@@ -107,7 +107,7 @@
/obj/item/storage/bag/plasticbag/equipped(var/mob/user, var/slot)
if(slot==slot_head)
storage_slots = 0
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
return
/obj/item/storage/bag/plasticbag/process()
@@ -120,7 +120,7 @@
H.AdjustLoseBreath(1)
else
storage_slots = 7
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
// -----------------------------
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index abf68deb765..0e3c9aa5d8e 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -642,7 +642,7 @@
new /obj/item/grenade/smokebomb(src)
new /obj/item/restraints/legcuffs/bola(src)
new /obj/item/restraints/legcuffs/bola(src)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
cooldown = world.time
/obj/item/storage/belt/bluespace/owlman/process()
diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm
index d533a7e595b..c44264c6529 100644
--- a/code/game/objects/items/weapons/tanks/tanks.dm
+++ b/code/game/objects/items/weapons/tanks/tanks.dm
@@ -27,13 +27,13 @@
air_contents.volume = volume //liters
air_contents.temperature = T20C
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
return
/obj/item/tank/Destroy()
QDEL_NULL(air_contents)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm
index 98f97b66f53..7afb1885ea2 100644
--- a/code/game/objects/items/weapons/tools.dm
+++ b/code/game/objects/items/weapons/tools.dm
@@ -377,7 +377,7 @@
damtype = "brute"
update_icon()
if(!can_off_process)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
//Welders left on now use up fuel, but lets not have them run out quite that fast
if(1)
@@ -539,7 +539,7 @@
damtype = "fire"
hitsound = 'sound/items/welder.ogg'
update_icon()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
to_chat(user, "You need more fuel!")
switched_off(user)
diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm
index 29f2c2dd488..4053f747af5 100644
--- a/code/game/objects/items/weapons/twohanded.dm
+++ b/code/game/objects/items/weapons/twohanded.dm
@@ -557,10 +557,10 @@
/obj/item/twohanded/singularityhammer/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/twohanded/singularityhammer/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/twohanded/singularityhammer/process()
@@ -664,10 +664,10 @@
/obj/item/twohanded/knighthammer/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/twohanded/knighthammer/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/twohanded/knighthammer/process()
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index 6506a5fdf2e..c2428dd8d97 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -66,17 +66,14 @@
// Nada
/obj/Destroy()
- GLOB.machines -= src
- processing_objects -= src
- GLOB.fast_processing -= src
+ if(!ismachinery(src))
+ if(!speed_process)
+ STOP_PROCESSING(SSobj, src) // TODO: Have a processing bitflag to reduce on unnecessary loops through the processing lists
+ else
+ STOP_PROCESSING(SSfastprocess, src)
SSnanoui.close_uis(src)
return ..()
-/obj/proc/process()
- set waitfor = 0
- processing_objects.Remove(src)
- return 0
-
//user: The mob that is suiciding
//damagetype: The type of damage the item will inflict on the user
//BRUTELOSS = 1
@@ -300,15 +297,15 @@ a {
if(speed_process)
return
speed_process = TRUE
- processing_objects.Remove(src)
- GLOB.fast_processing.Add(src)
+ STOP_PROCESSING(SSobj, src)
+ START_PROCESSING(SSfastprocess, src)
/obj/proc/makeNormalProcess()
if(!speed_process)
return
speed_process = FALSE
- processing_objects.Add(src)
- GLOB.fast_processing.Remove(src)
+ START_PROCESSING(SSobj, src)
+ STOP_PROCESSING(SSfastprocess, src)
/obj/vv_get_dropdown()
. = ..()
diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm
index 0692c90ec6d..909ee79e1ab 100644
--- a/code/game/objects/structures/crates_lockers/closets/statue.dm
+++ b/code/game/objects/structures/crates_lockers/closets/statue.dm
@@ -41,7 +41,7 @@
qdel(src)
return
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
..()
/obj/structure/closet/statue/process()
@@ -53,7 +53,7 @@
M.setOxyLoss(intialOxy)
if(timer <= 0)
dump_contents()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
qdel(src)
/obj/structure/closet/statue/dump_contents()
diff --git a/code/game/objects/structures/depot.dm b/code/game/objects/structures/depot.dm
index b286749f908..a3dc4ac7007 100644
--- a/code/game/objects/structures/depot.dm
+++ b/code/game/objects/structures/depot.dm
@@ -87,7 +87,7 @@
/obj/effect/overload/New()
. = ..()
// Do not attempt to put the code below into Initialize() or even LateInitialize() with a "return INITIALIZE_HINT_LATELOAD". It won't work!
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
depotarea = areaMaster
if(istype(depotarea))
if(!depotarea.used_self_destruct)
@@ -122,6 +122,6 @@
for(var/obj/mecha/E in range(30, T))
E.Destroy()
explosion(get_turf(src), 25, 35, 45, 55, 1, 1, 60, 0, 0)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
qdel(src)
diff --git a/code/game/objects/structures/misc.dm b/code/game/objects/structures/misc.dm
index 6be7bf072d8..01fab63dd57 100644
--- a/code/game/objects/structures/misc.dm
+++ b/code/game/objects/structures/misc.dm
@@ -92,11 +92,11 @@
last_ghost_alert = world.time
attack_atom = src
if(active)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/structure/ghost_beacon/Destroy()
if(active)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
attack_atom = null
return ..()
@@ -111,9 +111,9 @@
return
to_chat(user, "You [active ? "disable" : "enable"] \the [src].")
if(active)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
else
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
active = !active
/obj/structure/ghost_beacon/process()
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index f0a0c89880f..1bb19a81bd2 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -14,7 +14,7 @@ GLOBAL_LIST_EMPTY(safes)
desc = "A huge chunk of metal with a dial embedded in it. Fine print on the dial reads \"Scarborough Arms tumbler safe, guaranteed thermite resistant, explosion resistant, and assistant resistant.\""
icon = 'icons/obj/structures.dmi'
icon_state = "safe"
-
+
anchored = TRUE
density = TRUE
resistance_flags = LAVA_PROOF | FIRE_PROOF
@@ -159,14 +159,14 @@ GLOBAL_LIST_EMPTY(safes)
drill_start_time = world.time
drill.soundloop.start()
update_icon()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
if("Turn Off")
if(do_after(user, 2 SECONDS, target = src))
deltimer(drill_timer)
drill_timer = null
drill.soundloop.stop()
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
if("Remove Drill")
if(drill_timer)
to_chat(user, "You cant remove the drill while it's running!")
@@ -208,7 +208,7 @@ GLOBAL_LIST_EMPTY(safes)
if(current_tick == 2)
to_chat(user, "The sounds from [src] are too fast and blend together.")
-
+
if(total_ticks == 1 || prob(10))
to_chat(user, "You hear a [pick(sounds)] from [src].")
@@ -252,7 +252,7 @@ GLOBAL_LIST_EMPTY(safes)
var/invalid_turn = current_tumbler_index % 2 == 0 || current_tumbler_index > number_of_tumblers
if(invalid_turn) // The moment you turn the wrong way or go too far, the tumblers reset
current_tumbler_index = 1
-
+
if(!invalid_turn && dial == tumblers[current_tumbler_index])
notify_user(user, canhear, list("tink", "krink", "plink"), ticks, i)
current_tumbler_index++
@@ -308,7 +308,7 @@ GLOBAL_LIST_EMPTY(safes)
drill_timer = null
drill.soundloop.stop()
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
/obj/structure/safe/attackby(obj/item/I, mob/user, params)
if(open)
diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm
index 810659d81bb..04271015f4c 100644
--- a/code/game/objects/structures/transit_tubes/station.dm
+++ b/code/game/objects/structures/transit_tubes/station.dm
@@ -19,10 +19,10 @@
/obj/structure/transit_tube/station/New()
..()
- processing_objects += src
+ START_PROCESSING(SSobj, src)
/obj/structure/transit_tube/station/Destroy()
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
return ..()
// Stations which will send the tube in the opposite direction after their stop.
diff --git a/code/modules/alarm/alarm.dm b/code/modules/alarm/alarm.dm
index 1d4a570999a..798c5176770 100644
--- a/code/modules/alarm/alarm.dm
+++ b/code/modules/alarm/alarm.dm
@@ -29,7 +29,7 @@
cameras() // Sets up both cameras and last alarm area.
set_source_data(source, duration, severity)
-/datum/alarm/proc/process()
+/datum/alarm/process()
// Has origin gone missing?
if(!origin && !end_time)
end_time = world.time + ALARM_RESET_DELAY
diff --git a/code/modules/alarm/alarm_handler.dm b/code/modules/alarm/alarm_handler.dm
index cd09ebe4427..56a673bb5b4 100644
--- a/code/modules/alarm/alarm_handler.dm
+++ b/code/modules/alarm/alarm_handler.dm
@@ -7,7 +7,7 @@
var/list/datum/alarm/alarms_assoc = new // Associative list of alarms, to efficiently acquire them based on origin.
var/list/listeners = new // A list of all objects interested in alarm changes.
-/datum/alarm_handler/proc/process()
+/datum/alarm_handler/process()
for(var/datum/alarm/A in alarms)
A.process()
check_alarm_cleared(A)
diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm
index a5dfb44aae2..5e0b463af30 100644
--- a/code/modules/assembly/assembly.dm
+++ b/code/modules/assembly/assembly.dm
@@ -125,7 +125,7 @@
..()
/obj/item/assembly/process()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
/obj/item/assembly/examine(mob/user)
..()
diff --git a/code/modules/assembly/health.dm b/code/modules/assembly/health.dm
index 853733784fa..3a543e38f72 100644
--- a/code/modules/assembly/health.dm
+++ b/code/modules/assembly/health.dm
@@ -21,10 +21,10 @@
/obj/item/assembly/health/toggle_secure()
secured = !secured
if(secured && scanning)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
scanning = FALSE
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
update_icon()
return secured
@@ -66,9 +66,9 @@
return FALSE
scanning = !scanning
if(scanning)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
/obj/item/assembly/health/interact(mob/user)//TODO: Change this to the wires thingy
diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm
index 91f8da7cc4b..d6da1fb4d0e 100644
--- a/code/modules/assembly/infrared.dm
+++ b/code/modules/assembly/infrared.dm
@@ -42,12 +42,12 @@
/obj/item/assembly/infra/toggle_secure()
secured = !secured
if(secured)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
on = FALSE
if(first)
qdel(first)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
update_icon()
return secured
diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm
index 80e486170c2..e6ae3ec7bc4 100644
--- a/code/modules/assembly/proximity.dm
+++ b/code/modules/assembly/proximity.dm
@@ -28,11 +28,11 @@
/obj/item/assembly/prox_sensor/toggle_secure()
secured = !secured
if(secured)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
scanning = 0
timing = 0
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
update_icon()
return secured
diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm
index 5b7eb6ca50a..2c2216fa9d0 100644
--- a/code/modules/assembly/timer.dm
+++ b/code/modules/assembly/timer.dm
@@ -29,10 +29,10 @@
/obj/item/assembly/timer/toggle_secure()
secured = !secured
if(secured)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
timing = FALSE
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
update_icon()
return secured
diff --git a/code/modules/atmos_automation/statements.dm b/code/modules/atmos_automation/statements.dm
index 31ee71b7a7d..72937e18eae 100644
--- a/code/modules/atmos_automation/statements.dm
+++ b/code/modules/atmos_automation/statements.dm
@@ -29,7 +29,7 @@ var/global/automation_types = subtypesof(/datum/automation)
/datum/automation/proc/OnRemove()
return
-/datum/automation/proc/process()
+/datum/automation/process()
return
/datum/automation/proc/Evaluate()
diff --git a/code/modules/awaymissions/snpc.dm b/code/modules/awaymissions/snpc.dm
index 04e3bf19b8e..8d65aa44a92 100644
--- a/code/modules/awaymissions/snpc.dm
+++ b/code/modules/awaymissions/snpc.dm
@@ -47,7 +47,7 @@
var/list/squad
/obj/effect/spawner/snpc_squad/New()
- processing_objects += src
+ START_PROCESSING(SSobj, src)
squad = squads[squad_type]
if(!squad)
@@ -57,7 +57,7 @@
/obj/effect/spawner/snpc_squad/Destroy()
squad = null
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/spawner/snpc_squad/process()
diff --git a/code/modules/awaymissions/zvis.dm b/code/modules/awaymissions/zvis.dm
index 03adaeda629..3697a4678df 100644
--- a/code/modules/awaymissions/zvis.dm
+++ b/code/modules/awaymissions/zvis.dm
@@ -58,11 +58,11 @@
owner = o
if(args.len >= 3)
params = args.Copy(3)
- processing_objects += src
+ START_PROCESSING(SSobj, src)
trigger()
/obj/effect/portal_sensor/Destroy()
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/portal_sensor/Crossed(A)
diff --git a/code/modules/busy_space/air_traffic.dm b/code/modules/busy_space/air_traffic.dm
index de0b37ed3c3..b5cbf8e6fda 100644
--- a/code/modules/busy_space/air_traffic.dm
+++ b/code/modules/busy_space/air_traffic.dm
@@ -17,7 +17,7 @@ var/datum/lore/atc_controller/atc = new/datum/lore/atc_controller
next_message = world.time + rand(delay_min, delay_max)
process()
-/datum/lore/atc_controller/proc/process()
+/datum/lore/atc_controller/process()
if(world.time >= next_message)
if(squelched)
next_message = world.time + backoff_delay
diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm
index ba1b74aad66..ab0dffee5dc 100644
--- a/code/modules/clothing/head/misc_special.dm
+++ b/code/modules/clothing/head/misc_special.dm
@@ -94,7 +94,7 @@
/obj/item/clothing/head/cakehat/process()
if(!onfire)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
var/turf/location = src.loc
@@ -113,7 +113,7 @@
src.force = 3
src.damtype = "fire"
src.icon_state = "cake1"
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
src.force = null
src.damtype = "brute"
diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm
index 88f94e5b50a..fdd871a3448 100644
--- a/code/modules/clothing/spacesuits/chronosuit.dm
+++ b/code/modules/clothing/spacesuits/chronosuit.dm
@@ -122,7 +122,7 @@
else
new_camera(user)
else
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
/obj/item/clothing/suit/space/chronos/proc/activate()
if(!activating && !activated && !teleporting)
@@ -143,7 +143,7 @@
to_chat(user, "\[ ok \] Starting ui display driver")
to_chat(user, "\[ ok \] Initializing chronowalk4-view")
new_camera(user)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
activated = 1
else
to_chat(user, "\[ fail \] Mounting /dev/helmet")
diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm
index 382ff910277..9a0354b6b0f 100644
--- a/code/modules/clothing/spacesuits/hardsuit.dm
+++ b/code/modules/clothing/spacesuits/hardsuit.dm
@@ -633,7 +633,7 @@
owner.visible_message("[owner]'s shields deflect [attack_text] in a shower of sparks!")
current_charges--
recharge_cooldown = world.time + recharge_delay
- processing_objects |= src
+ START_PROCESSING(SSobj, src)
if(current_charges <= 0)
owner.visible_message("[owner]'s shield overloads!")
shield_state = "broken"
@@ -643,7 +643,7 @@
/obj/item/clothing/suit/space/hardsuit/shielded/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/clothing/suit/space/hardsuit/shielded/process()
@@ -652,7 +652,7 @@
playsound(loc, 'sound/magic/charge.ogg', 50, 1)
if(current_charges == max_charges)
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
shield_state = "[shield_on]"
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/C = loc
diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm
index c65ea335c4d..913e65af734 100644
--- a/code/modules/clothing/spacesuits/rig/rig.dm
+++ b/code/modules/clothing/spacesuits/rig/rig.dm
@@ -110,7 +110,7 @@
spark_system.set_up(5, 0, src)
spark_system.attach(src)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
if(initial_modules && initial_modules.len)
for(var/path in initial_modules)
@@ -166,7 +166,7 @@
if(istype(M))
M.unEquip(piece)
qdel(piece)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
QDEL_NULL(wires)
QDEL_NULL(spark_system)
return ..()
diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm
index 3499bce8e49..13ef3e074da 100644
--- a/code/modules/clothing/suits/miscellaneous.dm
+++ b/code/modules/clothing/suits/miscellaneous.dm
@@ -186,10 +186,10 @@
/obj/item/clothing/suit/corgisuit/super_hero/en/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/clothing/suit/corgisuit/super_hero/en/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/clothing/suit/corgisuit/super_hero/en/process()
@@ -883,7 +883,7 @@
/obj/item/clothing/suit/advanced_protective_suit/Destroy()
if(on)
on = 0
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/clothing/suit/advanced_protective_suit/ui_action_click()
@@ -893,7 +893,7 @@
else
on = 1
to_chat(usr, "You turn the suit's special processes on.")
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/clothing/suit/advanced_protective_suit/IsReflect()
@@ -912,7 +912,7 @@
if(user.reagents.get_reagent_amount("syndicate_nanites") < 15)
user.reagents.add_reagent("syndicate_nanites", 15)
else
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
//Syndicate Chaplain Robe (WOLOLO!)
/obj/item/clothing/suit/hooded/chaplain_hoodie/missionary_robe
@@ -924,22 +924,22 @@
if(linked_staff) //delink on destruction
linked_staff.robes = null
linked_staff = null
- processing_objects -= src //probably is cleared in a parent call already, but just in case we're gonna do it here
+ STOP_PROCESSING(SSobj, src) //probably is cleared in a parent call already, but just in case we're gonna do it here
return ..()
/obj/item/clothing/suit/hooded/chaplain_hoodie/missionary_robe/equipped(mob/living/carbon/human/H, slot)
if(!istype(H) || slot != slot_wear_suit)
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
return
else
- processing_objects |= src
+ START_PROCESSING(SSobj, src)
/obj/item/clothing/suit/hooded/chaplain_hoodie/missionary_robe/process()
if(!linked_staff) //if we don't have a linked staff, the rest of this is useless
return
if(!ishuman(loc)) //if we somehow try to process while not on a human, remove ourselves from processing and return
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
return
var/mob/living/carbon/human/H = loc
diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm
index 6b08e2e4e49..b1da17677de 100644
--- a/code/modules/clothing/under/accessories/accessory.dm
+++ b/code/modules/clothing/under/accessories/accessory.dm
@@ -574,7 +574,7 @@
/obj/item/clothing/accessory/petcollar/Destroy()
QDEL_NULL(access_id)
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/clothing/accessory/petcollar/attack_self(mob/user as mob)
@@ -617,10 +617,10 @@
/obj/item/clothing/accessory/petcollar/equipped(mob/living/simple_animal/user)
if(istype(user))
- processing_objects |= src
+ START_PROCESSING(SSobj, src)
/obj/item/clothing/accessory/petcollar/dropped(mob/living/simple_animal/user)
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
/obj/item/clothing/accessory/petcollar/process()
var/mob/living/simple_animal/M = loc
@@ -636,7 +636,7 @@
else
a.autosay("[M] has been vandalized in [t.name]!", "[M]'s Death Alarm")
qdel(a)
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
/proc/english_accessory_list(obj/item/clothing/under/U)
if(!istype(U) || !U.accessories.len)
diff --git a/code/modules/countdown/countdown.dm b/code/modules/countdown/countdown.dm
index d860ba9c4cd..8769e5e321a 100644
--- a/code/modules/countdown/countdown.dm
+++ b/code/modules/countdown/countdown.dm
@@ -28,13 +28,13 @@
/obj/effect/countdown/proc/start()
if(!started)
- GLOB.fast_processing += src
+ START_PROCESSING(SSfastprocess, src)
started = TRUE
/obj/effect/countdown/proc/stop()
if(started)
maptext = null
- GLOB.fast_processing -= src
+ STOP_PROCESSING(SSfastprocess, src)
started = FALSE
/obj/effect/countdown/proc/get_value()
@@ -57,7 +57,7 @@
/obj/effect/countdown/Destroy()
attached_to = null
- GLOB.fast_processing -= src
+ STOP_PROCESSING(SSfastprocess, src)
return ..()
/obj/effect/countdown/ex_act(severity) //immune to explosions
diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm
index 23206e8b9b3..fc27234648d 100644
--- a/code/modules/customitems/item_defines.dm
+++ b/code/modules/customitems/item_defines.dm
@@ -760,10 +760,10 @@
/obj/item/clothing/head/pirate/fluff/stumpy/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/clothing/head/pirate/fluff/stumpy/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/clothing/head/pirate/fluff/stumpy/process()
diff --git a/code/modules/events/event.dm b/code/modules/events/event.dm
index a5e07840d34..1186da902f0 100644
--- a/code/modules/events/event.dm
+++ b/code/modules/events/event.dm
@@ -105,7 +105,7 @@
//Do not override this proc, instead use the appropiate procs.
//This proc will handle the calls to the appropiate procs.
-/datum/event/proc/process()
+/datum/event/process()
if(!processing)
return
diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm
index 6cc12faf1b4..3f86b88924c 100644
--- a/code/modules/events/event_container.dm
+++ b/code/modules/events/event_container.dm
@@ -22,7 +22,7 @@ var/list/event_last_fired = list()
var/last_world_time = 0
-/datum/event_container/proc/process()
+/datum/event_container/process()
if(!next_event_time)
set_event_delay()
diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm
index 7d52d7cd969..ced084f05a3 100644
--- a/code/modules/events/spacevine.dm
+++ b/code/modules/events/spacevine.dm
@@ -539,7 +539,7 @@
/obj/structure/spacevine_controller/New(loc, list/muts, potency, production)
color = "#ffffff"
spawn_spacevine_piece(loc, , muts)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
init_subtypes(/datum/spacevine_mutation/, mutations_list)
if(potency != null && potency > 0)
// 1 mutativeness at 10 potency
@@ -567,7 +567,7 @@
return
/obj/structure/spacevine_controller/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/structure/spacevine_controller/proc/spawn_spacevine_piece(turf/location, obj/structure/spacevine/parent, list/muts)
diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm
index 855ac60666b..e937ec25ef9 100644
--- a/code/modules/flufftext/Hallucination.dm
+++ b/code/modules/flufftext/Hallucination.dm
@@ -138,7 +138,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
if(target.client)
target.client.images |= flood_images
next_expand = world.time + FAKE_FLOOD_EXPAND_TIME
- processing_objects += src
+ START_PROCESSING(SSobj, src)
/obj/effect/hallucination/fake_flood/process()
if(next_expand <= world.time)
@@ -162,7 +162,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
target.client.images |= flood_images
/obj/effect/hallucination/fake_flood/Destroy()
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
flood_turfs.Cut()
if(target.client)
target.client.images.Remove(flood_images)
diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm
index 371822643a1..21ba7cb89e2 100644
--- a/code/modules/hydroponics/beekeeping/beebox.dm
+++ b/code/modules/hydroponics/beekeeping/beebox.dm
@@ -47,11 +47,11 @@
/obj/structure/beebox/Initialize(mapload)
. = ..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/structure/beebox/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
for(var/mob/living/simple_animal/hostile/poison/bees/B in bees)
B.beehome = null
bees.Cut()
diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm
index 4ed9d963274..90725f8e46e 100644
--- a/code/modules/hydroponics/grown/towercap.dm
+++ b/code/modules/hydroponics/grown/towercap.dm
@@ -151,7 +151,7 @@
burning = 1
set_light(6, l_color = "#ED9200")
Burn()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/structure/bonfire/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
..()
@@ -186,7 +186,7 @@
icon_state = "bonfire"
burning = 0
set_light(0)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
/obj/structure/bonfire/buckle_mob(mob/living/M, force = 0)
if(..())
diff --git a/code/modules/mining/lavaland/loot/ashdragon_loot.dm b/code/modules/mining/lavaland/loot/ashdragon_loot.dm
index f657fa6ec5f..fd8b8dfa4ef 100644
--- a/code/modules/mining/lavaland/loot/ashdragon_loot.dm
+++ b/code/modules/mining/lavaland/loot/ashdragon_loot.dm
@@ -35,14 +35,14 @@
/obj/item/melee/ghost_sword/New()
..()
spirits = list()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
GLOB.poi_list |= src
/obj/item/melee/ghost_sword/Destroy()
for(var/mob/dead/observer/G in spirits)
G.invisibility = initial(G.invisibility)
spirits.Cut()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
GLOB.poi_list -= src
. = ..()
diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm
index c3887fe4660..d7c6232121f 100644
--- a/code/modules/mining/lavaland/loot/colossus_loot.dm
+++ b/code/modules/mining/lavaland/loot/colossus_loot.dm
@@ -436,7 +436,7 @@
..()
if(isanimal(loc))
holder_animal = loc
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/structure/closet/stasis/Entered(atom/A)
if(isliving(A) && holder_animal)
@@ -450,7 +450,7 @@
holder_animal.verbs -= /mob/living/verb/pulled
/obj/structure/closet/stasis/dump_contents(var/kill = 1)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
for(var/mob/living/L in src)
L.disabilities &= ~MUTE
L.status_flags &= ~GODMODE
diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm
index 3a6c4d22a67..ee9a3c3cca2 100644
--- a/code/modules/mob/holder.dm
+++ b/code/modules/mob/holder.dm
@@ -7,10 +7,10 @@
/obj/item/holder/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/holder/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/holder/process()
diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm
index 087ca959902..04f5cd53d00 100644
--- a/code/modules/mob/living/carbon/brain/brain_item.dm
+++ b/code/modules/mob/living/carbon/brain/brain_item.dm
@@ -107,7 +107,7 @@
/obj/item/organ/internal/brain/necrotize(update_sprite = TRUE) //Brain also has special handling for when it necrotizes
damage = max_damage
status |= ORGAN_DEAD
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
if(dead_icon && !is_robotic())
icon_state = dead_icon
if(owner && vital)
diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
index dd0c5b9f72a..85e48c9a4d3 100644
--- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
+++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
@@ -299,7 +299,7 @@ var/global/chicken_count = 0
E.pixel_y = rand(-6,6)
if(eggsFertile)
if(chicken_count < MAX_CHICKENS && prob(25))
- processing_objects.Add(E)
+ START_PROCESSING(SSobj, E)
/obj/item/reagent_containers/food/snacks/egg/var/amount_grown = 0
/obj/item/reagent_containers/food/snacks/egg/process()
@@ -308,10 +308,10 @@ var/global/chicken_count = 0
if(amount_grown >= 100)
visible_message("[src] hatches with a quiet cracking sound.")
new /mob/living/simple_animal/chick(get_turf(src))
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
qdel(src)
else
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
/mob/living/simple_animal/pig
diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm
index e978a2b4798..75aa563dd86 100644
--- a/code/modules/modular_computers/computers/item/computer.dm
+++ b/code/modules/modular_computers/computers/item/computer.dm
@@ -50,7 +50,7 @@
if(!physical)
physical = src
..()
- processing_objects += src
+ START_PROCESSING(SSobj, src)
all_components = list()
idle_threads = list()
@@ -64,7 +64,7 @@
all_components.Remove(CH.device_type)
qdel(CH)
physical = null
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
return ..()
diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm
index 87649f97512..1dbdcc05b92 100644
--- a/code/modules/nano/nanoui.dm
+++ b/code/modules/nano/nanoui.dm
@@ -506,7 +506,7 @@ nanoui is used to open and update nano browser uis
*
* @return nothing
*/
-/datum/nanoui/proc/process(update = 0)
+/datum/nanoui/process(update = 0)
if(!src_object || !user)
close()
return
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index 528864b18a6..c40cb1667ad 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -621,11 +621,11 @@
/obj/item/paper/evilfax/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/paper/evilfax/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
if(mytarget && !used)
var/mob/living/carbon/target = mytarget
target.ForceContractDisease(new /datum/disease/transformation/corgi(0))
diff --git a/code/modules/pda/mob_hunt_game_app.dm b/code/modules/pda/mob_hunt_game_app.dm
index c08e64b7ae3..2bb28ba0264 100644
--- a/code/modules/pda/mob_hunt_game_app.dm
+++ b/code/modules/pda/mob_hunt_game_app.dm
@@ -21,12 +21,12 @@
/datum/data/pda/app/mob_hunter_game/start()
..()
- processing_objects.Add(pda)
+ START_PROCESSING(SSobj, pda)
/datum/data/pda/app/mob_hunter_game/stop()
..()
disconnect("Program Terminated")
- processing_objects.Remove(pda)
+ STOP_PROCESSING(SSobj, pda)
/datum/data/pda/app/mob_hunter_game/proc/scan_nearby()
if(!SSmob_hunt || !connected)
diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm
index dfe10113f12..4719ff75261 100644
--- a/code/modules/power/cell.dm
+++ b/code/modules/power/cell.dm
@@ -21,23 +21,23 @@
/obj/item/stock_parts/cell/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
charge = maxcharge
if(ratingdesc)
desc += " This one has a power rating of [DisplayPower(maxcharge)], and you should not swallow it."
update_icon()
/obj/item/stock_parts/cell/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/stock_parts/cell/vv_edit_var(var_name, var_value)
switch(var_name)
if("self_recharge")
if(var_value)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/stock_parts/cell/process()
diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm
index 632fb7726ee..12d6c8b831a 100644
--- a/code/modules/power/singularity/singularity.dm
+++ b/code/modules/power/singularity/singularity.dm
@@ -35,7 +35,7 @@
src.energy = starting_energy
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
GLOB.poi_list |= src
GLOB.singularities += src
for(var/obj/machinery/power/singularity_beacon/singubeacon in GLOB.machines)
@@ -44,7 +44,7 @@
break
/obj/singularity/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
GLOB.poi_list.Remove(src)
GLOB.singularities -= src
target = null
diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm
index 2884fc18b4c..f95f5ce2864 100644
--- a/code/modules/power/smes.dm
+++ b/code/modules/power/smes.dm
@@ -13,7 +13,6 @@
icon_state = "smes"
density = 1
anchored = 1
- defer_process = 1
var/capacity = 5e6 // maximum charge
var/charge = 0 // actual charge
diff --git a/code/modules/projectiles/guns/alien.dm b/code/modules/projectiles/guns/alien.dm
index 95e1a586469..2a20e7e6c81 100644
--- a/code/modules/projectiles/guns/alien.dm
+++ b/code/modules/projectiles/guns/alien.dm
@@ -15,10 +15,10 @@
/obj/item/gun/projectile/automatic/spikethrower/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/gun/projectile/automatic/spikethrower/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/gun/projectile/automatic/spikethrower/update_icon()
diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm
index 8c9b0cf66f8..b25420b5491 100644
--- a/code/modules/projectiles/guns/energy.dm
+++ b/code/modules/projectiles/guns/energy.dm
@@ -32,7 +32,7 @@
power_supply.give(power_supply.maxcharge)
update_ammo_types()
if(selfcharge)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
update_icon()
/obj/item/gun/energy/proc/update_ammo_types()
@@ -47,7 +47,7 @@
/obj/item/gun/energy/Destroy()
if(selfcharge)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/gun/energy/process()
@@ -167,9 +167,9 @@
switch(var_name)
if("selfcharge")
if(var_value)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/gun/energy/proc/robocharge()
diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm
index 623986f5837..fa34753c6a9 100644
--- a/code/modules/projectiles/guns/energy/special.dm
+++ b/code/modules/projectiles/guns/energy/special.dm
@@ -340,11 +340,11 @@
/obj/item/gun/energy/temperature/New()
..()
update_icon()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/gun/energy/temperature/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/gun/energy/temperature/newshot()
diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm
index f6d84635c08..75f94dd83d0 100644
--- a/code/modules/projectiles/guns/magic.dm
+++ b/code/modules/projectiles/guns/magic.dm
@@ -51,12 +51,12 @@
charges = max_charges
chambered = new ammo_type(src)
if(can_charge)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/gun/magic/Destroy()
if(can_charge)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
diff --git a/code/modules/projectiles/guns/medbeam.dm b/code/modules/projectiles/guns/medbeam.dm
index face61e79c3..a1677b764e0 100644
--- a/code/modules/projectiles/guns/medbeam.dm
+++ b/code/modules/projectiles/guns/medbeam.dm
@@ -17,10 +17,10 @@
/obj/item/gun/medbeam/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/gun/medbeam/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/gun/medbeam/handle_suicide()
diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm
index 8d7201d0645..69023a3e6e8 100644
--- a/code/modules/reagents/chemistry/holder.dm
+++ b/code/modules/reagents/chemistry/holder.dm
@@ -16,7 +16,7 @@ var/const/INGEST = 2
/datum/reagents/New(maximum = 100)
maximum_volume = maximum
if(!(flags & REAGENT_NOREACT))
- processing_objects |= src
+ START_PROCESSING(SSobj, src)
//I dislike having these here but map-objects are initialised before world/New() is called. >_>
if(!GLOB.chemical_reagents_list)
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
@@ -333,9 +333,9 @@ var/const/INGEST = 2
od_chems.Add(R.id)
return od_chems
-/datum/reagents/proc/process()
+/datum/reagents/process()
if(flags & REAGENT_NOREACT)
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
return
for(var/datum/reagent/R in reagent_list)
@@ -346,9 +346,9 @@ var/const/INGEST = 2
// Order is important, process() can remove from processing if
// the flag is present
flags &= ~(REAGENT_NOREACT)
- processing_objects |= src
+ START_PROCESSING(SSobj, src)
else
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
flags |= REAGENT_NOREACT
/*
@@ -819,7 +819,7 @@ var/const/INGEST = 2
/datum/reagents/Destroy()
. = ..()
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
QDEL_LIST(reagent_list)
reagent_list = null
QDEL_LIST(addiction_list)
diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm
index 4f92f21aee7..6e15090ea88 100644
--- a/code/modules/reagents/reagent_containers/borghydro.dm
+++ b/code/modules/reagents/reagent_containers/borghydro.dm
@@ -38,10 +38,10 @@
for(var/R in reagent_ids)
add_reagent(R)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/reagent_containers/borghypo/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
diff --git a/code/modules/reagents/reagent_containers/iv_bag.dm b/code/modules/reagents/reagent_containers/iv_bag.dm
index 709b20f070f..825aa69632b 100644
--- a/code/modules/reagents/reagent_containers/iv_bag.dm
+++ b/code/modules/reagents/reagent_containers/iv_bag.dm
@@ -42,11 +42,11 @@
/obj/item/reagent_containers/iv_bag/proc/begin_processing(mob/target)
injection_target = target
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/reagent_containers/iv_bag/proc/end_processing()
injection_target = null
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
/obj/item/reagent_containers/iv_bag/process()
if(!injection_target)
diff --git a/code/modules/spacepods/spacepod.dm b/code/modules/spacepods/spacepod.dm
index 715adb668ab..273ea75e832 100644
--- a/code/modules/spacepods/spacepod.dm
+++ b/code/modules/spacepods/spacepod.dm
@@ -152,7 +152,7 @@
if(src.empcounter > 0)
src.empcounter--
else
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
/obj/spacepod/proc/update_icons()
if(!pod_overlays)
@@ -286,7 +286,7 @@
deal_damage(80 / severity)
if(empcounter < (40 / severity))
empcounter = 40 / severity
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
switch(severity)
if(1)
diff --git a/code/modules/surgery/organs/body_egg.dm b/code/modules/surgery/organs/body_egg.dm
index 335d4e5b751..a8ba9192ae4 100644
--- a/code/modules/surgery/organs/body_egg.dm
+++ b/code/modules/surgery/organs/body_egg.dm
@@ -13,13 +13,13 @@
/obj/item/organ/internal/body_egg/insert(var/mob/living/carbon/M, special = 0)
..()
owner.status_flags |= XENO_HOST
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
owner.med_hud_set_status()
spawn(0)
AddInfectionImages(owner)
/obj/item/organ/internal/body_egg/remove(var/mob/living/carbon/M, special = 0)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
if(owner)
owner.status_flags &= ~(XENO_HOST)
owner.med_hud_set_status()
diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm
index a5e85bf572c..67ea1be1d05 100644
--- a/code/modules/surgery/organs/organ.dm
+++ b/code/modules/surgery/organs/organ.dm
@@ -33,7 +33,7 @@
/obj/item/organ/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
if(owner)
remove(owner, 1)
QDEL_LIST_ASSOC_VAL(autopsy_data)
@@ -84,7 +84,7 @@
/obj/item/organ/proc/necrotize(update_sprite = TRUE)
damage = max_damage
status |= ORGAN_DEAD
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
if(dead_icon && !is_robotic())
icon_state = dead_icon
if(owner && vital)
@@ -189,7 +189,7 @@
else
status = 0
if(!owner)
- processing_objects |= src
+ START_PROCESSING(SSobj, src)
/obj/item/organ/proc/is_damaged()
return damage > 0
@@ -295,7 +295,7 @@
if(affected) affected.internal_organs -= src
loc = get_turf(owner)
- processing_objects |= src
+ START_PROCESSING(SSobj, src)
if(owner && vital && is_primary_organ()) // I'd do another check for species or whatever so that you couldn't "kill" an IPC by removing a human head from them, but it doesn't matter since they'll come right back from the dead
add_attack_logs(user, owner, "Removed vital organ ([src])", !!user ? ATKLOG_FEW : ATKLOG_ALL)
diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm
index f8534ffe078..4462e4ea470 100644
--- a/code/modules/surgery/organs/organ_external.dm
+++ b/code/modules/surgery/organs/organ_external.dm
@@ -286,7 +286,7 @@ This function completely restores a damaged organ to perfect condition.
owner.updatehealth("limb rejuvenate")
update_icon()
if(!owner)
- processing_objects |= src
+ START_PROCESSING(SSobj, src)
/****************************************************
PROCESSING & UPDATING
diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm
index 063a4d6880a..2c42f421774 100644
--- a/code/modules/surgery/organs/organ_internal.dm
+++ b/code/modules/surgery/organs/organ_internal.dm
@@ -193,10 +193,10 @@
/obj/item/organ/internal/shadowtumor/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/organ/internal/shadowtumor/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/organ/internal/shadowtumor/process()
diff --git a/code/modules/telesci/gps.dm b/code/modules/telesci/gps.dm
index 3672070e8f0..ca22fb5cb0e 100644
--- a/code/modules/telesci/gps.dm
+++ b/code/modules/telesci/gps.dm
@@ -137,10 +137,10 @@ var/list/GPS_list = list()
for marking the area around the transition edges."
var/list/turf/tagged
-/obj/item/gps/visible_debug/New()
+/obj/item/gps/visible_debug/Initialize(mapload)
. = ..()
tagged = list()
- GLOB.fast_processing.Add(src)
+ START_PROCESSING(SSfastprocess, src)
/obj/item/gps/visible_debug/process()
var/turf/T = get_turf(src)
@@ -161,5 +161,5 @@ var/list/GPS_list = list()
if(tagged)
clear()
tagged = null
- GLOB.fast_processing.Remove(src)
+ STOP_PROCESSING(SSfastprocess, src)
. = ..()
diff --git a/paradise.dme b/paradise.dme
index 19f2cfd10bb..f86c7c479c6 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -198,10 +198,8 @@
#include "code\controllers\master.dm"
#include "code\controllers\subsystem.dm"
#include "code\controllers\verbs.dm"
-#include "code\controllers\Processes\fast_process.dm"
#include "code\controllers\Processes\lighting.dm"
#include "code\controllers\Processes\npcai.dm"
-#include "code\controllers\Processes\obj.dm"
#include "code\controllers\Processes\ticker.dm"
#include "code\controllers\ProcessScheduler\core\process.dm"
#include "code\controllers\ProcessScheduler\core\processScheduler.dm"
@@ -232,6 +230,8 @@
#include "code\controllers\subsystem\timer.dm"
#include "code\controllers\subsystem\vote.dm"
#include "code\controllers\subsystem\weather.dm"
+#include "code\controllers\subsystem\processing\fastprocess.dm"
+#include "code\controllers\subsystem\processing\obj.dm"
#include "code\controllers\subsystem\processing\processing.dm"
#include "code\controllers\subsystem\tickets\mentor_tickets.dm"
#include "code\controllers\subsystem\tickets\tickets.dm"