[MIRROR] NT Software Hub shows programs you do not have permissions to download (#1115)

* 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

* NT Software Hub shows programs you do not have permissions to download

Co-authored-by: NightRed <nightred@gmail.com>
This commit is contained in:
SkyratBot
2020-10-02 14:58:52 +02:00
committed by GitHub
parent 595fad67ca
commit 415bc0f736
3 changed files with 28 additions and 8 deletions

View File

@@ -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