Adds access restrictions to the AI upload console and rebalances the hacked upload boards. (#96323)

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
EnterTheJake
2026-06-26 14:29:14 -04:00
committed by GitHub
co-authored by MrMelbert
parent e33d3f563e
commit 178981d0da
8 changed files with 102 additions and 7 deletions
+11 -1
View File
@@ -523,6 +523,7 @@
/obj/structure/window/reinforced/spawner/directional/south,
/obj/structure/table,
/obj/machinery/door/window/brigdoor/right/directional/east,
/obj/item/circuitboard/computer/borgupload/no_lock,
/turf/open/floor/iron/dark,
/area/ruin/space/ancientstation/delta/ai)
"cA" = (
@@ -6797,6 +6798,15 @@
/obj/machinery/light/small/directional/east,
/turf/open/floor/iron/white/textured,
/area/ruin/space/ancientstation/delta/proto)
"MC" = (
/obj/structure/window/reinforced/spawner/directional/west,
/obj/structure/window/reinforced/spawner/directional/north,
/obj/structure/window/reinforced/spawner/directional/south,
/obj/structure/table,
/obj/machinery/door/window/brigdoor/right/directional/east,
/obj/item/circuitboard/computer/aiupload/no_lock,
/turf/open/floor/iron/dark,
/area/ruin/space/ancientstation/delta/ai)
"MH" = (
/obj/structure/girder/displaced,
/turf/open/floor/plating/airless,
@@ -14366,7 +14376,7 @@ Wb
NS
dT
nG
cz
MC
cz
ad
ad
@@ -5594,6 +5594,8 @@
pixel_y = 6
},
/obj/item/circuitboard/machine/protolathe/offstation,
/obj/item/circuitboard/computer/borgupload/no_lock,
/obj/item/circuitboard/computer/aiupload/no_lock,
/turf/open/floor/circuit/red/off,
/area/ruin/space/ks13/ai/corridor)
"LM" = (
+73 -3
View File
@@ -4,18 +4,79 @@
var/mob/living/silicon/current = null //The target of future law uploads
icon_screen = "command"
time_to_unscrew = 6 SECONDS
var/locked = FALSE
var/lock_timer
/obj/machinery/computer/upload/Initialize(mapload)
. = ..()
if(!mapload)
log_silicon("\A [name] was created at [loc_name(src)].")
message_admins("\A [name] was created at [ADMIN_VERBOSEJMP(src)].")
if(isnull(circuit) || circuit.obj_flags & EMAGGED)
return
set_locked(TRUE)
/obj/machinery/computer/upload/emag_act(mob/user, obj/item/card/emag/emag_card)
if(circuit.obj_flags & EMAGGED)
return FALSE
circuit.obj_flags |= EMAGGED
set_locked(FALSE, user)
circuit.req_access = null
circuit.req_one_access = null
if(user)
balloon_alert(user, "access restrictions removed!")
return TRUE
/obj/machinery/computer/upload/proc/should_have_lock()
if(isnull(circuit))
return FALSE
return length(circuit.req_access) || length(circuit.req_one_access)
/obj/machinery/computer/upload/proc/set_locked(locked_state = TRUE, mob/user)
if(locked == locked_state)
return
if(!should_have_lock())
return
locked = !!locked_state
icon_screen = locked ? "command_locked" : "command"
update_appearance(UPDATE_OVERLAYS)
if(user)
balloon_alert(user, locked ? "console locked!" : "console unlocked!")
/obj/machinery/computer/upload/attackby(obj/item/O, mob/user, list/modifiers, list/attack_modifiers)
if(istype(O, /obj/item/ai_module))
var/obj/item/ai_module/M = O
if(istype(O, /obj/item/card/id) && should_have_lock())
if(machine_stat & (NOPOWER|BROKEN|MAINT))
return
if(circuit.obj_flags & EMAGGED)
balloon_alert(user, "access locks fried!")
return
if(!circuit.check_access(O))
balloon_alert(user, "access denied!")
return
set_locked(!locked, user)
if(lock_timer)
deltimer(lock_timer)
lock_timer = null
if(!locked)
lock_timer = addtimer(CALLBACK(src, PROC_REF(set_locked), TRUE), 5 MINUTES, TIMER_UNIQUE | TIMER_STOPPABLE)
update_appearance(UPDATE_OVERLAYS)
return TRUE
if(istype(O, /obj/item/ai_module))
var/obj/item/ai_module/module = O
if(machine_stat & (NOPOWER|BROKEN|MAINT))
return
if(locked && !module.bypass_access_check)
to_chat(user, span_alert("Console is locked! Swipe an ID card with proper access on the console to unlock it!"))
balloon_alert(user, "console locked!")
return
if(!current)
to_chat(user, span_alert("You haven't selected anything to transmit laws to!"))
return
@@ -27,7 +88,7 @@
to_chat(user, span_alert("Upload failed! Unable to establish a connection to [current.name]. You're too far away!"))
current = null
return
M.install(current.laws, user)
module.install(current.laws, user)
imprint_gps("Weak Upload Signal")
else
return ..()
@@ -47,6 +108,8 @@
if(mapload && HAS_TRAIT(SSstation, STATION_TRAIT_HUMAN_AI))
return INITIALIZE_HINT_QDEL
return .
/obj/machinery/computer/upload/ai/interact(mob/user)
current = select_active_ai(user, z, TRUE)
@@ -82,3 +145,10 @@
if(B.scrambledcodes || B.emagged)
return FALSE
return ..()
/obj/machinery/computer/upload/ai/no_lock
circuit = /obj/item/circuitboard/computer/aiupload/no_lock
/obj/machinery/computer/upload/borg/no_lock
circuit = /obj/item/circuitboard/computer/borgupload/no_lock
@@ -20,6 +20,8 @@
var/list/laws = list()
/// Used to skip laws being checked (for reset & remove boards that have no laws)
var/bypass_law_amt_check = FALSE
/// Used for the Traitor Hacked Upload board to ignore access restrictions on the upload console.
var/bypass_access_check = FALSE
/obj/item/ai_module/Initialize(mapload)
. = ..()
+2 -1
View File
@@ -1,7 +1,8 @@
/obj/item/ai_module/syndicate // This one doesn't inherit from ion boards because it doesn't call ..() in transmitInstructions. ~Miauw
name = "Hacked AI Module"
desc = "An AI Module for hacking additional laws to an AI."
desc = "An AI Module for hacking additional laws to an AI. This board bypasses all access restrictions on the upload console."
laws = list("")
bypass_access_check = TRUE
/obj/item/ai_module/syndicate/attack_self(mob/user)
var/targName = tgui_input_text(user, "Enter a new law for the AI", "Freeform Law Entry", laws[1], max_length = CONFIG_GET(number/max_law_len), multiline = TRUE)
@@ -1,4 +1,4 @@
/obj/item/circuitboard/computer
/obj/item/circuitboard/computer/obj/machinery/computer/upload/ai/no_lock
name = "Generic"
abstract_type = /obj/item/circuitboard/computer
name_extension = "(Computer Board)"
@@ -14,12 +14,22 @@
name = "AI Upload"
greyscale_colors = CIRCUIT_COLOR_COMMAND
build_path = /obj/machinery/computer/upload/ai
req_one_access = list(ACCESS_AI_UPLOAD)
/obj/item/circuitboard/computer/aiupload/no_lock
build_path = /obj/machinery/computer/upload/ai/no_lock
req_one_access = null
/obj/item/circuitboard/computer/borgupload
name = "Cyborg Upload"
greyscale_colors = CIRCUIT_COLOR_COMMAND
req_one_access = list(ACCESS_AI_UPLOAD)
build_path = /obj/machinery/computer/upload/borg
/obj/item/circuitboard/computer/borgupload/no_lock
req_one_access = null
build_path = /obj/machinery/computer/upload/borg/no_lock
/obj/item/circuitboard/computer/bsa_control
name = "Bluespace Artillery Controls"
build_path = /obj/machinery/computer/bsa_control
@@ -237,8 +237,8 @@
/datum/uplink_item/device_tools/hacked_module
name = "Hacked AI Law Upload Module"
desc = "When used with an upload console, this module allows you to upload priority laws to an artificial intelligence. \
This board bypasses all access restrictions on the console. \
Be careful with wording, as artificial intelligences may look for loopholes to exploit."
progression_minimum = 30 MINUTES
item = /obj/item/ai_module/syndicate
cost = 4
Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 132 KiB