Fixes TGUI internal actions on modular computers (#80325)

Fixes where internal action buttons don't work on modular computers such as HoP and robotics.
This commit is contained in:
lessthanthree
2023-12-15 12:25:27 +00:00
committed by GitHub
parent 599f4271bc
commit f5cd0c9b0e
@@ -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