mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19:30 +01:00
Merge branch 'master' of https://github.com/tgstation/-tg-station into turfs
Conflicts: code/game/gamemodes/nuclear/nuclearbomb.dm code/modules/mob/mob_movement.dm code/modules/recycling/conveyor2.dm
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
var/datum/subsystem/fastprocess/SSfastprocess
|
||||
|
||||
/datum/subsystem/fastprocess
|
||||
name = "Fast Process"
|
||||
priority = -1
|
||||
wait = 1
|
||||
dynamic_wait = 1
|
||||
dwait_upper = 300
|
||||
dwait_lower = 1
|
||||
dwait_delta = 7
|
||||
|
||||
var/list/processing = list()
|
||||
var/list/currentrun = list()
|
||||
|
||||
/datum/subsystem/fastprocess/New()
|
||||
NEW_SS_GLOBAL(SSfastprocess)
|
||||
|
||||
/datum/subsystem/fastprocess/stat_entry()
|
||||
..("FP:[processing.len]")
|
||||
|
||||
|
||||
/datum/subsystem/fastprocess/fire(resumed = 0)
|
||||
if (!resumed)
|
||||
src.currentrun = processing.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
|
||||
while(currentrun.len)
|
||||
var/datum/thing = currentrun[1]
|
||||
currentrun.Cut(1, 2)
|
||||
if(thing)
|
||||
thing.process(wait)
|
||||
else
|
||||
SSfastprocess.processing -= thing
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
Reference in New Issue
Block a user