[MIRROR] Enforce preserving parent proc return values across ui_act call stacks (#999)

* 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.

* Enforce preserving parent proc return values across ui_act call stacks

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
This commit is contained in:
SkyratBot
2020-09-26 17:17:59 +02:00
committed by GitHub
parent 2158237170
commit 98568e191a
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)