mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-25 17:41:56 +00:00
@@ -7,6 +7,7 @@ var/global/datum/ntnet/ntnet_global = new()
|
||||
var/list/logs = list()
|
||||
var/list/available_station_software = list()
|
||||
var/list/available_antag_software = list()
|
||||
var/list/available_news = list()
|
||||
var/list/chat_channels = list()
|
||||
var/list/fileservers = list()
|
||||
// Amount of logs the system tries to keep in memory. Keep below 999 to prevent byond from acting weirdly.
|
||||
@@ -32,6 +33,7 @@ var/global/datum/ntnet/ntnet_global = new()
|
||||
relays.Add(R)
|
||||
R.NTNet = src
|
||||
build_software_lists()
|
||||
build_news_list()
|
||||
add_log("NTNet logging system activated.")
|
||||
|
||||
// Simplified logging: Adds a log. log_string is mandatory parameter, source is optional.
|
||||
@@ -61,7 +63,7 @@ var/global/datum/ntnet/ntnet_global = new()
|
||||
|
||||
// Check all relays. If we have at least one working relay, network is up.
|
||||
for(var/obj/machinery/ntnet_relay/R in relays)
|
||||
if(R.is_operational())
|
||||
if(R.operable())
|
||||
operating = 1
|
||||
break
|
||||
|
||||
@@ -93,6 +95,15 @@ var/global/datum/ntnet/ntnet_global = new()
|
||||
if(prog.available_on_syndinet)
|
||||
available_antag_software.Add(prog)
|
||||
|
||||
// Builds lists that contain downloadable software.
|
||||
/datum/ntnet/proc/build_news_list()
|
||||
available_news = list()
|
||||
for(var/F in typesof(/datum/computer_file/data/news_article/))
|
||||
var/datum/computer_file/data/news_article/news = new F(1)
|
||||
if(news.stored_data)
|
||||
available_news.Add(news)
|
||||
|
||||
|
||||
// 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)
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
|
||||
|
||||
// TODO: Implement more logic here. For now it's only a placeholder.
|
||||
/obj/machinery/ntnet_relay/proc/is_operational()
|
||||
if(stat & (BROKEN | NOPOWER | EMPED))
|
||||
/obj/machinery/ntnet_relay/operable()
|
||||
if(!..(EMPED))
|
||||
return 0
|
||||
if(dos_failure)
|
||||
return 0
|
||||
@@ -30,13 +30,13 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/ntnet_relay/update_icon()
|
||||
if(is_operational())
|
||||
if(operable())
|
||||
icon_state = "bus"
|
||||
else
|
||||
icon_state = "bus_off"
|
||||
|
||||
/obj/machinery/ntnet_relay/process()
|
||||
if(is_operational())
|
||||
if(operable())
|
||||
use_power = 2
|
||||
else
|
||||
use_power = 1
|
||||
|
||||
Reference in New Issue
Block a user