mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-12 07:35:31 +01:00
Fix laptop card slot not being checked for software access (#19300)
can_run() only checked the user's worn/held ID via GetIdCard(), ignoring any card inserted into the computer's RFID card slot. This caused access-locked software to always show an RFID error for users relying on a slotted card. Three fixes: - can_run(): add explicit_card param; resolution order is explicit_card, then user.GetIdCard(), then computer.card_slot.stored_card - run_program(): set TM.using_access from the slotted card when present, falling back to user.GetAccess() - ntdownloader.dm: pass my_computer.card_slot.stored_card to can_run() so the software download list respects the slotted card
This commit is contained in:
@@ -155,8 +155,9 @@
|
||||
data["disk_used"] = my_computer.hard_drive.used_capacity
|
||||
var/list/all_entries[0]
|
||||
for(var/datum/computer_file/program/P in GLOB.ntnet_global.available_station_software)
|
||||
// Only those programs our user can run will show in the list
|
||||
if(!P.can_run(user) && P.requires_access_to_download || my_computer.hard_drive.find_file_by_name(P.filename))
|
||||
// Only those programs our user can run will show in the list.
|
||||
// Pass the card inserted in the laptop's slot so slotted IDs are respected.
|
||||
if(!P.can_run(user, 0, null, my_computer.card_slot?.stored_card) && P.requires_access_to_download || my_computer.hard_drive.find_file_by_name(P.filename))
|
||||
continue
|
||||
all_entries.Add(list(list(
|
||||
"filename" = P.filename,
|
||||
|
||||
Reference in New Issue
Block a user