From f5cd0c9b0eb501d0c8873c36a1903801afc656df Mon Sep 17 00:00:00 2001 From: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Date: Fri, 15 Dec 2023 12:25:27 +0000 Subject: [PATCH] Fixes TGUI internal actions on modular computers (#80325) Fixes where internal action buttons don't work on modular computers such as HoP and robotics. --- code/modules/modular_computers/computers/item/computer_ui.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/modular_computers/computers/item/computer_ui.dm b/code/modules/modular_computers/computers/item/computer_ui.dm index 436b261aca3..f5ca1d74765 100644 --- a/code/modules/modular_computers/computers/item/computer_ui.dm +++ b/code/modules/modular_computers/computers/item/computer_ui.dm @@ -137,14 +137,14 @@ switch(action) if("PC_exit") //you can't close apps in emergency mode. - if(internal_cell.charge) + if(isnull(internal_cell) || internal_cell.charge) active_program.kill_program(usr) return TRUE if("PC_shutdown") shutdown_computer() return TRUE if("PC_minimize") - if(!active_program || !internal_cell.charge) + if(!active_program || (!isnull(internal_cell) && !internal_cell.charge)) return active_program.background_program() return TRUE