diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index e836824ad3a..0aa01605808 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -272,15 +272,19 @@
update_all_mob_security_hud()
return 1
-/*
-Proc for attack log creation, because really why not
-1 argument is the actor
-2 argument is the target of action
-3 is the full description of the action
-4 is whether or not to message admins
-This is always put in the attack log.
-*/
-
+/**
+ * Creates attack (old and new) logs for the user and defense logs for the target.
+ * Will message admins depending on the custom_level, user and target.
+ *
+ * custom_level will determine the log level set. Unless the target is SSD and there is a user doing it
+ * If custom_level is not set then the log level will be determined using the user and the target.
+ *
+ * * Arguments:
+ * * user - The thing doing it. Can be null
+ * * target - The target of the attack
+ * * what_done - What has happened
+ * * custom_level - The log level override
+ */
/proc/add_attack_logs(atom/user, target, what_done, custom_level)
if(islist(target)) // Multi-victim adding
var/list/targets = target
@@ -323,7 +327,7 @@ This is always put in the attack log.
loglevel = ATKLOG_ALMOSTALL
else
loglevel = ATKLOG_ALL // Hitting an object. Not a mob
- if(isLivingSSD(target)) // Attacks on SSDs are shown to admins with any log level except ATKLOG_NONE. Overrides custom level
+ if(user && isLivingSSD(target)) // Attacks on SSDs are shown to admins with any log level except ATKLOG_NONE. Overrides custom level
loglevel = ATKLOG_FEW
diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm
index d762543f807..23f251efaff 100644
--- a/code/game/machinery/wishgranter.dm
+++ b/code/game/machinery/wishgranter.dm
@@ -42,11 +42,11 @@
user.mind.add_antag_datum(/datum/antagonist/wishgranter)
to_chat(user, "You have a very bad feeling about this.")
-
+
/obj/machinery/wish_granter/super
name = "super wish granter"
var/list/types = list()
-
+
/obj/machinery/wish_granter/super/attack_hand(mob/living/carbon/user)
. = ..()
@@ -60,9 +60,9 @@
if(is_special_character(user) || jobban_isbanned(user, ROLE_TRAITOR) || jobban_isbanned(user, ROLE_SYNDICATE))
to_chat(user, "Something instinctual makes you pull away.")
return TRUE
-
+
to_chat(user, "Your touch makes the Wish Granter stir. Are you really sure you want to do this?")
-
+
for(var/supname in GLOB.all_superheroes)
types += supname
@@ -85,6 +85,6 @@
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
visible_message("The wishgranter fades into mist..")
- add_attack_logs(null, user, "Became [GLOB.all_superheroes[wish]]")
+ add_attack_logs(user, user, "Became [GLOB.all_superheroes[wish]]")
notify_ghosts("[GLOB.all_superheroes[wish]] has appeared in [get_area(user)].", source = user)
qdel(src)
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index 351aba3905b..2b04b105535 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -165,7 +165,7 @@
if(istype(firer, /mob))
add_attack_logs(firer, M, "Mecha-shot with [src]")
else
- add_attack_logs(null, M, "Mecha-shot with [src]")
+ add_attack_logs(src, M, "Mecha-shot with [src] (no firer)")
if(life <= 0)
qdel(src)
return
diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm
index 29da75cbc62..5e0f6ffcf09 100644
--- a/code/modules/projectiles/guns/magic/wand.dm
+++ b/code/modules/projectiles/guns/magic/wand.dm
@@ -51,7 +51,7 @@
user.visible_message("[user] zaps [user.p_them()]self with [src].")
playsound(user, fire_sound, 50, 1)
user.create_attack_log("[key_name(user)] zapped [user.p_them()]self with a [src]")
- add_attack_logs(null, user, "zapped [user.p_them()]self with a [src]", ATKLOG_ALL)
+ add_attack_logs(user, user, "zapped [user.p_them()]self with a [src]", ATKLOG_ALL)
/////////////////////////////////////
//WAND OF DEATH
diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm
index 512f9188606..19efbbc35d5 100644
--- a/code/modules/projectiles/projectile/magic.dm
+++ b/code/modules/projectiles/projectile/magic.dm
@@ -275,7 +275,7 @@
return
M.create_attack_log("[key_name(M)] became [new_mob.real_name].")
- add_attack_logs(null, M, "became [new_mob.real_name]", ATKLOG_ALL)
+ add_attack_logs(M, M, "became [new_mob.real_name]", ATKLOG_ALL)
new_mob.a_intent = INTENT_HARM
if(M.mind)