* sdf

* fsda

* fuck

* fuck2

* toolz

* sdaf

* sdfa

* saf

* sdfa

* sdfa

* sdf

* sdfa

* temp rename

* temp rename

* temp rename

* sdaf

* the pain is immensurable in the land of byond

* the curse of rah

* safd

* sadf

* sadf

* gf

* asf

* fssdfa

* sfd

* sadf

* sfda

* brah

* brah

* it's easier for you to fix this

* ffs

* brah

* brah
This commit is contained in:
Fluffy
2024-01-06 17:03:57 +01:00
committed by GitHub
parent 8c76cfa9ea
commit e867030c2e
331 changed files with 2348 additions and 1643 deletions
@@ -13,8 +13,8 @@ var/global/ntnrc_uid = 0
ntnrc_uid++
if(name)
title = name
if(ntnet_global)
ntnet_global.chat_channels.Add(src)
if(GLOB.ntnet_global)
GLOB.ntnet_global.chat_channels.Add(src)
if(no_operator)
operator = "NanoTrasen Information Technology Division" // assign a fake operator
..()
@@ -35,7 +35,7 @@ var/global/ntnrc_uid = 0
var/ntnet_log = message.format_ntnet_log(src)
if(ntnet_log)
ntnet_global.add_log(ntnet_log, message.client.computer.network_card, TRUE)
GLOB.ntnet_global.add_log(ntnet_log, message.client.computer.network_card, TRUE)
var/chat_log = message.format_chat_log(src)
if(chat_log)
@@ -6,16 +6,16 @@
/datum/ntnet_user/New()
. = ..()
ntnet_global.chat_users.Add(src)
GLOB.ntnet_global.chat_users.Add(src)
/datum/ntnet_user/Destroy(force)
. = ..()
//This notifies every client that might have this as a client to deactivate and clear the reference
for(var/datum/computer_file/program/chat_client/client as anything in ntnet_global.chat_clients)
for(var/datum/computer_file/program/chat_client/client as anything in GLOB.ntnet_global.chat_clients)
client.handle_ntnet_user_deletion(src)
ntnet_global.chat_users.Remove(src)
GLOB.ntnet_global.chat_users.Remove(src)
channels = null
dm_channels = null
clients = null
@@ -1,4 +1,4 @@
var/global/datum/ntnet/ntnet_global = new()
GLOBAL_DATUM_INIT(ntnet_global, /datum/ntnet, new)
// This is the NTNet datum. There can be only one NTNet datum in game at once. Modular computers read data from this.
@@ -30,8 +30,8 @@ var/global/datum/ntnet/ntnet_global = new()
// If new NTNet datum is spawned, it replaces the old one.
/datum/ntnet/New()
if(ntnet_global && (ntnet_global != src))
ntnet_global = src // There can be only one.
if(GLOB.ntnet_global && (GLOB.ntnet_global != src))
GLOB.ntnet_global = src // There can be only one.
for(var/obj/machinery/ntnet_relay/R in SSmachinery.machinery)
relays.Add(R)
R.NTNet = src
@@ -61,12 +61,12 @@
if((dos_overload > dos_capacity) && !dos_failure)
dos_failure = TRUE
update_icon()
ntnet_global.add_log("Quantum relay switched from normal operation mode to overload recovery mode.")
GLOB.ntnet_global.add_log("Quantum relay switched from normal operation mode to overload recovery mode.")
// If the DoS buffer reaches 0 again, restart.
if((dos_overload == 0) && dos_failure)
dos_failure = FALSE
update_icon()
ntnet_global.add_log("Quantum relay switched from overload recovery mode to normal operation mode.")
GLOB.ntnet_global.add_log("Quantum relay switched from overload recovery mode to normal operation mode.")
..()
/obj/machinery/ntnet_relay/ui_interact(mob/user, datum/tgui/ui)
@@ -92,11 +92,11 @@
dos_overload = FALSE
dos_failure = FALSE
update_icon()
ntnet_global.add_log("Quantum relay manually restarted from overload recovery mode to normal operation mode.")
GLOB.ntnet_global.add_log("Quantum relay manually restarted from overload recovery mode to normal operation mode.")
. = TRUE
if(action=="toggle")
enabled = !enabled
ntnet_global.add_log("Quantum relay manually [enabled ? "enabled" : "disabled"].")
GLOB.ntnet_global.add_log("Quantum relay manually [enabled ? "enabled" : "disabled"].")
update_icon()
. = TRUE
@@ -110,15 +110,15 @@
update_icon()
if(ntnet_global)
ntnet_global.relays.Add(src)
NTNet = ntnet_global
ntnet_global.add_log("New quantum relay activated. Current amount of linked relays: [NTNet.relays.len]")
if(GLOB.ntnet_global)
GLOB.ntnet_global.relays.Add(src)
NTNet = GLOB.ntnet_global
GLOB.ntnet_global.add_log("New quantum relay activated. Current amount of linked relays: [NTNet.relays.len]")
/obj/machinery/ntnet_relay/Destroy()
if(ntnet_global)
ntnet_global.relays.Remove(src)
ntnet_global.add_log("Quantum relay connection severed. Current amount of linked relays: [NTNet.relays.len]")
if(GLOB.ntnet_global)
GLOB.ntnet_global.relays.Remove(src)
GLOB.ntnet_global.add_log("Quantum relay connection severed. Current amount of linked relays: [NTNet.relays.len]")
return ..()
/obj/machinery/ntnet_relay/attackby(obj/item/W, mob/user)
@@ -49,7 +49,7 @@
ambience_last_played_time = world.time
/obj/item/modular_computer/proc/get_preset_programs(preset_type)
for(var/datum/modular_computer_app_presets/prs in ntnet_global.available_software_presets)
for(var/datum/modular_computer_app_presets/prs in GLOB.ntnet_global.available_software_presets)
if(prs.type == preset_type)
return prs.return_install_programs(src)
@@ -247,7 +247,7 @@
/obj/item/modular_computer/proc/add_log(var/text)
if(!get_ntnet_status())
return FALSE
return ntnet_global.add_log(text, network_card)
return GLOB.ntnet_global.add_log(text, network_card)
/obj/item/modular_computer/proc/shutdown_computer(var/loud = TRUE)
SStgui.close_uis(active_program)
@@ -16,9 +16,9 @@
// The program is active and connected to one of the station's networks. Has a very small chance to trigger IDS alarm every tick.
if(current_network && (current_network in current_map.station_networks) && prob(0.1))
if(ntnet_global.intrusion_detection_enabled)
ntnet_global.add_log("IDS WARNING - Unauthorised access detected to camera network [current_network] by device with NID [computer.network_card.get_network_tag()]")
ntnet_global.intrusion_detection_alarm = TRUE
if(GLOB.ntnet_global.intrusion_detection_enabled)
GLOB.ntnet_global.add_log("IDS WARNING - Unauthorised access detected to camera network [current_network] by device with NID [computer.network_card.get_network_tag()]")
GLOB.ntnet_global.intrusion_detection_alarm = TRUE
/datum/computer_file/program/camera_monitor/hacked/can_access_network(var/mob/user, var/network_access)
return TRUE
@@ -28,7 +28,7 @@
// whether to only select areas explicitly marked for nightlighting
var/wl_only = context == "all" ? 0 : 1
SSnightlight.suspend()
SSnightlight.can_fire = FALSE
if (lstate == "dark")
log_and_message_admins("enabled night-mode [wl_only ? "in public areas" : "globally"].", lusr.resolve())
@@ -63,7 +63,7 @@
/datum/computer_file/program/newsbrowser/ui_static_data(mob/user)
var/list/data = list()
var/list/all_articles = list()
for(var/datum/computer_file/data/news_article/F in ntnet_global.available_news)
for(var/datum/computer_file/data/news_article/F in GLOB.ntnet_global.available_news)
if(!show_archived && F.archived)
continue
all_articles.Add(list(list(
@@ -84,7 +84,7 @@
if(downloading || loaded_article)
return TRUE
for(var/datum/computer_file/data/news_article/N in ntnet_global.available_news)
for(var/datum/computer_file/data/news_article/N in GLOB.ntnet_global.available_news)
if(N.uid == text2num(params["PRG_openarticle"]))
loaded_article = N.clone()
downloading = TRUE
@@ -103,8 +103,8 @@
return
if(!(src in my_user.clients))
my_user.clients.Add(src)
if(!(src in ntnet_global.chat_clients))
ntnet_global.chat_clients.Add(src)
if(!(src in GLOB.ntnet_global.chat_clients))
GLOB.ntnet_global.chat_clients.Add(src)
computer.update_static_data_for_all_viewers()
/datum/computer_file/program/chat_client/proc/deactivate_chat_client()
@@ -112,8 +112,8 @@
return
if(src in my_user.clients)
my_user.clients.Remove(src)
if(src in ntnet_global.chat_clients)
ntnet_global.chat_clients.Remove(src)
if(src in GLOB.ntnet_global.chat_clients)
GLOB.ntnet_global.chat_clients.Remove(src)
computer.update_static_data_for_all_viewers()
/datum/computer_file/program/chat_client/proc/handle_ntnet_user_deletion(var/datum/ntnet_user)
@@ -161,7 +161,7 @@
var/list/data = list()
if(istype(my_user) && get_signal(NTNET_COMMUNICATION) && (service_state > PROGRAM_STATE_KILLED))
data["channels"] = list()
for(var/c in ntnet_global.chat_channels)
for(var/c in GLOB.ntnet_global.chat_channels)
var/datum/ntnet_conversation/channel = c
if(istype(channel) && (channel.can_see(src)))
var/ref = text_ref(channel)
@@ -184,7 +184,7 @@
data["channels"] += list(our_channel)
data["users"] = list()
for(var/u in ntnet_global.chat_users)
for(var/u in GLOB.ntnet_global.chat_users)
var/datum/ntnet_user/ntnet_user = u
if(ntnet_user != my_user)
data["users"] += list(list("ref" = text_ref(ntnet_user), "username" = ntnet_user.username))
@@ -298,21 +298,21 @@
. = TRUE
if(action == "new_channel")
ntnet_global.begin_conversation(src, sanitize(params["new_channel"]))
GLOB.ntnet_global.begin_conversation(src, sanitize(params["new_channel"]))
computer.update_static_data_for_all_viewers()
. = TRUE
if(action == "delete")
var/datum/ntnet_conversation/conv = locate(params["delete"])
if(istype(conv) && conv.can_manage(src))
ntnet_global.chat_channels.Remove(conv)
GLOB.ntnet_global.chat_channels.Remove(conv)
qdel(conv)
computer.update_static_data_for_all_viewers()
. = TRUE
if(action == "direct")
var/datum/ntnet_user/tUser = locate(params["direct"])
ntnet_global.begin_direct(src, tUser)
GLOB.ntnet_global.begin_direct(src, tUser)
computer.update_static_data_for_all_viewers()
. = TRUE
@@ -15,23 +15,23 @@
tgui_id = "NTMonitor"
/datum/computer_file/program/ntnetmonitor/ui_data(mob/user)
if(!ntnet_global)
if(!GLOB.ntnet_global)
return
var/list/data = initial_data()
data["ntnetstatus"] = ntnet_global.check_function()
data["ntnetrelays"] = ntnet_global.relays.len
data["idsstatus"] = ntnet_global.intrusion_detection_enabled
data["idsalarm"] = ntnet_global.intrusion_detection_alarm
data["ntnetstatus"] = GLOB.ntnet_global.check_function()
data["ntnetrelays"] = GLOB.ntnet_global.relays.len
data["idsstatus"] = GLOB.ntnet_global.intrusion_detection_enabled
data["idsalarm"] = GLOB.ntnet_global.intrusion_detection_alarm
data["config_softwaredownload"] = ntnet_global.setting_softwaredownload
data["config_peertopeer"] = ntnet_global.setting_peertopeer
data["config_communication"] = ntnet_global.setting_communication
data["config_systemcontrol"] = ntnet_global.setting_systemcontrol
data["config_softwaredownload"] = GLOB.ntnet_global.setting_softwaredownload
data["config_peertopeer"] = GLOB.ntnet_global.setting_peertopeer
data["config_communication"] = GLOB.ntnet_global.setting_communication
data["config_systemcontrol"] = GLOB.ntnet_global.setting_systemcontrol
data["ntnetlogs"] = ntnet_global.logs
data["ntnetmessages"] = ntnet_global.messages
data["ntnetmaxlogs"] = ntnet_global.setting_maxlogcount
data["ntnetlogs"] = GLOB.ntnet_global.logs
data["ntnetmessages"] = GLOB.ntnet_global.messages
data["ntnetmaxlogs"] = GLOB.ntnet_global.setting_maxlogcount
return data
@@ -42,24 +42,24 @@
switch(action)
if("resetIDS")
. = TRUE
if(ntnet_global)
ntnet_global.resetIDS()
if(GLOB.ntnet_global)
GLOB.ntnet_global.resetIDS()
if("toggleIDS")
. = TRUE
if(ntnet_global)
ntnet_global.toggleIDS()
if(GLOB.ntnet_global)
GLOB.ntnet_global.toggleIDS()
if("purgelogs")
. = TRUE
if(ntnet_global)
ntnet_global.purge_logs()
if(GLOB.ntnet_global)
GLOB.ntnet_global.purge_logs()
if("updatemaxlogs")
. = TRUE
var/mob/user = usr
var/logcount = text2num(input(user,"Enter amount of logs to keep in memory ([MIN_NTNET_LOGS]-[MAX_NTNET_LOGS]):"))
if(ntnet_global)
ntnet_global.update_max_log_count(logcount)
if(GLOB.ntnet_global)
GLOB.ntnet_global.update_max_log_count(logcount)
if("toggle_function")
. = TRUE
if(!ntnet_global)
if(!GLOB.ntnet_global)
return FALSE
ntnet_global.toggle_function(params["toggle_function"])
GLOB.ntnet_global.toggle_function(params["toggle_function"])
@@ -19,14 +19,14 @@
var/list/data = list()
data["enrollment"] = computer.enrolled
data["available_presets"] = list()
for(var/datum/modular_computer_app_presets/p in ntnet_global.available_software_presets)
for(var/datum/modular_computer_app_presets/p in GLOB.ntnet_global.available_software_presets)
if(p.available)
data["available_presets"][p.display_name] = p.description
return data
/datum/computer_file/program/clientmanager/ui_data(mob/user)
var/list/data = list()
data["ntnet_status"] = ntnet_global.check_function(NTNET_SOFTWAREDOWNLOAD)
data["ntnet_status"] = GLOB.ntnet_global.check_function(NTNET_SOFTWAREDOWNLOAD)
return data
/datum/computer_file/program/clientmanager/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
@@ -35,7 +35,7 @@
if(action == "enroll")
. = TRUE
if(!ntnet_global.check_function(NTNET_SOFTWAREDOWNLOAD))
if(!GLOB.ntnet_global.check_function(NTNET_SOFTWAREDOWNLOAD))
to_chat(ui.user, SPAN_WARNING("Cannot connect to NTNet download servers. Please try again later."))
return
if(params["enroll_type"] & DEVICE_COMPANY)
@@ -58,7 +58,7 @@
if(!computer)
return
for (var/datum/modular_computer_app_presets/prs in ntnet_global.available_software_presets)
for (var/datum/modular_computer_app_presets/prs in GLOB.ntnet_global.available_software_presets)
if(prs.display_name == preset && prs.available == 1)
var/list/prs_programs = prs.return_install_programs(computer)
for (var/datum/computer_file/program/prog in prs_programs)
@@ -32,7 +32,7 @@
/datum/computer_file/program/ntnetdownload/ui_static_data(mob/user)
var/list/data = list()
for(var/datum/computer_file/program/P in ntnet_global.available_software)
for(var/datum/computer_file/program/P in GLOB.ntnet_global.available_software)
if(hard_drive.find_file_by_name(P.filename))
continue
@@ -81,7 +81,7 @@
return TRUE
if(action == "download")
var/datum/computer_file/program/PRG = ntnet_global.find_ntnet_file_by_name(params["filename"])
var/datum/computer_file/program/PRG = GLOB.ntnet_global.find_ntnet_file_by_name(params["filename"])
if(istype(PRG))
add_to_queue(PRG, usr)
. = TRUE
@@ -81,7 +81,7 @@ var/global/ntnet_card_uid = 1
return 0
if(!check_functionality())
return 0
if(!ntnet_global || !ntnet_global.check_function(specific_action))
if(!GLOB.ntnet_global || !GLOB.ntnet_global.check_function(specific_action))
return 0
if(parent_computer)
@@ -25,7 +25,7 @@
if(_program == null)
qdel(src) //Delete itself if no program is set
return
var/datum/computer_file/program/PRG = ntnet_global.find_ntnet_file_by_name(_program)
var/datum/computer_file/program/PRG = GLOB.ntnet_global.find_ntnet_file_by_name(_program)
if(!PRG)
qdel(src) //Delete itself it no matching program is found
return