[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
🆑
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.
/🆑

* Improves admin rod logging and fixes un-aimed rods being aimed.

---------

Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-02-27 14:35:24 -08:00
committed by GitHub
co-authored by NamelessFairy
parent 475f0dfbbf
commit e1ee415ed3
@@ -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