diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index 324cfad6323..af1641f804d 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -74,4 +74,25 @@ proc/age2agedescription(age)
if(45 to 60) return "middle-aged"
if(60 to 70) return "aging"
if(70 to INFINITY) return "elderly"
- else return "unknown"
\ No newline at end of file
+ else return "unknown"
+
+
+
+/*
+Proc for attack log creation, because really why not
+1 argument is the actor
+2 argument is the target of action
+3 is the description of action(like punched, throwed, or any other verb)
+4 is the tool with which the action was made(usually item)
+5 is additional information, anything that needs to be added
+*/
+
+proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=null)
+ if(ismob(user))
+ user.attack_log += text("\[[time_stamp()]\] Has [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]")
+ if(ismob(target))
+ target.attack_log += text("\[[time_stamp()]\] Has been [what_done] by [user.name][ismob(user) ? "([user.ckey])" : ""][object ? " with [object]" : " "][addition]")
+ log_attack("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]")
+ if(target.client)
+ if(what_done != ("shaked" || "CPRed" || "grabbed"))
+ message_admins("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition](JMP)")
\ No newline at end of file
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index 11022a232ac..a067eccfdc2 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -39,9 +39,7 @@
user.lastattacked = M
M.lastattacker = user
- user.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])"
- M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])"
- log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" )
+ add_logs(user, M, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])")
//spawn(1800) // this wont work right
// M.lastattacker = null
diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm
index 4d020dedc8f..0afe0d50826 100644
--- a/code/modules/mob/living/carbon/human/human_attackhand.dm
+++ b/code/modules/mob/living/carbon/human/human_attackhand.dm
@@ -13,6 +13,7 @@
..()
if((M != src) && check_shields(0, M.name))
+ add_logs(src, M, "attempted to touch")
visible_message("\red [M] attempted to touch [src]!")
return 0
@@ -47,6 +48,7 @@
if("help")
if(health >= config.health_threshold_crit)
help_shake_act(M)
+ add_logs(src, M, "shaked")
return 1
// if(M.health < -75) return 0
@@ -66,6 +68,7 @@
requests += O
spawn(0)
O.process()
+ add_logs(src, M, "CPRed")
return 1
if("grab")
@@ -86,6 +89,7 @@
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("[M] has grabbed [src] passively!")
+ add_logs(src, M, "grabbed", addition="passively")
return 1
if("hurt")
@@ -104,14 +108,12 @@
return 0
//we're good to suck the blood, blaah
M.handle_bloodsucking(src)
+ add_logs(src, M, "vampirebit")
+ message_admins("[M.name] ([M.ckey]) vampirebit [src.name] ([src.ckey])")
return
//end vampire codes
-
- M.attack_log += text("\[[time_stamp()]\] [M.species.attack_verb]ed [src.name] ([src.ckey])")
- src.attack_log += text("\[[time_stamp()]\] Has been [M.species.attack_verb]ed by [M.name] ([M.ckey])")
-
- log_attack("[M.name] ([M.ckey]) [M.species.attack_verb]ed [src.name] ([src.ckey])")
+ add_logs(src, M, "[M.species.attack_verb]ed")
var/damage = rand(0, M.species.max_hurt_damage)//BS12 EDIT
if(!damage)
@@ -146,10 +148,7 @@
if("disarm")
- M.attack_log += text("\[[time_stamp()]\] Disarmed [src.name] ([src.ckey])")
- src.attack_log += text("\[[time_stamp()]\] Has been disarmed by [M.name] ([M.ckey])")
-
- log_attack("[M.name] ([M.ckey]) disarmed [src.name] ([src.ckey])")
+ add_logs(src, M, "disarmed")
if(w_uniform)
w_uniform.add_fingerprint(M)