From 8456caa095f1a71c727132cc029485c989f8fd0b Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Tue, 2 Aug 2022 13:28:01 -0700 Subject: [PATCH 1/4] Makes untied shoes take lacing difficulty into account --- code/modules/events/untie_shoes.dm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/code/modules/events/untie_shoes.dm b/code/modules/events/untie_shoes.dm index 92e53b4eab..19e238154a 100644 --- a/code/modules/events/untie_shoes.dm +++ b/code/modules/events/untie_shoes.dm @@ -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 From db06dbcd58b56eac29fa527ee09eef9c8c96ee99 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Tue, 2 Aug 2022 16:44:05 -0700 Subject: [PATCH 2/4] forgot to commit and push --- code/modules/clothing/shoes/miscellaneous.dm | 1 + code/modules/events/untie_shoes.dm | 2 ++ 2 files changed, 3 insertions(+) diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 06c2c19ad8..cdf5512fc6 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -213,6 +213,7 @@ heat_protection = FEET|LEGS max_heat_protection_temperature = SHOES_MAX_TEMP_PROTECT resistance_flags = FIRE_PROOF + lace_time = 10 SECONDS /obj/item/clothing/shoes/cult name = "\improper Nar'Sien invoker boots" diff --git a/code/modules/events/untie_shoes.dm b/code/modules/events/untie_shoes.dm index 19e238154a..70d0dc650d 100644 --- a/code/modules/events/untie_shoes.dm +++ b/code/modules/events/untie_shoes.dm @@ -19,6 +19,8 @@ continue if(!C.shoes || !C.shoes.can_be_tied || C.shoes.tied != SHOES_TIED || C.shoes.lace_time > budget) continue + if(!is_station_level(C.z) && prob(50)) + continue budget -= C.shoes.lace_time if(budget < 5 SECONDS) return From 0238d9fbe5e200ba3b5c08f58d58ed07284ef9a4 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Tue, 2 Aug 2022 21:50:56 -0700 Subject: [PATCH 3/4] make it actually do something lol --- code/modules/events/untie_shoes.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/events/untie_shoes.dm b/code/modules/events/untie_shoes.dm index 70d0dc650d..ddc97f261f 100644 --- a/code/modules/events/untie_shoes.dm +++ b/code/modules/events/untie_shoes.dm @@ -21,6 +21,11 @@ continue if(!is_station_level(C.z) && prob(50)) continue + if(prob(5) + C.shoes.adjust_laces(SHOES_KNOTTED) + budget -= C.shoes.lace_time // doubling up on the budget removal on purpose + else + C.shoes.adjust_laces(SHOES_UNTIED) budget -= C.shoes.lace_time if(budget < 5 SECONDS) return From 8ab1a12ef725b296e6b5087b508973bcb8f2187b Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Tue, 2 Aug 2022 23:15:10 -0700 Subject: [PATCH 4/4] i forgot to compile?? --- code/modules/events/untie_shoes.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/events/untie_shoes.dm b/code/modules/events/untie_shoes.dm index ddc97f261f..708a72f40b 100644 --- a/code/modules/events/untie_shoes.dm +++ b/code/modules/events/untie_shoes.dm @@ -21,7 +21,7 @@ continue if(!is_station_level(C.z) && prob(50)) continue - if(prob(5) + if(prob(5)) C.shoes.adjust_laces(SHOES_KNOTTED) budget -= C.shoes.lace_time // doubling up on the budget removal on purpose else