diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index bb4cf4cd029..beeb1599f20 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -458,9 +458,8 @@ return var/message_verb_continuous = length(I.attack_verb_continuous) ? "[pick(I.attack_verb_continuous)]" : "attacks" var/message_verb_simple = length(I.attack_verb_simple) ? "[pick(I.attack_verb_simple)]" : "attack" - var/message_hit_area = "" - if(hit_area) - message_hit_area = " in the [hit_area]" + var/message_hit_area = get_hit_area_message(hit_area) + var/attack_message_spectator = "[src] [message_verb_continuous][message_hit_area] with [I]!" var/attack_message_victim = "Something [message_verb_continuous] you[message_hit_area] with [I]!" var/attack_message_attacker = "You [message_verb_simple] [src][message_hit_area] with [I]!" @@ -475,3 +474,11 @@ to_chat(src, span_danger("Someone hits you[message_hit_area]!")) to_chat(user, span_danger("[attack_message_attacker]")) return 1 + +/// Overridable proc so subtypes can have unique targetted strike zone messages, return a string. +/mob/living/proc/get_hit_area_message(input_area) + if(input_area) + return " in the [input_area]" + + return "" + diff --git a/code/modules/mob/living/basic/bots/_bots.dm b/code/modules/mob/living/basic/bots/_bots.dm index 03dc06dcda5..85cfdccf35f 100644 --- a/code/modules/mob/living/basic/bots/_bots.dm +++ b/code/modules/mob/living/basic/bots/_bots.dm @@ -814,6 +814,11 @@ GLOBAL_LIST_INIT(command_strings, list( /mob/living/basic/bot/spawn_gibs(drop_bitflags = NONE) new /obj/effect/gibspawner/robot(drop_location(), src) +/mob/living/basic/bot/get_hit_area_message(input_area) + // we just get hit, there's no complexity for hitting an arm (if it exists) or anything. + // we also need to return an empty string as otherwise it would falsely say that we get hit in the chest or something strange like that (bots don't have "chests") + return "" + /mob/living/basic/bot/proc/on_bot_movement(atom/movable/source, atom/oldloc, dir, forced) return diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 944a00af9b6..c7507b677dc 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -1215,3 +1215,8 @@ Pass a positive integer as an argument to override a bot's default speed. /mob/living/simple_animal/bot/spawn_gibs(drop_bitflags = NONE) new /obj/effect/gibspawner/robot(drop_location(), src) + +/mob/living/simple_animal/bot/get_hit_area_message(input_area) + // we just get hit, there's no complexity for hitting an arm (if it exists) or anything. + // we also need to return an empty string as otherwise it would falsely say that we get hit in the chest or something strange like that (bots don't have "chests") + return ""