mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
[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:
@@ -31,7 +31,8 @@
|
||||
return
|
||||
|
||||
/datum/computer_file/program/aidiag/ui_act(action, params)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
var/mob/living/silicon/ai/A = get_ai()
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
. = ..(user)
|
||||
|
||||
/datum/computer_file/program/contract_uplink/ui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
var/mob/living/user = usr
|
||||
var/obj/item/computer_hardware/hard_drive/small/syndicate/hard_drive = computer.all_components[MC_HDD]
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
..()
|
||||
|
||||
/datum/computer_file/program/ntnet_dos/ui_act(action, params)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("PRG_target_relay")
|
||||
|
||||
@@ -45,7 +45,8 @@
|
||||
|
||||
|
||||
/datum/computer_file/program/revelation/ui_act(action, params)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("PRG_arm")
|
||||
|
||||
@@ -91,8 +91,10 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/arcade/ui_act(action, list/params)
|
||||
if(..())
|
||||
return TRUE
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
var/obj/item/computer_hardware/printer/printer
|
||||
if(computer)
|
||||
printer = computer.all_components[MC_PRINT]
|
||||
|
||||
@@ -39,5 +39,6 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/atmosscan/ui_act(action, list/params)
|
||||
if(..())
|
||||
return TRUE
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/borg_monitor/ui_act(action, params)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
switch(action)
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/bounty_board/ui_act(action, list/params)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
var/current_ref_num = params["request"]
|
||||
var/current_app_num = params["applicant"]
|
||||
|
||||
@@ -94,8 +94,9 @@
|
||||
return FALSE
|
||||
|
||||
/datum/computer_file/program/card_mod/ui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
var/obj/item/computer_hardware/card_slot/card_slot
|
||||
var/obj/item/computer_hardware/card_slot/card_slot2
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/bounty/ui_act(action,params) //When a button is clicked (claim or Print bounties)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("ClaimBounty")
|
||||
|
||||
@@ -25,8 +25,9 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/shipping/ui_act(action, list/params)
|
||||
if(..())
|
||||
return TRUE
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!computer)
|
||||
return
|
||||
|
||||
|
||||
@@ -57,7 +57,8 @@
|
||||
|
||||
|
||||
/datum/computer_file/program/computerconfig/ui_act(action,params)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("PC_toggle_component")
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/crew_manifest/ui_act(action, params, datum/tgui/ui)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
var/obj/item/computer_hardware/printer/printer
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
var/error
|
||||
|
||||
/datum/computer_file/program/filemanager/ui_act(action, params)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
var/obj/item/computer_hardware/hard_drive/HDD = computer.all_components[MC_HDD]
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
return FALSE
|
||||
|
||||
/datum/computer_file/program/job_management/ui_act(action, params, datum/tgui/ui)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
var/obj/item/computer_hardware/card_slot/card_slot = computer.all_components[MC_CARD]
|
||||
|
||||
@@ -104,8 +104,9 @@
|
||||
download_completion += download_netspeed
|
||||
|
||||
/datum/computer_file/program/ntnetdownload/ui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("PRG_downloadfile")
|
||||
if(!downloaded_file)
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
tgui_id = "NtosNetMonitor"
|
||||
|
||||
/datum/computer_file/program/ntnetmonitor/ui_act(action, params)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("resetIDS")
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
username = "DefaultUser[rand(100, 999)]"
|
||||
|
||||
/datum/computer_file/program/chatclient/ui_act(action, params)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
var/datum/ntnet_conversation/channel = SSnetworks.station_network.get_chat_channel_by_id(active_channel)
|
||||
|
||||
@@ -63,7 +63,8 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/radar/ui_act(action, params)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
switch(action)
|
||||
|
||||
@@ -53,8 +53,9 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/robocontrol/ui_act(action, list/params)
|
||||
if(..())
|
||||
return TRUE
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
var/obj/item/computer_hardware/card_slot/card_slot
|
||||
var/obj/item/card/id/id_card
|
||||
if(computer)
|
||||
|
||||
@@ -105,8 +105,9 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/supermatter_monitor/ui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("PRG_clear")
|
||||
|
||||
Reference in New Issue
Block a user