subsystem access (#19337)

* init

* access to controller

* .
This commit is contained in:
Kashargul
2026-03-26 18:04:19 -04:00
committed by GitHub
parent f9aa2121a9
commit 2388aaba11
23 changed files with 190 additions and 205 deletions
+5 -5
View File
@@ -113,7 +113,7 @@
.["id_icon"] = icon2html(target.idcard, user, sourceonly=TRUE)
var/list/active_access = list()
for(var/access in target.idcard?.GetAccess())
active_access += list(list("id" = access, "name" = get_access_desc(access)))
active_access += list(list("id" = access, "name" = SSaccess.get_access_desc(access)))
.["target"]["active_access"] = active_access
var/list/access_options = list()
for(var/datum/access/acc)
@@ -485,17 +485,17 @@
target.idcard.access -= text2num(params["access"])
return TRUE
if("add_centcom")
target.idcard.access |= get_all_centcom_access()
target.idcard.access |= SSaccess.get_all_centcom_access()
return TRUE
if("rem_centcom")
target.idcard.access -= get_all_centcom_access()
target.idcard.access -= SSaccess.get_all_centcom_access()
return TRUE
if("add_station")
target.idcard.access |= get_all_station_access()
target.idcard.access |= SSaccess.get_all_station_access()
target.idcard.access |= ACCESS_SYNTH
return TRUE
if("rem_station")
target.idcard.access -= get_all_station_access()
target.idcard.access -= SSaccess.get_all_station_access()
target.idcard.access -= ACCESS_SYNTH
return TRUE
if("law_channel")
+2 -2
View File
@@ -227,11 +227,11 @@ ADMIN_VERB(cmd_admin_grantfullaccess, (R_ADMIN|R_EVENT), "Grant Full Access", "G
var/obj/item/pda/pda = H.wear_id
id = pda.id
id.icon_state = "gold"
id.access = get_all_accesses().Copy()
id.access = SSaccess.get_all_accesses().Copy()
else
var/obj/item/card/id/id = new/obj/item/card/id(H);
id.icon_state = "gold"
id.access = get_all_accesses().Copy()
id.access = SSaccess.get_all_accesses().Copy()
id.registered_name = H.real_name
id.assignment = JOB_SITE_MANAGER
id.name = "[id.registered_name]'s ID Card ([id.assignment])"
@@ -791,7 +791,7 @@
. = ..()
mob_radio = new /obj/item/radio/headset/mob_headset(src)
mob_radio.frequency = DTH_FREQ //Can't tell if bugged, deathsquad freq in general seems broken
myid.access |= get_all_station_access()
myid.access |= SSaccess.get_all_station_access()
//Syndicate catslug
/mob/living/simple_mob/vore/alienanimals/catslug/custom/spaceslug/syndislug
@@ -836,7 +836,7 @@
mob_radio.ks2type = /obj/item/encryptionkey/syndicate
mob_radio.keyslot2 = new /obj/item/encryptionkey/syndicate(mob_radio)
mob_radio.recalculateChannels(TRUE)
myid.access |= get_all_station_access()
myid.access |= SSaccess.get_all_station_access()
//ERT catslug
/mob/living/simple_mob/vore/alienanimals/catslug/custom/spaceslug/responseslug
@@ -880,7 +880,7 @@
mob_radio.ks2type = /obj/item/encryptionkey/ert
mob_radio.keyslot2 = new /obj/item/encryptionkey/ert(mob_radio)
mob_radio.recalculateChannels(TRUE)
myid.access |= get_all_station_access()
myid.access |= SSaccess.get_all_station_access()
//Pilot Catslug
@@ -71,7 +71,7 @@
message = "RFID card is not present in the device. Operation aborted."
return
running = TRUE
target_access = get_access_by_id("[params["access_target"]]")
target_access = SSaccess.get_access_by_id("[params["access_target"]]")
if(GLOB.ntnet_global.intrusion_detection_enabled)
GLOB.ntnet_global.add_log("IDS WARNING - Unauthorised access attempt to primary keycode database from device: [computer.network_card.get_network_tag()]")
GLOB.ntnet_global.intrusion_detection_alarm = TRUE
@@ -95,16 +95,16 @@
var/obj/item/card/id/id_card = computer.card_slot.stored_card
for(var/i = 1; i <= 7; i++)
var/list/accesses = list()
for(var/access in get_region_accesses(i))
if(get_access_desc(access) && !(access in restricted_access_codes))
for(var/access in SSaccess.get_region_accesses(i))
if(SSaccess.get_access_desc(access) && !(access in restricted_access_codes))
accesses.Add(list(list(
"desc" = replacetext(get_access_desc(access), " ", "&nbsp;"),
"desc" = replacetext(SSaccess.get_access_desc(access), " ", "&nbsp;"),
"ref" = access,
"allowed" = (access in id_card.GetAccess()) ? 1 : 0
)))
regions.Add(list(list(
"name" = get_region_accesses_name(i),
"name" = SSaccess.get_region_accesses_name(i),
"accesses" = accesses
)))
data["regions"] = regions
+10 -10
View File
@@ -66,24 +66,24 @@
if(program.computer.card_slot && program.computer.card_slot.stored_card)
var/obj/item/card/id/id_card = program.computer.card_slot.stored_card
if(is_centcom)
for(var/access in get_all_centcom_access())
for(var/access in SSaccess.get_all_centcom_access())
all_centcom_access.Add(list(list(
"desc" = replacetext(get_centcom_access_desc(access), " ", "&nbsp;"),
"desc" = replacetext(SSaccess.get_centcom_access_desc(access), " ", "&nbsp;"),
"ref" = access,
"allowed" = (access in id_card.GetAccess()) ? 1 : 0)))
data["all_centcom_access"] = all_centcom_access
else
for(var/i in ACCESS_REGION_SECURITY to ACCESS_REGION_SUPPLY)
var/list/accesses = list()
for(var/access in get_region_accesses(i))
if(get_access_desc(access))
for(var/access in SSaccess.get_region_accesses(i))
if(SSaccess.get_access_desc(access))
accesses.Add(list(list(
"desc" = replacetext(get_access_desc(access), " ", "&nbsp;"),
"desc" = replacetext(SSaccess.get_access_desc(access), " ", "&nbsp;"),
"ref" = access,
"allowed" = (access in id_card.GetAccess()) ? 1 : 0)))
regions.Add(list(list(
"name" = get_region_accesses_name(i),
"name" = SSaccess.get_region_accesses_name(i),
"accesses" = accesses)))
data["regions"] = regions
@@ -142,10 +142,10 @@
<u>Access:</u><br>
"}
var/known_access_rights = get_access_ids(ACCESS_TYPE_STATION|ACCESS_TYPE_CENTCOM)
var/known_access_rights = SSaccess.get_access_ids(ACCESS_TYPE_STATION|ACCESS_TYPE_CENTCOM)
for(var/A in id_card.GetAccess())
if(A in known_access_rights)
contents += " [get_access_desc(A)]"
contents += " [SSaccess.get_access_desc(A)]"
if(!computer.nano_printer.print_text(contents,"access report"))
to_chat(ui.user, span_notice("Hardware error: Printer was unable to print the file. It may be out of paper."))
@@ -199,7 +199,7 @@
else
var/list/access = list()
if(is_centcom)
access = get_centcom_access(t1)
access = SSaccess.get_centcom_access(t1)
else
var/datum/job/jobdatum
for(var/jobtype in typesof(/datum/job))
@@ -223,7 +223,7 @@
if(computer && program.can_run(ui.user, 1))
var/access_type = text2num(params["access_target"])
var/access_allowed = text2num(params["allowed"])
if(access_type in get_access_ids(ACCESS_TYPE_STATION|ACCESS_TYPE_CENTCOM))
if(access_type in SSaccess.get_access_ids(ACCESS_TYPE_STATION|ACCESS_TYPE_CENTCOM))
id_card.access -= access_type
if(!access_allowed)
id_card.access += access_type