mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
[MIRROR] Adds a modular computer subsystem to shift modPCs away from radios [MDB IGNORE] (#17942)
* Adds a modular computer subsystem to shift modPCs away from radios (#71732) ## About The Pull Request Adds the modular computer subsystem which is meant to replace mod PC's reliance on networks and radios, specifically the network subsystem, the ntnet interface, and /datum/ntnet. This PR removes station_root ntnets entirely, but I tried to keep it small. This PR also removes a ton of unused vars and defines, such as NTNet channels that were unused (peer2peer and systemcontrol), atmos networks (as they were removed a while ago) and NTNet var on relays (its stated purpose is so admins can see it through varedits, but that's useless now that it's a subsystem) I also removed ``setting_disabled`` as a thing the RD can do, it turned off ALL ntnet systems. However, this was when there were 4 different ones, now that there's only 2 I thought it was redundant and he could just click 2 buttons to close them. ## Why It's Good For The Game ``/datum/ntnet``, ``/datum/component/ntnet_interface``, and ``/datum/controller/subsystem/networks`` are all old-code messes that depend on eachother and is hard for people to understand what exactly it adds to the game. 90% of its features is allowing the Wirecarp app to see all the ruins that spawned in-game, which I don't think is something that we even WANT (why does the RD need to know that oldstation spawned? Why should they know this anyway??) This hopefully starts to simplify networks/ntnet to make it easier to remove in the future, because surely there are better alternatives than **this** ## Changelog 🆑 refactor: Modular computers NTnet and applications run on its own subsystem, please report any new bugs you may find. /🆑 * Adds a modular computer subsystem to shift modPCs away from radios * Fixed contractor uplink Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: tastyfish <crazychris32@gmail.com>
This commit is contained in:
co-authored by
John Willard
tastyfish
parent
919b1bc253
commit
86e811f782
@@ -17,42 +17,22 @@
|
||||
return
|
||||
switch(action)
|
||||
if("resetIDS")
|
||||
if(SSnetworks.station_network)
|
||||
SSnetworks.station_network.resetIDS()
|
||||
SSmodular_computers.intrusion_detection_alarm = FALSE
|
||||
return TRUE
|
||||
if("toggleIDS")
|
||||
if(SSnetworks.station_network)
|
||||
SSnetworks.station_network.toggleIDS()
|
||||
return TRUE
|
||||
if("toggleWireless")
|
||||
if(!SSnetworks.station_network)
|
||||
return
|
||||
|
||||
// NTNet is disabled. Enabling can be done without user prompt
|
||||
if(SSnetworks.station_network.setting_disabled)
|
||||
SSnetworks.station_network.setting_disabled = FALSE
|
||||
return TRUE
|
||||
|
||||
SSnetworks.station_network.setting_disabled = TRUE
|
||||
SSmodular_computers.intrusion_detection_enabled = !SSmodular_computers.intrusion_detection_enabled
|
||||
return TRUE
|
||||
if("purgelogs")
|
||||
if(SSnetworks.station_network)
|
||||
SSnetworks.purge_logs()
|
||||
SSnetworks.purge_logs()
|
||||
return TRUE
|
||||
if("updatemaxlogs")
|
||||
var/logcount = params["new_number"]
|
||||
if(SSnetworks.station_network)
|
||||
SSnetworks.update_max_log_count(logcount)
|
||||
SSnetworks.update_max_log_count(logcount)
|
||||
return TRUE
|
||||
if("toggle_function")
|
||||
if(!SSnetworks.station_network)
|
||||
return
|
||||
SSnetworks.station_network.toggle_function(text2num(params["id"]))
|
||||
SSmodular_computers.toggle_function(text2num(params["id"]))
|
||||
return TRUE
|
||||
if("toggle_mass_pda")
|
||||
if(!SSnetworks.station_network)
|
||||
return
|
||||
|
||||
var/obj/item/modular_computer/target_tablet = locate(params["ref"]) in GLOB.TabletMessengers
|
||||
if(!istype(target_tablet))
|
||||
return
|
||||
@@ -60,30 +40,24 @@
|
||||
messenger_app.spam_mode = !messenger_app.spam_mode
|
||||
|
||||
/datum/computer_file/program/ntnetmonitor/ui_data(mob/user)
|
||||
if(!SSnetworks.station_network)
|
||||
return
|
||||
var/list/data = get_header_data()
|
||||
|
||||
data["ntnetstatus"] = SSnetworks.station_network.check_function()
|
||||
data["ntnetrelays"] = SSnetworks.relays.len
|
||||
data["idsstatus"] = SSnetworks.station_network.intrusion_detection_enabled
|
||||
data["idsalarm"] = SSnetworks.station_network.intrusion_detection_alarm
|
||||
data["ntnetstatus"] = SSmodular_computers.check_function()
|
||||
data["ntnetrelays"] = SSmodular_computers.ntnet_relays.len
|
||||
|
||||
data["config_softwaredownload"] = SSnetworks.station_network.setting_softwaredownload
|
||||
data["config_peertopeer"] = SSnetworks.station_network.setting_peertopeer
|
||||
data["config_communication"] = SSnetworks.station_network.setting_communication
|
||||
data["config_systemcontrol"] = SSnetworks.station_network.setting_systemcontrol
|
||||
data["config_softwaredownload"] = SSmodular_computers.setting_softwaredownload
|
||||
data["config_communication"] = SSmodular_computers.setting_communication
|
||||
|
||||
data["idsstatus"] = SSmodular_computers.intrusion_detection_enabled
|
||||
data["idsalarm"] = SSmodular_computers.intrusion_detection_alarm
|
||||
|
||||
data["ntnetlogs"] = list()
|
||||
data["minlogs"] = MIN_NTNET_LOGS
|
||||
data["maxlogs"] = MAX_NTNET_LOGS
|
||||
|
||||
for(var/i in SSnetworks.logs)
|
||||
data["ntnetlogs"] += list(list("entry" = i))
|
||||
data["ntnetmaxlogs"] = SSnetworks.setting_maxlogcount
|
||||
|
||||
data["tablets"] = list()
|
||||
for(var/obj/item/modular_computer/messenger in GetViewableDevices())
|
||||
for(var/obj/item/modular_computer/messenger as anything in GetViewableDevices())
|
||||
var/list/tablet_data = list()
|
||||
if(messenger.saved_identification)
|
||||
for(var/datum/computer_file/program/messenger/messenger_app in computer.stored_files)
|
||||
@@ -95,3 +69,9 @@
|
||||
data["tablets"] += list(tablet_data)
|
||||
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/ntnetmonitor/ui_static_data(mob/user)
|
||||
var/list/data = ..()
|
||||
data["minlogs"] = MIN_NTNET_LOGS
|
||||
data["maxlogs"] = MAX_NTNET_LOGS
|
||||
return data
|
||||
|
||||
Reference in New Issue
Block a user