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

View File

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

View File

@@ -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]."))

View File

@@ -55,6 +55,6 @@
network_card = new /obj/item/computer_hardware/network_card/advanced(src)
/obj/item/modular_computer/silicon/install_default_programs()
hard_drive.store_file(new /datum/computer_file/program/filemanager())
hard_drive.store_file(new /datum/computer_file/program/ntnetdownload())
hard_drive.store_file(new /datum/computer_file/program/filemanager(src))
hard_drive.store_file(new /datum/computer_file/program/ntnetdownload(src))
hard_drive.remove_file(hard_drive.find_file_by_name("clientmanager"))

View File

@@ -7,10 +7,10 @@
/obj/item/modular_computer/silicon/ai/install_default_programs()
. = ..()
hard_drive.store_file(new /datum/computer_file/program/records())
hard_drive.store_file(new /datum/computer_file/program/rcon_console())
hard_drive.store_file(new /datum/computer_file/program/suit_sensors())
hard_drive.store_file(new /datum/computer_file/program/power_monitor())
hard_drive.store_file(new /datum/computer_file/program/records(src))
hard_drive.store_file(new /datum/computer_file/program/rcon_console(src))
hard_drive.store_file(new /datum/computer_file/program/suit_sensors(src))
hard_drive.store_file(new /datum/computer_file/program/power_monitor(src))
/obj/item/modular_computer/silicon/robot
hardware_flag = PROGRAM_SILICON_ROBOT
@@ -24,6 +24,6 @@
/obj/item/modular_computer/silicon/pai/install_default_programs()
. = ..()
hard_drive.store_file(new /datum/computer_file/program/pai_directives())
hard_drive.store_file(new /datum/computer_file/program/pai_radio())
hard_drive.store_file(new /datum/computer_file/program/pai_flashlight())
hard_drive.store_file(new /datum/computer_file/program/pai_directives(src))
hard_drive.store_file(new /datum/computer_file/program/pai_radio(src))
hard_drive.store_file(new /datum/computer_file/program/pai_flashlight(src))