Files
Yogstation/code/controllers/subsystem/mobs.dm
vuonojenmustaturska 9dda0e1873 Merge pull request #36747 from praisenarsie/patch-36
Increases monkeycap to 64
2018-03-28 12:49:42 +01:00

41 lines
1.1 KiB
Plaintext

SUBSYSTEM_DEF(mobs)
name = "Mobs"
priority = FIRE_PRIORITY_MOBS
flags = SS_KEEP_TIMING | SS_NO_INIT
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/currentrun = list()
var/static/list/clients_by_zlevel[][]
var/static/list/cubemonkeys = list()
var/cubemonkeycap = 64
/datum/controller/subsystem/mobs/stat_entry()
..("P:[GLOB.mob_living_list.len]")
/datum/controller/subsystem/mobs/proc/MaxZChanged()
if (!islist(clients_by_zlevel))
clients_by_zlevel = new /list(world.maxz,0)
while (clients_by_zlevel.len < world.maxz)
clients_by_zlevel.len++
clients_by_zlevel[clients_by_zlevel.len] = list()
/datum/controller/subsystem/mobs/fire(resumed = 0)
var/seconds = wait * 0.1
if (!resumed)
src.currentrun = GLOB.mob_living_list.Copy()
if (GLOB.living_cameras.len)
src.currentrun += GLOB.living_cameras
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
var/times_fired = src.times_fired
while(currentrun.len)
var/mob/M = currentrun[currentrun.len]
currentrun.len--
if(M)
M.Life(seconds, times_fired)
else
GLOB.mob_living_list.Remove(M)
if (MC_TICK_CHECK)
return