Makes some more lists lazy (#94388)

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
Bloop
2025-12-28 13:57:42 -05:00
committed by GitHub
parent b88e1a1328
commit 53ed83bb9d
58 changed files with 268 additions and 253 deletions
@@ -14,9 +14,9 @@
var/power_cell_use = PROGRAM_BASIC_CELL_USE
///List of required accesses to *run* the program. Any match will do.
///This also acts as download_access if that is not set, making this more draconic and restrictive.
var/list/run_access = list()
var/list/run_access
///List of required access to download or file host the program. Any match will do.
var/list/download_access = list()
var/list/download_access
/// User-friendly name of this program.
var/filedesc = "Unknown Program"
/// Short description of this program's function.
@@ -51,6 +51,10 @@
/datum/computer_file/program/New()
..()
if(LAZYLEN(run_access))
run_access = string_list(run_access)
if(LAZYLEN(download_access))
download_access = string_list(download_access)
///We need to ensure that different programs (subtypes mostly) won't try to load in the same circuit comps into the shell or usb port of the modpc.
if(circuit_comp_type && initial(circuit_comp_type.associated_program) != type)
stack_trace("circuit comp type mismatch: [type] has circuit comp type \[[circuit_comp_type]\], while \[[circuit_comp_type]\] has associated program \[[initial(circuit_comp_type.associated_program)]\].")