mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
fixes transformation code runtiming (maybe fixes monkey fever???) (#58642)
transformation code didnt check if the lists with strings had anything in them, causing a runtime from pick()
This commit is contained in:
@@ -37,16 +37,16 @@
|
||||
|
||||
switch(stage)
|
||||
if(1)
|
||||
if (stage1 && DT_PROB(stage_prob, delta_time))
|
||||
if (length(stage1) && DT_PROB(stage_prob, delta_time))
|
||||
to_chat(affected_mob, pick(stage1))
|
||||
if(2)
|
||||
if (stage2 && DT_PROB(stage_prob, delta_time))
|
||||
if (length(stage2) && DT_PROB(stage_prob, delta_time))
|
||||
to_chat(affected_mob, pick(stage2))
|
||||
if(3)
|
||||
if (stage3 && DT_PROB(stage_prob * 2, delta_time))
|
||||
if (length(stage3) && DT_PROB(stage_prob * 2, delta_time))
|
||||
to_chat(affected_mob, pick(stage3))
|
||||
if(4)
|
||||
if (stage4 && DT_PROB(stage_prob * 2, delta_time))
|
||||
if (length(stage4) && DT_PROB(stage_prob * 2, delta_time))
|
||||
to_chat(affected_mob, pick(stage4))
|
||||
if(5)
|
||||
do_disease_transformation(affected_mob)
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
/datum/disease/transformation/proc/do_disease_transformation(mob/living/affected_mob)
|
||||
if(istype(affected_mob, /mob/living/carbon) && affected_mob.stat != DEAD)
|
||||
if(stage5)
|
||||
if(length(stage5))
|
||||
to_chat(affected_mob, pick(stage5))
|
||||
if(QDELETED(affected_mob))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user