diff --git a/code/modules/events/mimite_infestation.dm b/code/modules/events/mimite_infestation.dm index 59c02b9e1b3df..dd99e6047d6c0 100644 --- a/code/modules/events/mimite_infestation.dm +++ b/code/modules/events/mimite_infestation.dm @@ -58,7 +58,7 @@ /datum/round_event/mimite_infestation/end() - if(LAZYLEN(GLOB.all_mimites) >= 1) //If they're still around at the end of 60 min, turn of replication permanently + if(length(GLOB.all_mimites)) //If they're still around at the end of 60 min, turn of replication permanently for(var/mob/living/simple_animal/hostile/mimite/M in GLOB.all_mimites) M.eventongoing = FALSE else diff --git a/code/modules/mob/living/simple_animal/hostile/mimite.dm b/code/modules/mob/living/simple_animal/hostile/mimite.dm index bd7599902d93e..4ad7b7b70b212 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimite.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimite.dm @@ -1,5 +1,6 @@ #define MIMITE_COOLDOWN 60 #define MIMITE_VENT_COOLDOWN 100 +#define MIMITE_STUCK_THRESHOLD 10 /mob/living/simple_animal/hostile/mimite name = "Mimite" @@ -68,7 +69,6 @@ var/venthunt = TRUE var/mimite_lastmove = null //Updates/Stores position of the mimite while it's moving var/mimite_stuck = 0 //If mimite_lastmove hasn't changed, this will increment until it reaches mimite_stuck_threshold - var/mimite_stuck_threshold = 10 //if this == mimite_stuck, it'll force the mimite to stop moving var/attemptingventcrawl = FALSE var/eventongoing = TRUE var/remaining_replications = 4 @@ -293,7 +293,7 @@ //Check to see if the mimite is stuck due to things like windows or doors or windowdoors if(mimite_lastmove) if(mimite_lastmove == src.loc) - if(mimite_stuck_threshold >= ++mimite_stuck) + if(MIMITE_STUCK_THRESHOLD >= ++mimite_stuck) mimite_stuck = 0 mimite_lastmove = null return 1 @@ -304,10 +304,13 @@ return 0 /mob/living/simple_animal/hostile/mimite/death(gibbed) - GLOB.all_mimites -= src new /obj/effect/decal/cleanable/oil(get_turf(src)) ..() +/mob/living/simple_animal/hostile/mimite/Destroy() + GLOB.all_mimites -= src + ..() + /mob/living/simple_animal/hostile/mimite/crate name = "crate" desc = "A rectangular steel crate." @@ -375,3 +378,8 @@ minimum_distance = 1 melee_queue_distance = 1 projectiletype = /obj/projectile/beam/disabler + + +#undef MIMITE_COOLDOWN +#undef MIMITE_VENT_COOLDOWN +#undef MIMITE_STUCK_THRESHOLD