From 0bfe3ab87e3f5ebfc335a742d2932ed1e4bd5a7d Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Thu, 23 Jan 2020 04:18:23 +0100 Subject: [PATCH] no longer can you wave at unseen things, nor bystanders will be informed of what you are waving at if they can't see it themselves. --- modular_citadel/code/_onclick/other_mobs.dm | 43 +++++++++++++++------ 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/modular_citadel/code/_onclick/other_mobs.dm b/modular_citadel/code/_onclick/other_mobs.dm index 51a5c6c5c3..d7b0a72c07 100644 --- a/modular_citadel/code/_onclick/other_mobs.dm +++ b/modular_citadel/code/_onclick/other_mobs.dm @@ -9,21 +9,42 @@ return TRUE /mob/living/carbon/human/AltRangedAttack(atom/A, params) + if(isturf(A) || incapacitated()) // pretty annoying to wave your fist at floors and walls. And useless. + return TRUE + var/list/target_viewers = viewers(11, A) //Byond proc, doesn't check for blindness. + if(!(src in target_viewers)) //click catcher issuing calls for out of view turfs. + return TRUE if(!has_active_hand()) to_chat(src, "You ponder your life choices and sigh.") return TRUE + var/list/src_viewers = get_hearers_in_view(DEFAULT_MESSAGE_RANGE, src) - src // src has a different message. + var/the_action = "waves to [A]" + var/what_action = "waves to something you can't see" + var/self_action = "wave to [A]" - if(!incapacitated()) - switch(a_intent) - if(INTENT_HELP) - visible_message("[src] waves to [A].", "You wave to [A].") - if(INTENT_DISARM) - visible_message("[src] shoos away [A].", "You shoo away [A].") - if(INTENT_GRAB) - visible_message("[src] beckons [A] to come.", "You beckon [A] to come.") //This sounds lewder than it actually is. Fuck. - if(INTENT_HARM) - visible_message("[src] shakes [p_their()] fist at [A].", "You shake your fist at [A].") - return TRUE + switch(a_intent) + if(INTENT_DISARM) + the_action = "shoos away [A]" + what_action = "shoo away something you can't see" + self_action = "shoo away [A]" + if(INTENT_GRAB) + the_action = "beckons [A] to come" + what_action = "beckons something you can't see to come" + self_action = "beckon [A] to come" + if(INTENT_HARM) + var/pronoun = "[p_their()]" + the_action = "shakes [pronoun] fist at [A]" + what_action = "shakes [pronoun] fist at something you can't see" + self_action = "shake your fist at [A]" + + if(!eye_blind) + to_chat(src, "You [self_action].") + for(var/B in src_viewers) + var/mob/M = B + if(!M.eye_blind) + var/message = (M in target_viewers) ? the_action : what_action + to_chat(M, "[src] [message].", MSG_VISUAL) + return TRUE /atom/proc/alt_attack_hand(mob/user) return FALSE