From 0c7bf41d0dfab4ddd68306b2e108944b9a76800a Mon Sep 17 00:00:00 2001 From: forest2001 Date: Mon, 31 Jul 2023 13:35:21 +0100 Subject: [PATCH] dropship logs --- code/__HELPERS/logging.dm | 6 +++-- .../shuttle/computers/dropship_computer.dm | 22 +++++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/code/__HELPERS/logging.dm b/code/__HELPERS/logging.dm index 32da4c953188..5ecbff108725 100644 --- a/code/__HELPERS/logging.dm +++ b/code/__HELPERS/logging.dm @@ -108,8 +108,10 @@ if (CONFIG_GET(flag/log_interact)) WRITE_LOG(GLOB.world_game_log, "INTERACT: [msg]") LOG_REDIS("interact", "\[[time]\] [msg]") - origin.attack_log += "\[[time]\] [msg] " - target.attack_log += "\[[time]\] [msg] " + if(origin) + origin.attack_log += "\[[time]\] [msg] " + if(target) + target.attack_log += "\[[time]\] [msg] " GLOB.STUI.attack.Add("\[[time]]INTERACT: [msg]") GLOB.STUI.processing |= STUI_LOG_ATTACK diff --git a/code/modules/shuttle/computers/dropship_computer.dm b/code/modules/shuttle/computers/dropship_computer.dm index 50449b32fcb9..5ad84e17f159 100644 --- a/code/modules/shuttle/computers/dropship_computer.dm +++ b/code/modules/shuttle/computers/dropship_computer.dm @@ -362,6 +362,9 @@ update_equipment(is_optimised) if(is_set_flyby) to_chat(user, SPAN_NOTICE("You begin the launch sequence for a flyby.")) + var/log = "[key_name(user)] launched the dropship [src.shuttleId] on flyby." + msg_admin_niche(log) + log_interact(user, msg = "[log]") shuttle.send_for_flyby() return TRUE var/dockId = params["target"] @@ -387,6 +390,9 @@ return TRUE SSshuttle.moveShuttle(shuttle.id, dock.id, TRUE) to_chat(user, SPAN_NOTICE("You begin the launch sequence to [dock].")) + var/log = "[key_name(user)] launched the dropship [src.shuttleId] on transport." + msg_admin_niche(log) + log_interact(user, msg = "[log]") return TRUE if("button-push") playsound(loc, get_sfx("terminal_button"), KEYBOARD_SOUND_VOLUME, 1) @@ -403,10 +409,14 @@ to_chat(user, SPAN_WARNING("Door controls have been overridden. Please call technical support.")) if("set-ferry") is_set_flyby = FALSE - msg_admin_niche("[key_name_admin(usr)] set the dropship [src.shuttleId] into transport") + var/log = "[key_name(user)] set the dropship [src.shuttleId] into transport" + msg_admin_niche(log) + log_interact(user, msg = "[log]") if("set-flyby") is_set_flyby = TRUE - msg_admin_niche("[key_name_admin(usr)] set the dropship [src.shuttleId] into flyby") + var/log = "[key_name(user)] set the dropship [src.shuttleId] into flyby." + msg_admin_niche(log) + log_interact(user, msg = "[log]") if("set-automate") var/almayer_lz = params["hangar_id"] var/ground_lz = params["ground_id"] @@ -426,7 +436,9 @@ shuttle.automated_lz_id = ground_lz shuttle.automated_delay = delay playsound(loc, get_sfx("terminal_button"), KEYBOARD_SOUND_VOLUME, 1) - message_admins("[key_name_admin(usr)] has set auto pilot on '[shuttle.name]'") + var/log = "[key_name(user)] has enabled auto pilot on '[shuttle.name]'" + message_admins(log) + log_interact(user, msg = "[log]") return /* TODO if(!dropship.automated_launch) //If we're toggling it on... @@ -440,7 +452,9 @@ shuttle.automated_lz_id = null shuttle.automated_delay = null playsound(loc, get_sfx("terminal_button"), KEYBOARD_SOUND_VOLUME, 1) - message_admins("[key_name_admin(usr)] has removed auto pilot on '[shuttle.name]'") + var/log = "[key_name(user)] has disabled auto pilot on '[shuttle.name]'" + message_admins(log) + log_interact(user, msg = "[log]") return if("cancel-flyby")