mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 04:17:33 +01: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:
@@ -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