Makes untied shoes take lacing difficulty into account

This commit is contained in:
Putnam3145
2022-08-02 13:28:01 -07:00
parent 4797bd158a
commit 8456caa095
+4 -8
View File
@@ -9,7 +9,7 @@
fakeable = FALSE
/datum/round_event/untied_shoes/start()
var/iterations = 1
var/budget = rand(5 SECONDS,20 SECONDS)
for(var/mob/living/carbon/C in shuffle(GLOB.alive_mob_list))
if(!C.client)
continue
@@ -17,12 +17,8 @@
continue
if (HAS_TRAIT(C,TRAIT_EXEMPT_HEALTH_EVENTS))
continue
if(!C.shoes || !C.shoes.can_be_tied || C.shoes.tied != SHOES_TIED)
if(!C.shoes || !C.shoes.can_be_tied || C.shoes.tied != SHOES_TIED || C.shoes.lace_time > budget)
continue
if(prob(5))
C.shoes.adjust_laces(SHOES_KNOTTED)
else
C.shoes.adjust_laces(SHOES_UNTIED)
iterations++
if(prob(100/iterations))
budget -= C.shoes.lace_time
if(budget < 5 SECONDS)
return