diff --git a/code/datums/brain_damage/creepy_trauma.dm b/code/datums/brain_damage/creepy_trauma.dm index 9d6d2b1d1d3..e4db2575f51 100644 --- a/code/datums/brain_damage/creepy_trauma.dm +++ b/code/datums/brain_damage/creepy_trauma.dm @@ -112,14 +112,16 @@ to_chat(owner, span_userdanger("You gag and swallow a bit of bile...")) // if the creep examines first, then the obsession examines them, have a 50% chance to possibly blow their cover. wearing a mask avoids this risk -/datum/brain_trauma/special/obsessed/proc/stare(datum/source, mob/living/examining_mob, triggering_examiner) +// IRIS EDIT START - MapleStation Port +/datum/brain_trauma/special/obsessed/proc/stare(datum/source, mob/living/examining_mob) SIGNAL_HANDLER - if(examining_mob != owner || !triggering_examiner || prob(50)) - return + if(prob(50)) + return NONE - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), obsession, span_warning("You catch [examining_mob] staring at you..."), 3)) + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), obsession, span_warning("You notice [examining_mob] staring at you oddly..."), 0.6 SECONDS)) return COMSIG_BLOCK_EYECONTACT +// IRIS EDIT END /datum/brain_trauma/special/obsessed/proc/find_obsession() var/list/viable_minds = list() //The first list, which excludes hijinks diff --git a/code/datums/quirks/negative_quirks/social_anxiety.dm b/code/datums/quirks/negative_quirks/social_anxiety.dm index 402dba01c1f..f34af8ef930 100644 --- a/code/datums/quirks/negative_quirks/social_anxiety.dm +++ b/code/datums/quirks/negative_quirks/social_anxiety.dm @@ -83,18 +83,15 @@ if(prob(85) || (istype(mind_check) && mind_check.mind)) return - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), quirk_holder, span_smallnotice("You make eye contact with [A].")), 0.3 SECONDS) +// IRIS EDIT START - MapleStation Port + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), quirk_holder, span_smallnotice("You make eye contact with [A].")), 0.2 SECONDS) -/datum/quirk/social_anxiety/proc/eye_contact(datum/source, mob/living/other_mob, triggering_examiner) +/datum/quirk/social_anxiety/proc/eye_contact(datum/source, mob/living/other_mob) SIGNAL_HANDLER if(prob(75)) - return - var/msg - if(triggering_examiner) - msg = "You make eye contact with [other_mob], " - else - msg = "[other_mob] makes eye contact with you, " + return NONE + var/msg = "You make eye contact with [other_mob], " switch(rand(1,3)) if(1) @@ -108,8 +105,9 @@ msg += "causing you to freeze up!" quirk_holder.add_mood_event("anxiety_eyecontact", /datum/mood_event/anxiety_eyecontact) - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), quirk_holder, span_userdanger("[msg]")), 3) // so the examine signal has time to fire and this will print after + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), quirk_holder, span_userdanger("[msg]")), 0.2 SECONDS) // so the examine signal has time to fire and this will print after return COMSIG_BLOCK_EYECONTACT +// IRIS EDIT END /datum/mood_event/anxiety_eyecontact description = "Sometimes eye contact makes me so nervous..." diff --git a/code/datums/status_effects/debuffs/blindness.dm b/code/datums/status_effects/debuffs/blindness.dm index 06a5a46b942..00d932fc89d 100644 --- a/code/datums/status_effects/debuffs/blindness.dm +++ b/code/datums/status_effects/debuffs/blindness.dm @@ -71,11 +71,20 @@ owner.overlay_fullscreen(id, /atom/movable/screen/fullscreen/blind) // You are blind - at most, able to make out shapes near you owner.add_client_colour(/datum/client_colour/monochrome/blind) + // IRIS ADDITION START - MapleStation Port: But to represent the fact that you can feel your way around, you are unaffected by darkness + ADD_TRAIT(owner, TRAIT_TRUE_NIGHT_VISION, id) + // but your eyes will start to wander, you may end up staring unintentionally + ADD_TRAIT(owner, TRAIT_SHIFTY_EYES, id) return ..() + // IRIS ADDITION END /datum/status_effect/grouped/blindness/on_remove() owner.clear_fullscreen(id) owner.remove_client_colour(/datum/client_colour/monochrome/blind) + // IRIS ADDITION START - MapleStation Port + REMOVE_TRAIT(owner, TRAIT_TRUE_NIGHT_VISION, id) + REMOVE_TRAIT(owner, TRAIT_SHIFTY_EYES, id) + // IRIS ADDITION END return ..() /atom/movable/screen/alert/status_effect/blind diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 1bec7342602..8f27aec46f2 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -625,7 +625,6 @@ if(length(glasses.color_cutoffs)) lighting_color_cutoffs = blend_cutoff_colors(lighting_color_cutoffs, glasses.color_cutoffs) - if(HAS_TRAIT(src, TRAIT_TRUE_NIGHT_VISION)) lighting_cutoff = max(lighting_cutoff, LIGHTING_CUTOFF_HIGH) diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 8809c8c6195..44942967581 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -44,6 +44,15 @@ return null +// IRIS ADDITION START - MapleStation Port +/mob/living/carbon/is_eyes_visible() + if(istype(glasses) && (glasses.flags_cover & GLASSESCOVERSEYES) && glasses.tint) + return FALSE + if(check_obscured_slots() & ITEM_SLOT_EYES) + return FALSE + return TRUE +// IRIS ADDITION END + /mob/living/carbon/is_pepper_proof(check_flags = ALL) var/obj/item/organ/eyes/eyes = get_organ_by_type(/obj/item/organ/eyes) if(eyes && eyes.pepperspray_protect) @@ -373,6 +382,17 @@ helper.put_in_hands(faketail) helper.add_mood_event("rippedtail", /datum/mood_event/rippedtail) +//IRIS ADDITION START: Ports handshakes from Beestation + else if ((helper.zone_selected == BODY_ZONE_L_ARM) || helper.zone_selected == BODY_ZONE_R_ARM) + if(!get_bodypart(check_zone(helper.zone_selected))) + to_chat(helper, span_warning("[src] does not have a [helper.zone_selected == BODY_ZONE_L_ARM ? "left" : "right"] arm!")) + else + helper.visible_message(span_notice("[helper] shakes [src]'s hand."), \ + null, span_hear("You hear a soft patter."), DEFAULT_MESSAGE_RANGE, list(helper, src)) + to_chat(helper, span_notice ("You shake [src]'s hand.")) + to_chat(src, span_notice ("[helper] shakes your hand.")) +//IRIS ADDITION END + else if (helper.grab_state >= GRAB_AGGRESSIVE) helper.visible_message(span_notice("[helper] embraces [src] in a tight bear hug!"), \ diff --git a/code/modules/mob/living/carbon/human/species_types/monkeys.dm b/code/modules/mob/living/carbon/human/species_types/monkeys.dm index 057dffbf222..342ea9528c7 100644 --- a/code/modules/mob/living/carbon/human/species_types/monkeys.dm +++ b/code/modules/mob/living/carbon/human/species_types/monkeys.dm @@ -16,6 +16,7 @@ TRAIT_NO_BLOOD_OVERLAY, TRAIT_NO_DNA_COPY, TRAIT_NO_UNDERWEAR, + TRAIT_SHIFTY_EYES, // IRIS EDIT - MapleStation Port NON-MODULE CHANGE: monkey are shifty TRAIT_VENTCRAWLER_NUDE, TRAIT_WEAK_SOUL, ) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 36eeb7d3efe..bc5a094f7f5 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -74,6 +74,14 @@ /mob/living/proc/is_eyes_covered(check_flags = ALL) return null +/// IRIS ADDITION START - MapleStation Port +/// Checks if the mob is wearing something which would obscure their eyes. +/// Differs from [is_eyes_covered] in that it only checks for items that would prevent someone from seeing our eyes. +/// In other words, transparent goggles cover your eyes, but keep them visible. +/mob/living/proc/is_eyes_visible() + return TRUE +/// IRIS ADDITION END + /** * Checks if our mob is protected from pepper spray. * diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index d994bd5e80a..46866c20a7b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -653,32 +653,44 @@ * Also note that examine_more() doesn't proc this or extend the timer, just because it's simpler this way and doesn't lose much. * The nice part about relying on examining is that we don't bother checking visibility, because we already know they were both visible to each other within the last second, and the one who triggers it is currently seeing them */ -/mob/proc/handle_eye_contact(mob/living/examined_mob) +// IRIS EDIT START - MapleStation Port +/mob/proc/handle_eye_contact(mob/living/examined_mob, allow_imagine = TRUE) return -/mob/living/handle_eye_contact(mob/living/examined_mob) - if(!istype(examined_mob) || src == examined_mob || examined_mob.stat >= UNCONSCIOUS || !client) +/mob/living/handle_eye_contact(mob/living/examined_mob, alert_examined = TRUE) + if(!istype(examined_mob) || src == examined_mob || !GET_CLIENT(src)) + return + if(stat >= UNCONSCIOUS || examined_mob.stat >= UNCONSCIOUS || is_blind() || !examined_mob.is_eyes_visible()) return var/imagined_eye_contact = FALSE + var/glance_dist = get_dist(src, examined_mob) if(!LAZYACCESS(examined_mob.client?.recent_examines, src)) - // even if you haven't looked at them recently, if you have the shift eyes trait, they may still imagine the eye contact - if(HAS_TRAIT(examined_mob, TRAIT_SHIFTY_EYES) && prob(10 - get_dist(src, examined_mob))) + // you imagine they made eye contact + if(alert_examined && HAS_TRAIT(examined_mob, TRAIT_SHIFTY_EYES) && prob(10 - glance_dist)) imagined_eye_contact = TRUE else return - if(get_dist(src, examined_mob) > EYE_CONTACT_RANGE) + if(glance_dist > EYE_CONTACT_RANGE) return - // check to see if their face is blocked or, if not, a signal blocks it - if(examined_mob.is_face_visible() && SEND_SIGNAL(src, COMSIG_MOB_EYECONTACT, examined_mob, TRUE) != COMSIG_BLOCK_EYECONTACT) - var/msg = span_smallnotice("You make eye contact with [examined_mob].") - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), src, msg), 0.3 SECONDS) // so the examine signal has time to fire and this will print after - - if(!imagined_eye_contact && is_face_visible() && SEND_SIGNAL(examined_mob, COMSIG_MOB_EYECONTACT, src, FALSE) != COMSIG_BLOCK_EYECONTACT) - var/msg = span_smallnotice("[src] makes eye contact with you.") - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), examined_mob, msg), 0.3 SECONDS) + // eye contact is "happening" now but it can be "stopped" by signal + if(SEND_SIGNAL(src, COMSIG_MOB_EYECONTACT, examined_mob) & COMSIG_BLOCK_EYECONTACT) + return + // generic eye contact + // message is on a timer so it pops up after examine is processed + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), src, span_smallnotice("You[imagined_eye_contact && prob(10) ? " think you" : ""] make eye contact with [examined_mob].")), 0.2 SECONDS) + // feedback to the other end of the glance + if(alert_examined && !examined_mob.is_blind() && GET_CLIENT(examined_mob)) + if(imagined_eye_contact) + // we imagined eye contact, we didn't actually make anything. so in reality, we're just staring like a weirdo + if(prob(5 - glance_dist)) + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), examined_mob, span_smallnotice("You notice [src] staring at you.")), 0.2 SECONDS) + else + // we made real eye contact, so now go through and process them looking back at us. no alert back though obviously + examined_mob.handle_eye_contact(src, FALSE) +// IRIS EDIT END /** * Called by using Activate Held Object with an empty hand/limb