Merge pull request #15731 from Putnam3145/minor-events

Untied shoes: a minor event of little consequence
This commit is contained in:
Lin
2022-07-30 05:12:57 +00:00
committed by GitHub
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(C,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
+1
View File
@@ -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"