[MIRROR] Fixes TGUI internal actions on modular computers [MDB IGNORE] (#25633)

* Fixes TGUI internal actions on modular computers

* Update computer_ui.dm

---------

Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-12-15 16:48:20 +00:00
committed by GitHub
co-authored by lessthanthree Bloop
parent be1c790e4f
commit 8bc9c802a8
@@ -135,13 +135,15 @@
switch(action)
if("PC_exit")
active_program.kill_program(usr)
//you can't close apps in emergency mode.
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)
if(!active_program || (!isnull(internal_cell) && !internal_cell.charge))
return
active_program.background_program()
return TRUE