[MDB IGNORE] Reformats Access IDs for accessibility and futureproofing (#67002)

* [DRAFT] Reformats Access IDs for accessibility and futureproofing

* replaced all the old defines and IDs everywhere

* replaced ID integers with strings, cleaned up a couple tram helpers

* replaces req_access_txt with req_access and fixes a few of my mistakes

Co-authored-by: san7890 <the@san7890.com>
This commit is contained in:
Son-of-Space
2022-05-20 02:43:02 -04:00
committed by GitHub
co-authored by san7890
parent 04641bee83
commit 8440d20981
109 changed files with 19642 additions and 19769 deletions
@@ -7,7 +7,7 @@
size = 12
requires_ntnet = FALSE
usage_flags = PROGRAM_CONSOLE | PROGRAM_LAPTOP
transfer_access = list(ACCESS_HEADS)
transfer_access = list(ACCESS_COMMAND)
available_on_ntnet = TRUE
tgui_id = "NtosAiRestorer"
program_icon = "laptop-code"
@@ -73,14 +73,14 @@
var/obj/item/computer_hardware/card_slot/card_slot = computer.all_components[MC_CARD]
var/obj/item/card/id/id_card = card_slot?.GetID()
if(id_card?.registered_account)
if((ACCESS_HEADS in id_card.access) || (ACCESS_QM in id_card.access))
if((ACCESS_COMMAND in id_card.access) || (ACCESS_QM in id_card.access))
requestonly = FALSE
buyer = SSeconomy.get_dep_account(id_card.registered_account.account_job.paycheck_department)
can_approve_requests = TRUE
else
requestonly = TRUE
can_approve_requests = FALSE
if(ACCESS_HEADS in id_card.access)
if(ACCESS_COMMAND in id_card.access)
// If buyer is a departmental budget, replaces "Cargo" with that budget - we're not using the cargo budget here
data["department"] = addtext(buyer.account_holder, " Requisitions")
else
@@ -4,7 +4,7 @@
category = PROGRAM_CATEGORY_CREW
program_icon_state = "id"
extended_desc = "Program for programming employee ID cards to access parts of the station."
transfer_access = list(ACCESS_HEADS)
transfer_access = list(ACCESS_COMMAND)
requires_ntnet = 0
size = 8
tgui_id = "NtosCard"
@@ -59,7 +59,7 @@
var/list/managers = SSid_access.sub_department_managers_tgui
for(var/access_as_text in managers)
var/list/info = managers[access_as_text]
var/access = text2num(access_as_text)
var/access = access_as_text
if((access in id_card.access) && ((target_dept in info["regions"]) || !target_dept))
region_access |= info["regions"]
job_templates |= info["templates"]
@@ -4,7 +4,7 @@
category = PROGRAM_CATEGORY_CREW
program_icon_state = "id"
extended_desc = "Program for viewing and printing the current crew manifest"
transfer_access = list(ACCESS_HEADS)
transfer_access = list(ACCESS_COMMAND)
requires_ntnet = TRUE
size = 4
tgui_id = "NtosCrewManifest"
@@ -7,7 +7,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
category = PROGRAM_CATEGORY_CREW
program_icon_state = "id"
extended_desc = "Program for viewing and changing job slot availability."
transfer_access = list(ACCESS_HEADS)
transfer_access = list(ACCESS_COMMAND)
requires_ntnet = TRUE
size = 4
tgui_id = "NtosJobManager"
@@ -7,7 +7,7 @@
program_icon_state = "power_monitor"
extended_desc = "This program connects to sensors around the station to provide information about electrical systems"
ui_header = "power_norm.gif"
transfer_access = list(ACCESS_ENGINE)
transfer_access = list(ACCESS_ENGINEERING)
usage_flags = PROGRAM_CONSOLE
requires_ntnet = 0
size = 8
@@ -8,12 +8,12 @@
size = 10
tgui_id = "NtosTechweb"
program_icon = "atom"
required_access = list(ACCESS_HEADS, ACCESS_RND)
required_access = list(ACCESS_COMMAND, ACCESS_SCIENCE)
transfer_access = list(ACCESS_RESEARCH)
/// Reference to global science techweb
var/datum/techweb/stored_research
/// Access needed to lock/unlock the console
var/lock_access = ACCESS_RND
var/lock_access = ACCESS_SCIENCE
/// Determines if the console is locked, and consequently if actions can be performed with it
var/locked = FALSE
/// Used for compressing data sent to the UI via static_data as payload size is of concern