From d9c8a109e7d7005917ec446600954fb4d4cf22ce Mon Sep 17 00:00:00 2001 From: Drulikar Date: Sun, 28 Jul 2024 01:49:16 -0700 Subject: [PATCH] More attack logs --- code/game/objects/structures/fence.dm | 4 ++++ code/game/objects/structures/window.dm | 4 ++++ code/modules/mob/living/carbon/human/life/handle_grabbed.dm | 4 ++++ code/modules/mob/mob_grab.dm | 3 ++- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index 7c602c34380f..93d9d7727e5d 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -153,6 +153,10 @@ M.apply_damage(20) health -= 50 + M.attack_log += text("\[[time_stamp()]\] was slammed against [src] by [key_name(user)]") + user.attack_log += text("\[[time_stamp()]\] slammed [key_name(M)] against [src]") + msg_admin_attack("[key_name(user)] slammed [key_name(M)] against [src] at [get_area_name(M)]", M.loc.x, M.loc.y, M.loc.z) + healthcheck(1, 1, M) //The person thrown into the window literally shattered it return diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 154cc43d4af2..14e15de24691 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -247,6 +247,10 @@ if(!not_damageable) //Impossible to destroy health -= 50 + M.attack_log += text("\[[time_stamp()]\] was slammed against [src] by [key_name(user)]") + user.attack_log += text("\[[time_stamp()]\] slammed [key_name(M)] against [src]") + msg_admin_attack("[key_name(user)] slammed [key_name(M)] against [src] at [get_area_name(M)]", M.loc.x, M.loc.y, M.loc.z) + healthcheck(1, 1, 1, M) //The person thrown into the window literally shattered it return diff --git a/code/modules/mob/living/carbon/human/life/handle_grabbed.dm b/code/modules/mob/living/carbon/human/life/handle_grabbed.dm index 14d22557417f..0c588da7ca4b 100644 --- a/code/modules/mob/living/carbon/human/life/handle_grabbed.dm +++ b/code/modules/mob/living/carbon/human/life/handle_grabbed.dm @@ -9,3 +9,7 @@ if(pulledby.grab_level >= GRAB_CHOKE) apply_damage(3, OXY) apply_stamina_damage(5) + + log_attack("[key_name(pulledby)] choked [key_name(src)] at [get_area_name(src)]") + attack_log += text("\[[time_stamp()]\] was choked by [key_name(pulledby)]") + pulledby.attack_log += text("\[[time_stamp()]\] choked [key_name(src)]") diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 9dcdae3635cb..10480eb38f6b 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -97,8 +97,9 @@ /obj/item/grab/proc/progress_aggressive(mob/living/carbon/human/user, mob/living/victim) user.grab_level = GRAB_CHOKE - playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 25, 1, 7) + playsound(loc, 'sound/weapons/thudswoosh.ogg', 25, 1, 7) user.visible_message(SPAN_WARNING("[user] holds [victim] by the neck and starts choking them!"), null, null, 5) + msg_admin_attack("[key_name(user)] started to choke [key_name(victim)] at [get_area_name(victim)]", victim.loc.x, victim.loc.y, victim.loc.z) victim.Move(user.loc, get_dir(victim.loc, user.loc)) victim.update_transform(TRUE)