Skip to content

Commit

Permalink
dropship logs
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Jul 31, 2023
1 parent 7801f5f commit 0c7bf41
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
6 changes: 4 additions & 2 deletions code/__HELPERS/logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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]\]<font color='green'> [msg] </font>"
target.attack_log += "\[[time]\]<font color='green'> [msg] </font>"
if(origin)
origin.attack_log += "\[[time]\]<font color='green'> [msg] </font>"
if(target)
target.attack_log += "\[[time]\]<font color='green'> [msg] </font>"

GLOB.STUI.attack.Add("\[[time]]INTERACT: [msg]")
GLOB.STUI.processing |= STUI_LOG_ATTACK
Expand Down
22 changes: 18 additions & 4 deletions code/modules/shuttle/computers/dropship_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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)
Expand All @@ -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"]
Expand All @@ -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...
Expand All @@ -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")
Expand Down

0 comments on commit 0c7bf41

Please sign in to comment.