Fix remaining reforming bugs

This commit is contained in:
TheGreatKitsune
2022-12-10 14:49:30 -06:00
parent 2fe9e2327f
commit 926f7d1e63
5 changed files with 114 additions and 19 deletions

View File

@@ -15,7 +15,7 @@ SUBSYSTEM_DEF(mobs)
var/list/currentrun = list()
var/log_extensively = FALSE
var/list/timelog = list()
var/slept_mobs = 0
var/list/process_z = list()
@@ -43,7 +43,12 @@ SUBSYSTEM_DEF(mobs)
else if(M.low_priority && !(M.loc && process_z[get_z(M)]))
slept_mobs++
continue
//CHOMPEdit Start - Enable pausing mobs (For transformation, holding until reformation, etc.)
else if(!M.enabled)
slept_mobs++
continue
//CHOMPEdit End
M.Life(times_fired)
if (MC_TICK_CHECK)
@@ -58,14 +63,14 @@ SUBSYSTEM_DEF(mobs)
log_world(msg)
return
msg += "Lists: currentrun: [currentrun.len], mob_list: [mob_list.len]\n"
if(!currentrun.len)
msg += "!!The subsystem just finished the mob_list list, and currentrun is empty (or has never run).\n"
msg += "!!The info below is the tail of mob_list instead of currentrun.\n"
var/datum/D = currentrun.len ? currentrun[currentrun.len] : mob_list[mob_list.len]
msg += "Tail entry: [describeThis(D)] (this is likely the item AFTER the problem item)\n"
var/position = mob_list.Find(D)
if(!position)
msg += "Unable to find context of tail entry in mob_list list.\n"
@@ -90,4 +95,4 @@ SUBSYSTEM_DEF(mobs)
/datum/controller/subsystem/mobs/critfail()
..()
log_recent()
log_recent()