mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 10:22:13 +00:00
* buncha things from upstream * datums globals, onclick * datums * game folder, holy shit mirror bot why * modules * icons * dme * compiles cleanly * tools purge * updates maps * double check just because. and wew lad * incidentally, this needs more work first * some things * weh * sound cleanup and icons * reeeee * compile issues * oh look, fresh code sync * cleans up some unused icons * dirty vars * reeeeeeeeeeeeeeee * wew lad. fuck off with this already
35 lines
948 B
Plaintext
35 lines
948 B
Plaintext
SUBSYSTEM_DEF(npcpool)
|
|
name = "NPC Pool"
|
|
flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
|
|
priority = FIRE_PRIORITY_NPC
|
|
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
|
|
|
var/list/currentrun = list()
|
|
|
|
/datum/controller/subsystem/npcpool/stat_entry()
|
|
var/list/activelist = GLOB.simple_animals[AI_ON]
|
|
..("NPCS:[activelist.len]")
|
|
|
|
/datum/controller/subsystem/npcpool/fire(resumed = FALSE)
|
|
|
|
if (!resumed)
|
|
var/list/activelist = GLOB.simple_animals[AI_ON]
|
|
src.currentrun = activelist.Copy()
|
|
|
|
//cache for sanic speed (lists are references anyways)
|
|
var/list/currentrun = src.currentrun
|
|
|
|
while(currentrun.len)
|
|
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
|
|
--currentrun.len
|
|
|
|
if(!SA.ckey)
|
|
if(SA.stat != DEAD)
|
|
SA.handle_automated_movement()
|
|
if(SA.stat != DEAD)
|
|
SA.handle_automated_action()
|
|
if(SA.stat != DEAD)
|
|
SA.handle_automated_speech()
|
|
if (MC_TICK_CHECK)
|
|
return
|