mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-01 04:52:16 +00:00
Modular PDA tweaks and bugfixes (#10440)
rscadd: "Handheld modular computers now use flashlights as a light source. They may be turned on/off via a button in the PC header, and have their brightness adjusted in Hardware Configuration."
tweak: Message notifications should be much larger.
tweak: "Chat messages are now logged to the NTNet Monitoring program."
bugfix: "IDs are now unregistered from computers when the computer is destroyed."
bugfix: "Fix Eject Battery having a global view range."
bugfix: "Chat Clients are no longer set to 'silent' by default."
backend: "Added a new slider component for VueUIs."
Closes #10439
This commit is contained in:
@@ -24,11 +24,13 @@ var/global/ntnrc_uid = 0
|
||||
|
||||
for(var/datum/computer_file/program/chatclient/C in clients)
|
||||
if(C.program_state > PROGRAM_STATE_KILLED)
|
||||
C.computer.output_message(FONT_SMALL("<b>([get_title(C)]) <i>[username]</i>:</b> [message] (<a href='byond://?src=\ref[C];Reply=1;target=[src.title]'>Reply</a>)"), 0)
|
||||
C.computer.output_message("<b>([get_title(C)]) <i>[username]</i>:</b> [message] (<a href='byond://?src=\ref[C];Reply=1;target=[src.title]'>Reply</a>)", 0)
|
||||
if(!C.silent && C.username != username && C.program_state == PROGRAM_STATE_BACKGROUND)
|
||||
for (var/mob/O in hearers(2, get_turf(C.computer)))
|
||||
playsound(C.computer, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
O.show_message(text("[icon2html(C.computer, O)] *[C.ringtone]*"))
|
||||
C.computer.output_message(text("[icon2html(C.computer, O)] *[C.ringtone]*"))
|
||||
else if(C.username == username)
|
||||
ntnet_global.add_log(message, C.computer.network_card, TRUE)
|
||||
|
||||
message = "[worldtime2text()] [username]: [message]"
|
||||
messages.Add(message)
|
||||
|
||||
@@ -5,6 +5,7 @@ var/global/datum/ntnet/ntnet_global = new()
|
||||
/datum/ntnet
|
||||
var/list/relays = list()
|
||||
var/list/logs = list()
|
||||
var/list/messages = list()
|
||||
var/list/available_station_software = list()
|
||||
var/list/available_antag_software = list()
|
||||
var/list/available_software = list()
|
||||
@@ -44,14 +45,17 @@ var/global/datum/ntnet/ntnet_global = new()
|
||||
new /datum/ntnet_conversation("NTNet Relay", TRUE)
|
||||
|
||||
// Simplified logging: Adds a log. log_string is mandatory parameter, source is optional.
|
||||
/datum/ntnet/proc/add_log(var/log_string, var/obj/item/computer_hardware/network_card/source = null)
|
||||
/datum/ntnet/proc/add_log(var/log_string, var/obj/item/computer_hardware/network_card/source = null, var/messaging=FALSE)
|
||||
var/log_text = "[worldtime2text()] - "
|
||||
if(source)
|
||||
log_text += "[source.get_network_tag()] - "
|
||||
else
|
||||
log_text += "*SYSTEM* - "
|
||||
log_text += log_string
|
||||
logs.Add(log_text)
|
||||
if(!messaging)
|
||||
logs.Add(log_text)
|
||||
else
|
||||
messages.Add(log_text)
|
||||
|
||||
if(logs.len > setting_maxlogcount)
|
||||
// We have too many logs, remove the oldest entries until we get into the limit
|
||||
@@ -134,6 +138,7 @@ var/global/datum/ntnet/ntnet_global = new()
|
||||
// Removes all logs
|
||||
/datum/ntnet/proc/purge_logs()
|
||||
logs = list()
|
||||
messages = list()
|
||||
add_log("-!- LOGS DELETED BY SYSTEM OPERATOR -!-")
|
||||
|
||||
// Updates maximal amount of stored logs. Use this instead of setting the number, it performs required checks.
|
||||
|
||||
Reference in New Issue
Block a user