From 22472919c3cb460d6f68ce8675fd4a78c35aba5a Mon Sep 17 00:00:00 2001 From: Geeves Date: Sat, 26 Dec 2020 12:17:00 +0200 Subject: [PATCH] Light Step (#10664) Added LIGHTSTEP to the syndi no-slip shoes. This prevents you from activating mouse traps and landmines while wearing them, as well as letting you dodge past soap, banana peels, and oil spills. --- code/__defines/items_clothing.dm | 1 + code/game/objects/effects/decals/Cleanable/humans.dm | 2 ++ code/game/objects/items/toys.dm | 4 +++- code/game/objects/items/weapons/landmines.dm | 5 +++++ code/game/objects/items/weapons/material/caltrops.dm | 3 ++- code/game/objects/items/weapons/soap.dm | 6 +++++- code/modules/assembly/mousetrap.dm | 7 ++++++- code/modules/clothing/shoes/miscellaneous.dm | 2 +- code/modules/hydroponics/grown_inedible.dm | 8 ++++++-- html/changelogs/geeves-light_step.yml | 6 ++++++ 10 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 html/changelogs/geeves-light_step.yml diff --git a/code/__defines/items_clothing.dm b/code/__defines/items_clothing.dm index 7e165d6c6a7..a7b6e91ab43 100644 --- a/code/__defines/items_clothing.dm +++ b/code/__defines/items_clothing.dm @@ -38,6 +38,7 @@ #define BLOCK_GAS_SMOKE_EFFECT 0x10 // Blocks the effect that chemical clouds would have on a mob -- glasses, mask and helmets ONLY! (NOTE: flag shared with ONESIZEFITSALL) #define FLEXIBLEMATERIAL 0x20 // At the moment, masks with this flag will not prevent eating even if they are covering your face. #define SOUNDPROTECTION 0x40 // whether wearing this item will protect you from loud noises such as flashbangs | this only works for ear slots or the head slot +#define LIGHTSTEP 0x80 // When applied to footwear, this makes it so that they don't trigger things like landmines and mouse traps // Flags for pass_flags. #define PASSTABLE 0x1 diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index a3a9de78022..c39a791fd32 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -83,6 +83,8 @@ if(perp.shoes && !perp.buckled)//Adding blood to shoes var/obj/item/clothing/shoes/S = perp.shoes if(istype(S)) + if(S.item_flags & LIGHTSTEP) + return S.blood_color = basecolor S.track_footprint = max(amount, S.track_footprint) if(!S.blood_overlay) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 542b646c1de..57190703374 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -503,7 +503,9 @@ /obj/item/toy/snappop/Crossed(H as mob|obj) if((ishuman(H))) //i guess carp and shit shouldn't set them off - var/mob/living/carbon/M = H + var/mob/living/carbon/human/M = H + if(M.shoes?.item_flags & LIGHTSTEP) + return if(M.m_intent == M_RUN) to_chat(M, SPAN_WARNING("You step on the snap pop!")) do_pop() diff --git a/code/game/objects/items/weapons/landmines.dm b/code/game/objects/items/weapons/landmines.dm index d4a674ef475..420e9223839 100644 --- a/code/game/objects/items/weapons/landmines.dm +++ b/code/game/objects/items/weapons/landmines.dm @@ -57,6 +57,11 @@ /obj/item/landmine/Crossed(AM as mob|obj) if(deployed) + if(ishuman(AM)) + var/mob/living/carbon/human/H = AM + if(H.shoes?.item_flags & LIGHTSTEP) + ..() + return if(isliving(AM)) var/mob/living/L = AM if(L.mob_size >= 5) diff --git a/code/game/objects/items/weapons/material/caltrops.dm b/code/game/objects/items/weapons/material/caltrops.dm index 55724b94202..02b7d5b590d 100644 --- a/code/game/objects/items/weapons/material/caltrops.dm +++ b/code/game/objects/items/weapons/material/caltrops.dm @@ -22,9 +22,10 @@ var/damage_coef = 1 if(H.buckled) return - if(H.resting) return + if(H.shoes?.item_flags & LIGHTSTEP) + return to_chat(H, SPAN_DANGER("You step on \the [src]!")) playsound(get_turf(src), 'sound/effects/glass_step.ogg', 50, TRUE) diff --git a/code/game/objects/items/weapons/soap.dm b/code/game/objects/items/weapons/soap.dm index b970d36e985..68450cb9aea 100644 --- a/code/game/objects/items/weapons/soap.dm +++ b/code/game/objects/items/weapons/soap.dm @@ -47,7 +47,11 @@ overlays += image('icons/obj/items.dmi', icon_state = "soap_key_overlay") /obj/item/soap/Crossed(AM as mob|obj) - if (istype(AM, /mob/living)) + if(isliving(AM)) + if(ishuman(AM)) + var/mob/living/carbon/human/H = AM + if(H.shoes?.item_flags & LIGHTSTEP) + return var/mob/living/M = AM M.slip("the [src.name]",3) diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 87f6bab6be9..cbf721e2755 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -85,7 +85,12 @@ if(armed) if(israt(AM)) triggered(AM) - else if(istype(AM, /mob/living)) + else if(ishuman(AM)) + var/mob/living/carbon/human/H = AM + if(!(H.shoes?.item_flags & LIGHTSTEP)) + triggered(H) + H.visible_message(SPAN_WARNING("\The [H] accidentally steps on \the [src]."), SPAN_WARNING("You accidentally step on \the [src].")) + else if(isliving(AM)) var/mob/living/L = AM triggered(L) L.visible_message(SPAN_WARNING("\The [L] accidentally steps on \the [src]."), SPAN_WARNING("You accidentally step on \the [src].")) diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 663ea3009cd..65e8fa01c16 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -4,7 +4,7 @@ icon_state = "brown" item_state = "brown" permeability_coefficient = 0.05 - item_flags = NOSLIP + item_flags = NOSLIP|LIGHTSTEP origin_tech = list(TECH_ILLEGAL = 3) var/list/clothing_choices = list() siemens_coefficient = 0.75 diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm index f11d960b309..cd680fdc80e 100644 --- a/code/modules/hydroponics/grown_inedible.dm +++ b/code/modules/hydroponics/grown_inedible.dm @@ -70,6 +70,10 @@ throw_range = 20 /obj/item/bananapeel/Crossed(AM as mob|obj) - if (istype(AM, /mob/living)) + if(isliving(AM)) + if(ishuman(AM)) + var/mob/living/carbon/human/H = AM + if(H.shoes?.item_flags & LIGHTSTEP) + return var/mob/living/M = AM - M.slip("the [src.name]",4) + M.slip("the [src.name]",4) \ No newline at end of file diff --git a/html/changelogs/geeves-light_step.yml b/html/changelogs/geeves-light_step.yml new file mode 100644 index 00000000000..4234c1828be --- /dev/null +++ b/html/changelogs/geeves-light_step.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Added LIGHTSTEP to the syndi no-slip shoes. This prevents you from activating mouse traps and landmines while wearing them, as well as letting you dodge past soap, banana peels, and oil spills." \ No newline at end of file