From d2e08f17ea963c44fa0b256a8e1441a3ef19eeb5 Mon Sep 17 00:00:00 2001 From: SandPoot Date: Tue, 24 Jan 2023 22:07:15 -0300 Subject: [PATCH] let's check for structure.climbable instead! --- .../code/datums/elements/skirt_peeking.dm | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/modular_sand/code/datums/elements/skirt_peeking.dm b/modular_sand/code/datums/elements/skirt_peeking.dm index 2101ddf2c1..6ea458c22d 100644 --- a/modular_sand/code/datums/elements/skirt_peeking.dm +++ b/modular_sand/code/datums/elements/skirt_peeking.dm @@ -10,7 +10,7 @@ RegisterSignal(peeked, COMSIG_PARENT_EXAMINE_MORE, .proc/on_closer_look) /datum/element/skirt_peeking/proc/can_skirt_peek(mob/living/carbon/human/peeked, mob/peeker) - var/mob/living/living = peeker + var/mob/living/living_peeker = peeker var/obj/item/clothing/under/worn_uniform = peeked.get_item_by_slot(ITEM_SLOT_ICLOTHING) // Unfortunately, you can't see it @@ -20,18 +20,21 @@ // // Valid clothing section - if(worn_uniform && is_type_in_typecache(worn_uniform.type, GLOB.skirt_peekable) \ + if(worn_uniform && is_type_in_typecache(worn_uniform.type, GLOB.skirt_peekable)) // We are being peeked by a spooky ghost who sees all? - && (isobserver(peeker) \ + if(isobserver(peeker)) + return TRUE // Are you a living creature (and not us)? - || (istype(living) && (peeker != peeked) \ + if(istype(living) && (living_peeker != peeked)) // And are you under us while we're standing up? - && (!(CHECK_BITFIELD(living.mobility_flags, MOBILITY_STAND)) && (CHECK_BITFIELD(peeked.mobility_flags, MOBILITY_STAND)) && (peeked.loc == living.loc)))) \ + if(!(CHECK_BITFIELD(living_peeker.mobility_flags, MOBILITY_STAND)) && (CHECK_BITFIELD(peeked.mobility_flags, MOBILITY_STAND)) && (peeked.loc == living_peeker.loc)) + return TRUE // Or are you nearby and we are up high - || ((locate(/obj/structure/table) in get_turf(peeked)) && CHECK_BITFIELD(peeked.mobility_flags, MOBILITY_STAND)) && \ + // to-do SOMEONE PLEASE PORT /datum/element/climbable + var/obj/structure/high_ground = locate(/obj/structure/table) in get_turf(peeked) + if(high_ground && high_ground.climbable && CHECK_BITFIELD(peeked.mobility_flags, MOBILITY_STAND) && \ peeked.Adjacent(peeker)) - - return TRUE + return TRUE return FALSE /datum/element/skirt_peeking/proc/on_examine(mob/living/carbon/human/peeked, mob/peeker, list/examine_list)