mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-27 02:23:47 +00:00
Merge pull request #13834 from Heroman3003/big-crash-fixes
Fixes critical crash bugs
This commit is contained in:
@@ -39,7 +39,7 @@ SUBSYSTEM_DEF(ai)
|
|||||||
if(!L?.loc)
|
if(!L?.loc)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if(process_z[get_z(L)] || !L.low_priority) //VOREStation Edit End
|
if((get_z(L) && process_z[get_z(L)]) || !L.low_priority) //VOREStation Edit End
|
||||||
A.handle_strategicals()
|
A.handle_strategicals()
|
||||||
else
|
else
|
||||||
slept_mobs++
|
slept_mobs++
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ SUBSYSTEM_DEF(mobs)
|
|||||||
var/list/currentrun = list()
|
var/list/currentrun = list()
|
||||||
var/log_extensively = FALSE
|
var/log_extensively = FALSE
|
||||||
var/list/timelog = list()
|
var/list/timelog = list()
|
||||||
|
|
||||||
var/slept_mobs = 0
|
var/slept_mobs = 0
|
||||||
var/list/process_z = list()
|
var/list/process_z = list()
|
||||||
|
|
||||||
@@ -40,10 +40,10 @@ SUBSYSTEM_DEF(mobs)
|
|||||||
if(!M || QDELETED(M))
|
if(!M || QDELETED(M))
|
||||||
mob_list -= M
|
mob_list -= M
|
||||||
continue
|
continue
|
||||||
else if(M.low_priority && !(M.loc && process_z[get_z(M)]))
|
else if(M.low_priority && !(M.loc && get_z(M) && process_z[get_z(M)]))
|
||||||
slept_mobs++
|
slept_mobs++
|
||||||
continue
|
continue
|
||||||
|
|
||||||
M.Life(times_fired)
|
M.Life(times_fired)
|
||||||
|
|
||||||
if (MC_TICK_CHECK)
|
if (MC_TICK_CHECK)
|
||||||
@@ -58,14 +58,14 @@ SUBSYSTEM_DEF(mobs)
|
|||||||
log_world(msg)
|
log_world(msg)
|
||||||
return
|
return
|
||||||
msg += "Lists: currentrun: [currentrun.len], mob_list: [mob_list.len]\n"
|
msg += "Lists: currentrun: [currentrun.len], mob_list: [mob_list.len]\n"
|
||||||
|
|
||||||
if(!currentrun.len)
|
if(!currentrun.len)
|
||||||
msg += "!!The subsystem just finished the mob_list list, and currentrun is empty (or has never run).\n"
|
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"
|
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]
|
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"
|
msg += "Tail entry: [describeThis(D)] (this is likely the item AFTER the problem item)\n"
|
||||||
|
|
||||||
var/position = mob_list.Find(D)
|
var/position = mob_list.Find(D)
|
||||||
if(!position)
|
if(!position)
|
||||||
msg += "Unable to find context of tail entry in mob_list list.\n"
|
msg += "Unable to find context of tail entry in mob_list list.\n"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
var/obj/effect/decal/cleanable/blood/splatter/animated/B = new(M.loc)
|
var/obj/effect/decal/cleanable/blood/splatter/animated/B = new(M.loc)
|
||||||
B.basecolor = M.species.get_blood_colour(M)
|
B.basecolor = M.species.get_blood_colour(M)
|
||||||
B.color = M.species.get_blood_colour(M)
|
B.color = M.species.get_blood_colour(M)
|
||||||
B.target_turf = pick(range(1, get_turf(holder)))
|
B.target_turf = pick(RANGE_TURFS(1, holder))
|
||||||
B.blood_DNA = list()
|
B.blood_DNA = list()
|
||||||
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||||
M.vessel.remove_reagent("blood",rand(10,30))
|
M.vessel.remove_reagent("blood",rand(10,30))
|
||||||
|
|||||||
@@ -82,13 +82,13 @@
|
|||||||
//use up stored charges
|
//use up stored charges
|
||||||
if(charges >= 10)
|
if(charges >= 10)
|
||||||
charges -= 10
|
charges -= 10
|
||||||
new /obj/effect/spider/eggcluster(pick(view(1,src)))
|
new /obj/effect/spider/eggcluster(pick(RANGE_TURFS(1,src)))
|
||||||
|
|
||||||
if(charges >= 3)
|
if(charges >= 3)
|
||||||
if(prob(5))
|
if(prob(5))
|
||||||
charges -= 1
|
charges -= 1
|
||||||
var/spawn_type = pick(/mob/living/simple_mob/creature)
|
var/spawn_type = pick(/mob/living/simple_mob/creature)
|
||||||
new spawn_type(pick(view(1,src)))
|
new spawn_type(pick(RANGE_TURFS(1,src)))
|
||||||
playsound(src, pick('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg'), 50, 1, -3)
|
playsound(src, pick('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg'), 50, 1, -3)
|
||||||
|
|
||||||
if(charges >= 1)
|
if(charges >= 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user