Adds header icons

Does some fixes and cleanup
Some consoles added to the map and tablets added to job loadouts for testmerging.
This commit is contained in:
Shadowlight213
2016-08-06 23:05:05 -07:00
parent 3628d1b9df
commit 4ebeec67d6
51 changed files with 282 additions and 157 deletions

View File

@@ -1,4 +1,4 @@
var/global/ntnrc_uid = 0
var/global/static/ntnrc_uid = 0
/datum/ntnet_conversation/
var/id = null
@@ -27,10 +27,7 @@ var/global/ntnrc_uid = 0
/datum/ntnet_conversation/proc/trim_message_list()
if(messages.len <= 50)
return
for(var/message in messages)
messages -= message
if(messages <= 50)
return
messages = messages.Copy(messages.len-50 ,0)
/datum/ntnet_conversation/proc/add_client(var/datum/computer_file/program/chatclient/C)
if(!istype(C))

View File

@@ -35,7 +35,7 @@ var/global/datum/ntnet/ntnet_global = new()
add_log("NTNet logging system activated.")
// Simplified logging: Adds a log. log_string is mandatory parameter, source is optional.
/datum/ntnet/proc/add_log(var/log_string, var/obj/item/weapon/computer_hardware/network_card/source = null)
/datum/ntnet/proc/add_log(log_string, obj/item/weapon/computer_hardware/network_card/source = null)
var/log_text = "[worldtime2text()] - "
if(source)
log_text += "[source.get_network_tag()] - "
@@ -44,23 +44,22 @@ var/global/datum/ntnet/ntnet_global = new()
log_text += log_string
logs.Add(log_text)
// We have too many logs, remove the oldest entries until we get into the limit
if(logs.len > setting_maxlogcount)
// We have too many logs, remove the oldest entries until we get into the limit
for(var/L in logs)
if(logs.len > setting_maxlogcount)
logs.Remove(L)
else
break
logs = logs.Copy(logs.len-setting_maxlogcount,0)
// Checks whether NTNet operates. If parameter is passed checks whether specific function is enabled.
/datum/ntnet/proc/check_function(var/specific_action = 0)
/datum/ntnet/proc/check_function(specific_action = 0)
if(!relays || !relays.len) // No relays found. NTNet is down
return 0
var/operating = 0
// Check all relays. If we have at least one working relay, network is up.
for(var/obj/machinery/ntnet_relay/R in relays)
for(var/M in relays)
var/obj/machinery/ntnet_relay/R = M
if(R.is_operational())
operating = 1
break
@@ -68,14 +67,15 @@ var/global/datum/ntnet/ntnet_global = new()
if(setting_disabled)
return 0
if(specific_action == NTNET_SOFTWAREDOWNLOAD)
return (operating && setting_softwaredownload)
if(specific_action == NTNET_PEERTOPEER)
return (operating && setting_peertopeer)
if(specific_action == NTNET_COMMUNICATION)
return (operating && setting_communication)
if(specific_action == NTNET_SYSTEMCONTROL)
return (operating && setting_systemcontrol)
switch(specific_action)
if(NTNET_SOFTWAREDOWNLOAD)
return (operating && setting_softwaredownload)
if(NTNET_PEERTOPEER)
return (operating && setting_peertopeer)
if(NTNET_COMMUNICATION)
return (operating && setting_communication)
if(NTNET_SYSTEMCONTROL)
return (operating && setting_systemcontrol)
return operating
// Builds lists that contain downloadable software.
@@ -94,11 +94,13 @@ var/global/datum/ntnet/ntnet_global = new()
available_antag_software.Add(prog)
// Attempts to find a downloadable file according to filename var
/datum/ntnet/proc/find_ntnet_file_by_name(var/filename)
for(var/datum/computer_file/program/P in available_station_software)
/datum/ntnet/proc/find_ntnet_file_by_name(filename)
for(var/N in available_station_software)
var/datum/computer_file/program/P = N
if(filename == P.filename)
return P
for(var/datum/computer_file/program/P in available_antag_software)
for(var/N in available_antag_software)
var/datum/computer_file/program/P = N
if(filename == P.filename)
return P
@@ -116,7 +118,7 @@ var/global/datum/ntnet/ntnet_global = new()
add_log("-!- LOGS DELETED BY SYSTEM OPERATOR -!-")
// Updates maximal amount of stored logs. Use this instead of setting the number, it performs required checks.
/datum/ntnet/proc/update_max_log_count(var/lognumber)
/datum/ntnet/proc/update_max_log_count(lognumber)
if(!lognumber)
return 0
// Trim the value if necessary
@@ -124,7 +126,7 @@ var/global/datum/ntnet/ntnet_global = new()
setting_maxlogcount = lognumber
add_log("Configuration Updated. Now keeping [setting_maxlogcount] logs in system memory.")
/datum/ntnet/proc/toggle_function(var/function)
/datum/ntnet/proc/toggle_function(function)
if(!function)
return
function = text2num(function)

View File

@@ -91,34 +91,9 @@
/*
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if (!ui)
ui = new(user, src, ui_key, "ntnet_relay.tmpl", "NTNet Quantum Relay", 500, 300, state = state)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
*/
/obj/machinery/ntnet_relay/attack_hand(var/mob/living/user)
/obj/machinery/ntnet_relay/attack_hand(mob/living/user)
ui_interact(user)
/*
/obj/machinery/ntnet_relay/Topic(href, href_list)
if(..())
return 1
if(href_list["restart"])
dos_overload = 0
dos_failure = 0
update_icon()
ntnet_global.add_log("Quantum relay manually restarted from overload recovery mode to normal operation mode.")
else if(href_list["toggle"])
enabled = !enabled
ntnet_global.add_log("Quantum relay manually [enabled ? "enabled" : "disabled"].")
update_icon()
*/
/obj/machinery/ntnet_relay/New()
uid = gl_uid
gl_uid++