diff --git a/code/modules/events/untie_shoes.dm b/code/modules/events/untie_shoes.dm new file mode 100644 index 0000000000..795159a934 --- /dev/null +++ b/code/modules/events/untie_shoes.dm @@ -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 diff --git a/tgstation.dme b/tgstation.dme index 5e513c6b9a..b22af21627 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2155,6 +2155,7 @@ #include "code\modules\events\supermatter_surge.dm" #include "code\modules\events\supernova.dm" #include "code\modules\events\travelling_trader.dm" +#include "code\modules\events\untie_shoes.dm" #include "code\modules\events\vent_clog.dm" #include "code\modules\events\wisdomcow.dm" #include "code\modules\events\wormholes.dm"