From e1ee415ed353060cd1cd474d8bf35d38f96d344e Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 27 Feb 2023 23:35:24 +0100 Subject: [PATCH] [MIRROR] Improves admin rod logging and fixes un-aimed rods being aimed. [MDB IGNORE] (#19578) * Improves admin rod logging and fixes un-aimed rods being aimed. (#73668) ## About The Pull Request Logs wont say a rod has been aimed at null location anymore and instead will say "a random location" Also admin rods that were not aimed were retaining the location set by previous rods which is bad since it meant un-aimed rods were actually aimed. ## Why It's Good For The Game Bug fix + better logging. ## Changelog :cl: fix: Un-aimed admin rods will now actually be un-aimed instead of aimed at the previous aimed rods target. admin: Admin aimed rods will now log that they're aimed randomly when not aimed. /:cl: * Improves admin rod logging and fixes un-aimed rods being aimed. --------- Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com> --- code/modules/events/immovable_rod/immovable_rod_event.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/events/immovable_rod/immovable_rod_event.dm b/code/modules/events/immovable_rod/immovable_rod_event.dm index a21c77d3e89..91cf7ad3455 100644 --- a/code/modules/events/immovable_rod/immovable_rod_event.dm +++ b/code/modules/events/immovable_rod/immovable_rod_event.dm @@ -33,14 +33,18 @@ var/force_looping = FALSE /datum/event_admin_setup/immovable_rod/prompt_admins() + special_target = null + force_looping = FALSE + var/aimed = tgui_alert(usr,"Aimed at current location?", "Sniperod", list("Yes", "No")) if(aimed == "Yes") special_target = get_turf(usr) var/looper = tgui_alert(usr,"Would you like this rod to force-loop across space z-levels?", "Loopy McLoopface", list("Yes", "No")) if(looper == "Yes") force_looping = TRUE - message_admins("[key_name_admin(usr)] has aimed an immovable rod [force_looping ? "(forced looping)" : ""] at [AREACOORD(special_target)].") - log_admin("[key_name_admin(usr)] has aimed an immovable rod [force_looping ? "(forced looping)" : ""] at [AREACOORD(special_target)].") + var/log_message = "[key_name_admin(usr)] has aimed an immovable rod [force_looping ? "(forced looping) " : ""]at [special_target ? AREACOORD(special_target) : "a random location"]." + message_admins(log_message) + log_admin(log_message) /datum/event_admin_setup/immovable_rod/apply_to_event(datum/round_event/immovable_rod/event) event.special_target = special_target