pAI Access Lock Program Fix (#9138)

The modular computer pAI access lock program should properly only show when you have a pAI in your computer.
This commit is contained in:
Geeves
2020-06-29 09:18:17 +02:00
committed by GitHub
parent 780b009d39
commit e4c5d7ff77
12 changed files with 267 additions and 244 deletions
@@ -52,7 +52,7 @@
/obj/item/modular_computer/proc/get_preset_programs(preset_type)
for(var/datum/modular_computer_app_presets/prs in ntnet_global.available_software_presets)
if(prs.type == preset_type)
return prs.return_install_programs()
return prs.return_install_programs(src)
// Used to perform preset-specific hardware changes.
/obj/item/modular_computer/proc/install_default_hardware()
@@ -64,6 +64,7 @@
var/programs = get_preset_programs(_app_preset_type)
for(var/datum/computer_file/program/prog in programs)
if(!prog.is_supported_by_hardware(hardware_flag, FALSE))
qdel(prog)
continue
hard_drive.store_file(prog)
@@ -13,6 +13,8 @@
return
found = TRUE
hard_drive = H
hard_drive.parent_computer = src
hard_drive.install_default_programs()
else if(istype(H, /obj/item/computer_hardware/network_card))
if(network_card)
to_chat(user, SPAN_WARNING("\The [src]'s network card slot is already occupied by \the [network_card]."))