Untied shoes: a minor event of little consequence

This commit is contained in:
Putnam3145
2022-07-28 17:19:35 -07:00
parent f98e15fe63
commit 6e0a17a525
2 changed files with 29 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
/datum/round_event_control/untied_shoes
name = "Untied Shoes"
typepath = /datum/round_event/untied_shoes
weight = 100
max_occurrences = 20
alert_observers = FALSE
/datum/round_event/untied_shoes
fakeable = FALSE
/datum/round_event/untied_shoes/start()
var/iterations = 1
for(var/mob/living/carbon/C in shuffle(GLOB.alive_mob_list))
if(!C.client)
continue
if(C.stat == DEAD)
continue
if (HAS_TRAIT(H,TRAIT_EXEMPT_HEALTH_EVENTS))
continue
if(!C.shoes || !C.shoes.can_be_tied || C.shoes.tied != SHOES_TIED)
continue
if(prob(5))
C.shoes.adjust_laces(SHOES_KNOTTED)
else
C.shoes.adjust_laces(SHOES_UNTIED)
iterations++
if(prob(100/iterations))
return