Files
Bubberstation/code/modules/research/server_control.dm
Waterpig bb70889f6e TG Upstream Part 1
3591 individual conflicts

Update build.js

Update install_node.sh

Update byond.js

oh my fucking god

hat

slow

huh

holy shit

we all fall down

2 more I missed

2900 individual conflicts

2700 Individual conflicts

replaces yarn file with tg version, bumping us down to 2200-ish

Down to 2000 individual conflicts

140 down

mmm

aaaaaaaaaaaaaaaaaaa

not yt

575

soon

900 individual conflicts

600 individual conflicts, 121 file conflicts

im not okay

160 across 19 files

29 in 4 files

0 conflicts, compiletime fix time

some minor incap stuff

missed ticks

weird dupe definition stuff

missed ticks 2

incap fixes

undefs and pie fix

Radio update and some extra minor stuff

returns a single override

no more dupe definitions, 175 compiletime errors

Unticked file fix

sound and emote stuff

honk and more radio stuff
2024-10-19 08:04:33 -07:00

86 lines
2.8 KiB
Plaintext

/obj/machinery/computer/rdservercontrol
name = "R&D Server Controller"
desc = "Manages access to research databases and consoles."
icon_screen = "rdcomp"
icon_keyboard = "rd_key"
circuit = /obj/item/circuitboard/computer/rdservercontrol
req_access = list(ACCESS_RD)
///Connected techweb node the server is connected to.
var/datum/techweb/stored_research
/obj/machinery/computer/rdservercontrol/post_machine_initialize()
. = ..()
if(!CONFIG_GET(flag/no_default_techweb_link) && !stored_research)
CONNECT_TO_RND_SERVER_ROUNDSTART(stored_research, src)
/obj/machinery/computer/rdservercontrol/multitool_act(mob/living/user, obj/item/multitool/tool)
if(!QDELETED(tool.buffer) && istype(tool.buffer, /datum/techweb))
stored_research = tool.buffer
balloon_alert(user, "techweb connected")
return TRUE
/obj/machinery/computer/rdservercontrol/emag_act(mob/user, obj/item/card/emag/emag_card)
if(obj_flags & EMAGGED)
return FALSE
obj_flags |= EMAGGED
playsound(src, SFX_SPARKS, 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
balloon_alert(user, "console emagged")
return TRUE
/obj/machinery/computer/rdservercontrol/ui_interact(mob/user, datum/tgui/ui)
. = ..()
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "ServerControl", name)
ui.open()
/obj/machinery/computer/rdservercontrol/ui_data(mob/user)
var/list/data = list()
data["server_connected"] = !!stored_research
if(stored_research)
data["logs"] += stored_research.research_logs
for(var/obj/machinery/rnd/server/server as anything in stored_research.techweb_servers)
data["servers"] += list(list(
"server_name" = server,
"server_details" = server.get_status_text(),
"server_disabled" = server.research_disabled,
"server_ref" = REF(server),
))
for(var/obj/machinery/computer/rdconsole/console as anything in stored_research.consoles_accessing)
data["consoles"] += list(list(
"console_name" = console,
"console_location" = get_area(console),
"console_locked" = console.locked,
"console_ref" = REF(console),
))
return data
/obj/machinery/computer/rdservercontrol/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
if(.)
return TRUE
if(!allowed(usr) && !(obj_flags & EMAGGED))
balloon_alert(usr, "access denied!")
playsound(src, 'sound/machines/click.ogg', 20, TRUE)
return TRUE
switch(action)
if("lockdown_server")
var/obj/machinery/rnd/server/server_selected = locate(params["selected_server"]) in stored_research.techweb_servers
if(!server_selected)
return FALSE
server_selected.toggle_disable(usr)
return TRUE
if("lock_console")
var/obj/machinery/computer/rdconsole/console_selected = locate(params["selected_console"]) in stored_research.consoles_accessing
if(!console_selected)
return FALSE
console_selected.locked = !console_selected.locked
return TRUE