NT Software Hub shows programs you do not have permissions to download (#54075)

* Show disabled downloads so you know what exists

* sorted list of apps
This commit is contained in:
NightRed
2020-10-02 04:36:12 -05:00
committed by GitHub
parent b8049bb11f
commit 400890a5ec
3 changed files with 28 additions and 8 deletions
@@ -149,7 +149,7 @@
for(var/A in main_repo)
var/datum/computer_file/program/P = A
// Only those programs our user can run will show in the list
if(!P.can_run(user,transfer = 1, access = access) || hard_drive.find_file_by_name(P.filename))
if(hard_drive.find_file_by_name(P.filename))
continue
all_entries.Add(list(list(
"filename" = P.filename,
@@ -157,6 +157,7 @@
"fileinfo" = P.extended_desc,
"compatibility" = check_compatibility(P),
"size" = P.size,
"access" = P.can_run(user,transfer = 1, access = access)
)))
data["hackedavailable"] = FALSE
if(emagged) // If we are running on emagged computer we have access to some "bonus" software
@@ -170,7 +171,9 @@
"filename" = P.filename,
"filedesc" = P.filedesc,
"fileinfo" = P.extended_desc,
"compatibility" = check_compatibility(P),
"size" = P.size,
"access" = TRUE,
)))
data["hacked_programs"] = hacked_programs