Enforce preserving parent proc return values across ui_act call stacks (#53964)

All ui_act procs should call parent by default. All procs should preserve the value of the parent proc when it's TRUTHY and pass it down the call stack. No UI should be interactible when its flags or state indicate it should not be, except when explicity overriden by child procs intentionally disregarding parent return values to achieve a specific goal.
This commit is contained in:
Timberpoes
2020-09-26 11:52:39 -03:00
committed by GitHub
parent d443df3a5f
commit 1f23cc281d
158 changed files with 386 additions and 180 deletions
@@ -90,8 +90,10 @@
// Handles user's GUI input
/obj/item/modular_computer/ui_act(action, params)
if(..())
. = ..()
if(.)
return
var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD]
switch(action)
if("PC_exit")
@@ -116,6 +116,10 @@
//Overrides the ui_act to make the flashlight controls link to the borg instead
/obj/item/modular_computer/tablet/integrated/ui_act(action, params)
. = ..()
if(.)
return
switch(action)
if("PC_toggle_light")
if(!borgo)