diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 3b5c012d591..bdb82bdfc7b 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -303,19 +303,43 @@ key_third_person = "points" message = "points." message_param = "points at %t." - hands_use_check = TRUE + cooldown = 1 SECONDS + // don't put hands use check here, everything is handled in run_emote /datum/emote/living/point/run_emote(mob/user, params, type_override, intentional) message_param = initial(message_param) // reset - if(ishuman(user)) - var/mob/living/carbon/human/H = user - if(H.usable_hands == 0) - if(H.usable_legs != 0) - message_param = "tries to point at %t with a leg, [span_userdanger("falling down")] in the process!" - H.Paralyze(20) + if(iscarbon(user)) + var/mob/living/carbon/our_carbon = user + if(our_carbon.usable_hands <= 0 || user.incapacitated & INCAPABLE_RESTRAINTS || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) + if(our_carbon.usable_legs > 0) + var/one_leg = FALSE + var/has_shoes = our_carbon.get_item_by_slot(ITEM_SLOT_FEET) + if(our_carbon.usable_legs == 1) + one_leg = TRUE + var/success_prob = 65 + if(HAS_TRAIT(our_carbon, TRAIT_FREERUNNING)) + success_prob += 35 + if(one_leg) + success_prob -= 40 + if(prob(success_prob)) + message_param = "[one_leg ? "jumps into the air and " : ""]points at %t with their [has_shoes ? "leg" : "toes"]!" + else + message_param = "[one_leg ? "jumps into the air and " : ""]tries to point at %t with their [has_shoes ? "leg" : "toes"], falling down in the process!" + our_carbon.Paralyze(2 SECONDS) + TIMER_COOLDOWN_START(user, "point_verb_emote_cooldown", 1 SECONDS) else - message_param = "[span_userdanger("bumps [user.p_their()] head on the ground")] trying to motion towards %t." - H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5) + if(our_carbon.get_organ_slot(ORGAN_SLOT_EYES)) + message_param = "gives a meaningful glance at %t!" + TIMER_COOLDOWN_START(src, "point_verb_emote_cooldown", 1.5 SECONDS) + else + if(our_carbon.get_organ_slot(ORGAN_SLOT_TONGUE)) + message_param = "motions their tongue towards %t!" + TIMER_COOLDOWN_START(src, "point_verb_emote_cooldown", 2 SECONDS) + else + message_param = "[span_userdanger("bumps [user.p_their()] head on the ground")] trying to motion towards %t." + our_carbon.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5) + playsound(user, 'sound/effects/glass/glassbash.ogg', 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE) + TIMER_COOLDOWN_START(src, "point_verb_emote_cooldown", 2.5 SECONDS) return ..() /datum/emote/living/sneeze diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 1d35b780930..094c28d84a5 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -518,7 +518,7 @@ //same as above /mob/living/pointed(atom/A as mob|obj|turf in view(client.view, src)) - if(incapacitated) + if(INCAPACITATED_IGNORING(src, INCAPABLE_RESTRAINTS)) return FALSE return ..() diff --git a/code/modules/point/point.dm b/code/modules/point/point.dm index 683710bf128..98574373a81 100644 --- a/code/modules/point/point.dm +++ b/code/modules/point/point.dm @@ -122,7 +122,15 @@ if(!(pointing_at in view(client.view, src))) return FALSE - + if(iscarbon(src)) // special interactions for carbons + var/mob/living/carbon/our_carbon = src + if(our_carbon.usable_hands <= 0 || src.incapacitated & INCAPABLE_RESTRAINTS || HAS_TRAIT(src, TRAIT_HANDS_BLOCKED)) + if(TIMER_COOLDOWN_FINISHED(src, "point_verb_emote_cooldown")) + //cooldown handled in the emote. + our_carbon.emote("point [pointing_at]") + else + to_chat(src, span_warning("You need to wait before pointing again!")) + return FALSE point_at(pointing_at, TRUE) return TRUE