Merge pull request #15731 from Putnam3145/minor-events
Untied shoes: a minor event of little consequence
This commit is contained in:
@@ -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
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user