From 98568e191ad4d29184af9f180887ef8d57b7c76f Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 26 Sep 2020 17:17:59 +0200 Subject: [PATCH] [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 --- code/controllers/subsystem/air.dm | 3 ++- code/controllers/subsystem/shuttle.dm | 3 ++- code/datums/components/crafting/crafting.dm | 3 ++- code/datums/components/gps.dm | 4 +++- code/datums/components/uplink.dm | 3 +++ code/datums/spawners_menu.dm | 3 ++- code/datums/wires/_wires.dm | 3 ++- code/game/machinery/Sleeper.dm | 4 +++- code/game/machinery/bank_machine.dm | 3 ++- code/game/machinery/bounty_board.dm | 4 +++- code/game/machinery/civilian_bounties.dm | 3 ++- code/game/machinery/computer/Operating.dm | 3 ++- code/game/machinery/computer/aifixer.dm | 4 +++- code/game/machinery/computer/apc_control.dm | 4 +++- code/game/machinery/computer/atmos_alert.dm | 4 +++- code/game/machinery/computer/atmos_control.dm | 4 +++- code/game/machinery/computer/crew.dm | 3 +++ code/game/machinery/computer/dna_console.dm | 5 +++-- .../machinery/computer/launchpad_control.dm | 3 ++- code/game/machinery/computer/pod.dm | 3 ++- .../computer/prisoner/gulag_teleporter.dm | 5 +++-- code/game/machinery/computer/robot.dm | 3 ++- code/game/machinery/computer/teleporter.dm | 3 ++- code/game/machinery/doors/airlock.dm | 4 +++- .../machinery/doors/airlock_electronics.dm | 4 +++- code/game/machinery/doors/brigdoors.dm | 4 +++- code/game/machinery/doppler_array.dm | 3 ++- code/game/machinery/gulag_item_reclaimer.dm | 3 ++- code/game/machinery/hypnochair.dm | 4 +++- code/game/machinery/launch_pad.dm | 4 +++- code/game/machinery/medical_kiosk.dm | 4 +++- code/game/machinery/roulette_machine.dm | 4 +++- code/game/machinery/scan_gate.dm | 4 +++- code/game/machinery/spaceheater.dm | 4 +++- .../telecomms/machine_interactions.dm | 3 ++- code/game/objects/items/RPD.dm | 4 +++- code/game/objects/items/airlock_painter.dm | 4 +++- code/game/objects/items/crayons.dm | 4 +++- code/game/objects/items/devices/aicard.dm | 3 ++- .../items/devices/portable_chem_mixer.dm | 3 ++- .../items/devices/radio/electropack.dm | 3 ++- .../game/objects/items/devices/radio/radio.dm | 3 ++- .../objects/items/devices/traitordevices.dm | 3 ++- .../objects/items/devices/transfer_valve.dm | 3 ++- code/game/objects/items/eightball.dm | 4 +++- .../objects/items/implants/implantchair.dm | 3 ++- code/game/objects/items/tanks/tanks.dm | 3 ++- code/game/objects/items/teleportation.dm | 3 --- code/game/objects/structures.dm | 2 +- code/game/objects/structures/displaycase.dm | 3 ++- .../game/objects/structures/tank_dispenser.dm | 3 ++- code/modules/NTNet/relays.dm | 3 ++- code/modules/admin/verbs/borgpanel.dm | 3 ++- .../changeling/cellular_emporium.dm | 3 ++- .../nukeop/equipment/nuclearbomb.dm | 3 ++- .../traitor/equipment/module_picker.dm | 3 ++- code/modules/assembly/infrared.dm | 3 ++- code/modules/assembly/proximity.dm | 3 ++- code/modules/assembly/signaler.dm | 3 ++- code/modules/assembly/timer.dm | 3 ++- .../atmospherics/machinery/airalarm.dm | 4 +++- .../components/binary_devices/passive_gate.dm | 3 ++- .../binary_devices/pressure_valve.dm | 3 ++- .../components/binary_devices/pump.dm | 3 ++- .../binary_devices/temperature_gate.dm | 3 ++- .../binary_devices/temperature_pump.dm | 3 ++- .../components/binary_devices/volume_pump.dm | 3 ++- .../components/trinary_devices/filter.dm | 3 ++- .../components/trinary_devices/mixer.dm | 3 ++- .../components/unary_devices/cryo.dm | 3 ++- .../unary_devices/outlet_injector.dm | 3 ++- .../components/unary_devices/thermomachine.dm | 4 ++-- .../machinery/portable/canister.dm | 3 ++- .../atmospherics/machinery/portable/pump.dm | 3 ++- .../machinery/portable/scrubber.dm | 3 ++- .../cargo/blackmarket/blackmarket_uplink.dm | 3 ++- code/modules/cargo/bounty_console.dm | 3 ++- code/modules/cargo/centcom_podlauncher.dm | 5 +++-- code/modules/cargo/console.dm | 3 ++- code/modules/cargo/expressconsole.dm | 4 ++++ code/modules/events/pirates.dm | 3 ++- code/modules/holodeck/computer.dm | 3 ++- code/modules/hydroponics/biogenerator.dm | 3 ++- code/modules/hydroponics/seed_extractor.dm | 3 ++- code/modules/language/language_menu.dm | 3 ++- code/modules/library/soapstone.dm | 4 ++++ code/modules/mining/laborcamp/laborstacker.dm | 3 ++- code/modules/mining/machine_redemption.dm | 3 ++- code/modules/mining/machine_vending.dm | 3 ++- code/modules/mining/satchel_ore_boxdm.dm | 3 ++- .../mob/dead/observer/notificationprefs.dm | 3 ++- code/modules/mob/dead/observer/orbit.dm | 3 ++- .../carbon/human/species_types/jellypeople.dm | 3 ++- .../mob/living/silicon/ai/robot_control.dm | 3 ++- .../mob/living/simple_animal/bot/mulebot.dm | 5 ++++- .../computers/item/computer_ui.dm | 4 +++- .../computers/item/tablet.dm | 4 ++++ .../modular_computers/file_system/program.dm | 10 ++++++---- .../file_system/programs/airestorer.dm | 3 ++- .../programs/antagonist/contract_uplink.dm | 5 +++-- .../file_system/programs/antagonist/dos.dm | 3 ++- .../programs/antagonist/revelation.dm | 3 ++- .../file_system/programs/arcade.dm | 6 ++++-- .../file_system/programs/atmosscan.dm | 5 +++-- .../file_system/programs/borg_monitor.dm | 3 ++- .../file_system/programs/bounty_board.dm | 3 ++- .../file_system/programs/card.dm | 5 +++-- .../file_system/programs/cargobounty.dm | 3 ++- .../file_system/programs/cargoship.dm | 5 +++-- .../file_system/programs/configurator.dm | 3 ++- .../file_system/programs/crewmanifest.dm | 3 ++- .../file_system/programs/file_browser.dm | 3 ++- .../file_system/programs/jobmanagement.dm | 3 ++- .../file_system/programs/ntdownloader.dm | 5 +++-- .../file_system/programs/ntmonitor.dm | 3 ++- .../file_system/programs/ntnrc_client.dm | 3 ++- .../file_system/programs/radar.dm | 3 ++- .../file_system/programs/robocontrol.dm | 5 +++-- .../file_system/programs/sm_monitor.dm | 5 +++-- .../modular_computers/laptop_vendor.dm | 5 +++-- code/modules/paperwork/paper.dm | 3 ++- code/modules/paperwork/photocopier.dm | 3 ++- code/modules/plumbing/plumbers/acclimator.dm | 3 ++- code/modules/plumbing/plumbers/filter.dm | 3 ++- code/modules/plumbing/plumbers/pill_press.dm | 3 ++- .../plumbing/plumbers/reaction_chamber.dm | 3 ++- code/modules/plumbing/plumbers/splitters.dm | 3 ++- code/modules/plumbing/plumbers/synthesizer.dm | 3 ++- code/modules/power/apc.dm | 4 +++- code/modules/power/gravitygenerator.dm | 3 ++- code/modules/power/port_gen.dm | 3 ++- code/modules/power/smes.dm | 3 ++- code/modules/power/solar.dm | 3 ++- code/modules/power/turbine.dm | 6 ++++-- .../chemistry/machinery/chem_dispenser.dm | 3 ++- .../chemistry/machinery/chem_heater.dm | 3 ++- .../chemistry/machinery/chem_master.dm | 3 ++- .../chemistry/machinery/chem_synthesizer.dm | 3 ++- .../reagents/chemistry/machinery/pandemic.dm | 3 ++- .../chemistry/machinery/smoke_machine.dm | 4 +++- code/modules/recycling/disposal/bin.dm | 3 ++- code/modules/research/bepis.dm | 3 ++- .../nanites/nanite_chamber_computer.dm | 3 ++- .../nanites/nanite_cloud_controller.dm | 3 ++- .../research/nanites/nanite_program_hub.dm | 3 ++- .../research/nanites/nanite_programmer.dm | 3 ++- .../modules/research/nanites/nanite_remote.dm | 6 ++++-- .../ruins/spaceruin_code/TheDerelict.dm | 3 ++- .../security_levels/keycard_authentication.dm | 4 +++- code/modules/shuttle/emergency.dm | 3 ++- code/modules/station_goals/bsa.dm | 4 +++- code/modules/station_goals/dna_vault.dm | 4 +++- code/modules/station_goals/shield.dm | 4 +++- code/modules/tgui/external.dm | 5 +++-- code/modules/vehicles/mecha/mech_bay.dm | 3 ++- .../modules/vehicles/mecha/mech_fabricator.dm | 5 +++-- .../vehicles/mecha/mecha_control_console.dm | 3 ++- tgui/docs/tutorial-and-examples.md | 20 +++++++++++++------ 158 files changed, 386 insertions(+), 180 deletions(-) diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm index 61c9c3e953d..7224c4b5b03 100644 --- a/code/controllers/subsystem/air.dm +++ b/code/controllers/subsystem/air.dm @@ -543,7 +543,8 @@ GLOBAL_LIST_EMPTY(colored_images) return data /datum/controller/subsystem/air/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) - if(..() || !check_rights_for(usr.client, R_DEBUG)) + . = ..() + if(. || !check_rights_for(usr.client, R_DEBUG)) return switch(action) if("move-to-target") diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 87354c3bd11..def56818816 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -835,7 +835,8 @@ SUBSYSTEM_DEF(shuttle) return data /datum/controller/subsystem/shuttle/ui_act(action, params) - if(..()) + . = ..() + if(.) return var/mob/user = usr diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index b7ec72b4447..6155c81212b 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -387,7 +387,8 @@ return data /datum/component/personal_crafting/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("make") diff --git a/code/datums/components/gps.dm b/code/datums/components/gps.dm index 9c4cac44d5e..a325eb7ea81 100644 --- a/code/datums/components/gps.dm +++ b/code/datums/components/gps.dm @@ -132,8 +132,10 @@ GLOBAL_LIST_EMPTY(GPS_list) return data /datum/component/gps/item/ui_act(action, params) - if(..()) + . = ..() + if(.) return + switch(action) if("rename") var/atom/parentasatom = parent diff --git a/code/datums/components/uplink.dm b/code/datums/components/uplink.dm index 7777a47dbef..6c852382e19 100644 --- a/code/datums/components/uplink.dm +++ b/code/datums/components/uplink.dm @@ -183,6 +183,9 @@ return data /datum/component/uplink/ui_act(action, params) + . = ..() + if(.) + return if(!active) return switch(action) diff --git a/code/datums/spawners_menu.dm b/code/datums/spawners_menu.dm index 95a7d8e6339..9e7e4b334dd 100644 --- a/code/datums/spawners_menu.dm +++ b/code/datums/spawners_menu.dm @@ -42,7 +42,8 @@ return data /datum/spawners_menu/ui_act(action, params) - if(..()) + . = ..() + if(.) return var/group_name = params["name"] diff --git a/code/datums/wires/_wires.dm b/code/datums/wires/_wires.dm index d1e5c76aa5c..76b908d35cf 100644 --- a/code/datums/wires/_wires.dm +++ b/code/datums/wires/_wires.dm @@ -297,7 +297,8 @@ return data /datum/wires/ui_act(action, params) - if(..() || !interactable(usr)) + . = ..() + if(. || !interactable(usr)) return var/target_wire = params["wire"] var/mob/living/L = usr diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 89a2a27cb29..67d5bb67284 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -207,8 +207,10 @@ return data /obj/machinery/sleeper/ui_act(action, params) - if(..()) + . = ..() + if(.) return + var/mob/living/mob_occupant = occupant check_nap_violations() switch(action) diff --git a/code/game/machinery/bank_machine.dm b/code/game/machinery/bank_machine.dm index 38132e3d4f8..df380911a2e 100644 --- a/code/game/machinery/bank_machine.dm +++ b/code/game/machinery/bank_machine.dm @@ -81,7 +81,8 @@ return data /obj/machinery/computer/bank_machine/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/game/machinery/bounty_board.dm b/code/game/machinery/bounty_board.dm index 94dd602e90c..763bc5abaee 100644 --- a/code/game/machinery/bounty_board.dm +++ b/code/game/machinery/bounty_board.dm @@ -84,8 +84,10 @@ GLOBAL_LIST_EMPTY(request_list) return data /obj/machinery/bounty_board/ui_act(action, list/params) - if(..()) + . = ..() + if(.) return + var/current_ref_num = params["request"] var/current_app_num = params["applicant"] var/datum/bank_account/request_target diff --git a/code/game/machinery/civilian_bounties.dm b/code/game/machinery/civilian_bounties.dm index 6d0feac028e..ab69faab142 100644 --- a/code/game/machinery/civilian_bounties.dm +++ b/code/game/machinery/civilian_bounties.dm @@ -134,7 +134,8 @@ return data /obj/machinery/computer/piratepad_control/civilian/ui_act(action, params) - if(..()) + . = ..() + if(.) return if(!pad) return diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index 619360c8104..a32bad6006c 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -144,7 +144,8 @@ /obj/machinery/computer/operating/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("sync") diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index e3e8c548fe3..fecd6aa78c7 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -46,8 +46,10 @@ return data /obj/machinery/computer/aifixer/ui_act(action, params) - if(..()) + . = ..() + if(.) return + if(!occupier) restoring = FALSE diff --git a/code/game/machinery/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm index 4907c0b46f9..e4930eb78dc 100644 --- a/code/game/machinery/computer/apc_control.dm +++ b/code/game/machinery/computer/apc_control.dm @@ -80,8 +80,10 @@ return data /obj/machinery/computer/apc_control/ui_act(action, params) - if(..()) + . = ..() + if(.) return + switch(action) if("log-in") if(obj_flags & EMAGGED) diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index 8c241d7b8fe..4094bb029ad 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -38,8 +38,10 @@ return data /obj/machinery/computer/atmos_alert/ui_act(action, params) - if(..()) + . = ..() + if(.) return + switch(action) if("clear") var/zone = params["zone"] diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index 628c9b5afb5..c7f494a512f 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -277,7 +277,9 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers) return data /obj/machinery/computer/atmos_control/tank/ui_act(action, params) - if(..() || !radio_connection) + . = ..() + + if(. || !radio_connection) return var/datum/signal/signal = new(list("sigtype" = "command", "user" = usr)) switch(action) diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 4033e425163..85d53326194 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -225,6 +225,9 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) return a["ijob"] - b["ijob"] /datum/crewmonitor/ui_act(action,params) + . = ..() + if(.) + return var/mob/living/silicon/ai/AI = usr if(!istype(AI)) return diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index 0fd0efe14e4..dd49576769f 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -359,8 +359,9 @@ return data /obj/machinery/computer/scan_consolenew/ui_act(action, list/params) - if(..()) - return TRUE + . = ..() + if(.) + return . = TRUE diff --git a/code/game/machinery/computer/launchpad_control.dm b/code/game/machinery/computer/launchpad_control.dm index e7961c18ecd..458daf9882c 100644 --- a/code/game/machinery/computer/launchpad_control.dm +++ b/code/game/machinery/computer/launchpad_control.dm @@ -88,7 +88,8 @@ return data /obj/machinery/computer/launchpad/ui_act(action, params) - if(..()) + . = ..() + if(.) return var/obj/machinery/launchpad/current_pad = launchpads[selected_id] switch(action) diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 64214adc5f8..ff9fd3fd491 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -78,7 +78,8 @@ return data /obj/machinery/computer/pod/ui_act(action, list/params) - if(..()) + . = ..() + if(.) return if(!allowed(usr)) to_chat(usr, "Access denied.") diff --git a/code/game/machinery/computer/prisoner/gulag_teleporter.dm b/code/game/machinery/computer/prisoner/gulag_teleporter.dm index 47b3f36d651..eb39c5177b2 100644 --- a/code/game/machinery/computer/prisoner/gulag_teleporter.dm +++ b/code/game/machinery/computer/prisoner/gulag_teleporter.dm @@ -68,10 +68,11 @@ return data /obj/machinery/computer/prisoner/gulag_teleporter_computer/ui_act(action, list/params) + . = ..() + if(.) + return if(isliving(usr)) playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) - if(..()) - return if(!allowed(usr)) to_chat(usr, "Access denied.") return diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 009366b2f22..68cfefef599 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -72,7 +72,8 @@ return data /obj/machinery/computer/robotics/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/game/machinery/computer/teleporter.dm b/code/game/machinery/computer/teleporter.dm index 2fc68b8f542..299371a59c7 100644 --- a/code/game/machinery/computer/teleporter.dm +++ b/code/game/machinery/computer/teleporter.dm @@ -54,7 +54,8 @@ return data /obj/machinery/computer/teleporter/ui_act(action, params) - if(..()) + . = ..() + if(.) return if(!check_hub_connection()) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index d3d339cf546..23d6dfe9bb8 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1443,8 +1443,10 @@ return data /obj/machinery/door/airlock/ui_act(action, params) - if(..()) + . = ..() + if(.) return + if(!user_allowed(usr)) return switch(action) diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index c6e08b96c22..79260dc975b 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -53,8 +53,10 @@ return data /obj/item/electronics/airlock/ui_act(action, params) - if(..()) + . = ..() + if(.) return + switch(action) if("clear_all") accesses = list() diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 85d5f7803c8..7ef0ca856ec 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -204,8 +204,10 @@ /obj/machinery/door_timer/ui_act(action, params) - if(..()) + . = ..() + if(.) return + . = TRUE if(!allowed(usr)) diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index e499028666d..76fa1e5bdbd 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -62,7 +62,8 @@ return data /obj/machinery/doppler_array/ui_act(action, list/params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/game/machinery/gulag_item_reclaimer.dm b/code/game/machinery/gulag_item_reclaimer.dm index eae7115e340..8833a20d90c 100644 --- a/code/game/machinery/gulag_item_reclaimer.dm +++ b/code/game/machinery/gulag_item_reclaimer.dm @@ -63,7 +63,8 @@ return data /obj/machinery/gulag_item_reclaimer/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/game/machinery/hypnochair.dm b/code/game/machinery/hypnochair.dm index 9d856c5dc38..130f2408a83 100644 --- a/code/game/machinery/hypnochair.dm +++ b/code/game/machinery/hypnochair.dm @@ -55,8 +55,10 @@ return data /obj/machinery/hypnochair/ui_act(action, params) - if(..()) + . = ..() + if(.) return + switch(action) if("door") if(state_open) diff --git a/code/game/machinery/launch_pad.dm b/code/game/machinery/launch_pad.dm index 5e3fc20ebc6..ba1a8ee4555 100644 --- a/code/game/machinery/launch_pad.dm +++ b/code/game/machinery/launch_pad.dm @@ -356,8 +356,10 @@ pad.doteleport(user, sending) /obj/item/launchpad_remote/ui_act(action, params) - if(..()) + . = ..() + if(.) return + switch(action) if("set_pos") var/new_x = text2num(params["x"]) diff --git a/code/game/machinery/medical_kiosk.dm b/code/game/machinery/medical_kiosk.dm index dc2e1e4964d..013b031b68b 100644 --- a/code/game/machinery/medical_kiosk.dm +++ b/code/game/machinery/medical_kiosk.dm @@ -322,8 +322,10 @@ return data /obj/machinery/medical_kiosk/ui_act(action,active) - if(..()) + . = ..() + if(.) return + switch(action) if("beginScan_1") if(!scan_active_1) diff --git a/code/game/machinery/roulette_machine.dm b/code/game/machinery/roulette_machine.dm index 9a9da90bdf0..212a1b4e57c 100644 --- a/code/game/machinery/roulette_machine.dm +++ b/code/game/machinery/roulette_machine.dm @@ -86,8 +86,10 @@ return data /obj/machinery/roulette/ui_act(action, params) - if(..()) + . = ..() + if(.) return + switch(action) if("anchor") set_anchored(!anchored) diff --git a/code/game/machinery/scan_gate.dm b/code/game/machinery/scan_gate.dm index d590d2967c8..68043f40c6e 100644 --- a/code/game/machinery/scan_gate.dm +++ b/code/game/machinery/scan_gate.dm @@ -196,8 +196,10 @@ return data /obj/machinery/scanner_gate/ui_act(action, params) - if(..()) + . = ..() + if(.) return + switch(action) if("set_mode") var/new_mode = params["new_mode"] diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 3faf275254d..ead739c483d 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -201,8 +201,10 @@ return data /obj/machinery/space_heater/ui_act(action, params) - if(..()) + . = ..() + if(.) return + switch(action) if("power") on = !on diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 7ade794d6a1..e4356528144 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -79,7 +79,8 @@ return data /obj/machinery/telecomms/ui_act(action, params) - if(..()) + . = ..() + if(.) return if(!issilicon(usr)) diff --git a/code/game/objects/items/RPD.dm b/code/game/objects/items/RPD.dm index ff3f6da006a..b9be65bc2a3 100644 --- a/code/game/objects/items/RPD.dm +++ b/code/game/objects/items/RPD.dm @@ -286,8 +286,10 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list( return data /obj/item/pipe_dispenser/ui_act(action, params) - if(..()) + . = ..() + if(.) return + if(!usr.canUseTopic(src, BE_CLOSE)) return var/playeffect = TRUE diff --git a/code/game/objects/items/airlock_painter.dm b/code/game/objects/items/airlock_painter.dm index ac5f2d45207..79efee73836 100644 --- a/code/game/objects/items/airlock_painter.dm +++ b/code/game/objects/items/airlock_painter.dm @@ -222,8 +222,10 @@ return data /obj/item/airlock_painter/decal/ui_act(action,list/params) - if(..()) + . = ..() + if(.) return + switch(action) //Lists of decals and designs if("select decal") diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 498da928812..ddbea0b863c 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -229,8 +229,10 @@ .["current_colour"] = paint_color /obj/item/toy/crayon/ui_act(action, list/params) - if(..()) + . = ..() + if(.) return + switch(action) if("toggle_cap") if(has_cap) diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 68cf8d961f3..c7fe47c7ec4 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -78,7 +78,8 @@ return data /obj/item/aicard/ui_act(action,params) - if(..()) + . = ..() + if(.) return switch(action) if("wipe") diff --git a/code/game/objects/items/devices/portable_chem_mixer.dm b/code/game/objects/items/devices/portable_chem_mixer.dm index 3fdf73ee3b5..7b78b1c092c 100644 --- a/code/game/objects/items/devices/portable_chem_mixer.dm +++ b/code/game/objects/items/devices/portable_chem_mixer.dm @@ -177,7 +177,8 @@ return data /obj/item/storage/portable_chem_mixer/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("amount") diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index 79d54c7ac97..9d307618a66 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -103,7 +103,8 @@ return data /obj/item/electropack/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index dcad8df672b..7892d09208f 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -142,7 +142,8 @@ return data /obj/item/radio/ui_act(action, params, datum/tgui/ui) - if(..()) + . = ..() + if(.) return switch(action) if("frequency") diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 7aaf063f6fa..92a92b08479 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -130,7 +130,8 @@ effective or pretty fucking useless. return data /obj/item/healthanalyzer/rad_laser/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 9435089a15a..a759c1aa16b 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -210,7 +210,8 @@ return data /obj/item/transfer_valve/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/game/objects/items/eightball.dm b/code/game/objects/items/eightball.dm index b7def6788b3..b880dddb0de 100644 --- a/code/game/objects/items/eightball.dm +++ b/code/game/objects/items/eightball.dm @@ -217,8 +217,10 @@ return data /obj/item/toy/eightball/haunted/ui_act(action, params) - if(..()) + . = ..() + if(.) return + var/mob/user = usr switch(action) diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm index 2d0b25b9585..11f31c3688e 100644 --- a/code/game/objects/items/implants/implantchair.dm +++ b/code/game/objects/items/implants/implantchair.dm @@ -54,7 +54,8 @@ return data /obj/machinery/implantchair/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("door") diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 31bafb13764..0fcf25f03ee 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -172,7 +172,8 @@ return data /obj/item/tank/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("pressure") diff --git a/code/game/objects/items/teleportation.dm b/code/game/objects/items/teleportation.dm index 4fa35c86fe1..087e952b8be 100644 --- a/code/game/objects/items/teleportation.dm +++ b/code/game/objects/items/teleportation.dm @@ -91,9 +91,6 @@ data["trackimplants"] = track_implants return data -/obj/machinery/my_machine/ui_act(action, params) - if(..()) return - /* * Hand-tele */ diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 949568b9dec..96b7e905c63 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -41,8 +41,8 @@ structureclimber.visible_message("[structureclimber] is knocked off [src].", "You're knocked off [src]!", "You see [structureclimber] get knocked off [src].") /obj/structure/ui_act(action, params) - . = ..() add_fingerprint(usr) + return ..() /obj/structure/MouseDrop_T(atom/movable/O, mob/user) . = ..() diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 82ee6d918f0..2483c7934ac 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -426,7 +426,8 @@ return data /obj/structure/displaycase/forsale/ui_act(action, params) - if(..()) + . = ..() + if(.) return var/obj/item/card/id/potential_acc = usr.get_idcard(hand_first = TRUE) switch(action) diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index 6b5e24089d4..0dcd0655e41 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -84,7 +84,8 @@ return data /obj/structure/tank_dispenser/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("plasma") diff --git a/code/modules/NTNet/relays.dm b/code/modules/NTNet/relays.dm index c6c01394386..0c31dc599ac 100644 --- a/code/modules/NTNet/relays.dm +++ b/code/modules/NTNet/relays.dm @@ -102,7 +102,8 @@ return data /obj/machinery/ntnet_relay/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("restart") diff --git a/code/modules/admin/verbs/borgpanel.dm b/code/modules/admin/verbs/borgpanel.dm index e23742cde1b..90a7cc17066 100644 --- a/code/modules/admin/verbs/borgpanel.dm +++ b/code/modules/admin/verbs/borgpanel.dm @@ -79,7 +79,8 @@ /datum/borgpanel/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch (action) if ("set_charge") diff --git a/code/modules/antagonists/changeling/cellular_emporium.dm b/code/modules/antagonists/changeling/cellular_emporium.dm index aa73e6d8392..9b0fc416abc 100644 --- a/code/modules/antagonists/changeling/cellular_emporium.dm +++ b/code/modules/antagonists/changeling/cellular_emporium.dm @@ -60,7 +60,8 @@ return data /datum/cellular_emporium/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm index d43ce7160cb..30b3265eb0c 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm @@ -310,7 +310,8 @@ return data /obj/machinery/nuclearbomb/ui_act(action, params) - if(..()) + . = ..() + if(.) return playsound(src, "terminal_type", 20, FALSE) switch(action) diff --git a/code/modules/antagonists/traitor/equipment/module_picker.dm b/code/modules/antagonists/traitor/equipment/module_picker.dm index 60024899d9e..c11ace042d3 100644 --- a/code/modules/antagonists/traitor/equipment/module_picker.dm +++ b/code/modules/antagonists/traitor/equipment/module_picker.dm @@ -63,7 +63,8 @@ return data /datum/module_picker/ui_act(action, list/params) - if(..()) + . = ..() + if(.) return if(!isAI(usr)) return diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index 078eda238a8..0ac801a785d 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -201,7 +201,8 @@ return data /obj/item/assembly/infra/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm index d37165cfd09..a8ee4601d2f 100644 --- a/code/modules/assembly/proximity.dm +++ b/code/modules/assembly/proximity.dm @@ -129,7 +129,8 @@ return data /obj/item/assembly/prox_sensor/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 91d29110337..72ac2e8f9ff 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -83,7 +83,8 @@ return data /obj/item/assembly/signaler/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index 44753d83e2c..98840d33f2a 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -104,7 +104,8 @@ return data /obj/item/assembly/timer/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 805d27dd9b4..992c99d2388 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -385,7 +385,9 @@ return data /obj/machinery/airalarm/ui_act(action, params) - if(..() || buildstage != 2) + . = ..() + + if(. || buildstage != 2) return if((locked && !usr.has_unlimited_silicon_privilege) || (usr.has_unlimited_silicon_privilege && aidisabled)) return diff --git a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm index 70c982d1db2..15b88d354ef 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm @@ -98,7 +98,8 @@ Passive gate is similar to the regular pump except: return data /obj/machinery/atmospherics/components/binary/passive_gate/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("power") diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm b/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm index 93e5c32870e..c1178a9e266 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm @@ -98,7 +98,8 @@ return data /obj/machinery/atmospherics/components/binary/pressure_valve/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("power") diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index 22f412ff391..b5647f39cfa 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -96,7 +96,8 @@ return data /obj/machinery/atmospherics/components/binary/pump/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("power") diff --git a/code/modules/atmospherics/machinery/components/binary_devices/temperature_gate.dm b/code/modules/atmospherics/machinery/components/binary_devices/temperature_gate.dm index 4c98ffcb1c2..31b0efdc51e 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/temperature_gate.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/temperature_gate.dm @@ -91,7 +91,8 @@ return data /obj/machinery/atmospherics/components/binary/temperature_gate/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("power") diff --git a/code/modules/atmospherics/machinery/components/binary_devices/temperature_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/temperature_pump.dm index e5d1091c48b..fb18f1da664 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/temperature_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/temperature_pump.dm @@ -60,7 +60,8 @@ return data /obj/machinery/atmospherics/components/binary/temperature_pump/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("power") diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index 99546dc0471..c31ad7ddb6f 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -128,7 +128,8 @@ set_frequency(frequency) /obj/machinery/atmospherics/components/binary/volume_pump/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("power") diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index 562cea9a8b5..760f8774c1c 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -140,7 +140,8 @@ return data /obj/machinery/atmospherics/components/trinary/filter/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("power") diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index a706cda80b8..e015ada5614 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -141,7 +141,8 @@ return data /obj/machinery/atmospherics/components/trinary/mixer/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("power") diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 4261928f87d..7da5274bf7f 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -435,7 +435,8 @@ return data /obj/machinery/atmospherics/components/unary/cryo_cell/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("power") diff --git a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm index 5681f98f3fd..3dbf70d75b5 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm @@ -156,7 +156,8 @@ return data /obj/machinery/atmospherics/components/unary/outlet_injector/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index dd73a1ef6bb..d89cfd12ec0 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -142,8 +142,8 @@ return data /obj/machinery/atmospherics/components/unary/thermomachine/ui_act(action, params) - - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index 257ee962522..4cad99e1c94 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -496,7 +496,8 @@ return data /obj/machinery/portable_atmospherics/canister/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("relabel") diff --git a/code/modules/atmospherics/machinery/portable/pump.dm b/code/modules/atmospherics/machinery/portable/pump.dm index 9657ea3642f..1165223056a 100644 --- a/code/modules/atmospherics/machinery/portable/pump.dm +++ b/code/modules/atmospherics/machinery/portable/pump.dm @@ -112,7 +112,8 @@ return data /obj/machinery/portable_atmospherics/pump/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("power") diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm index a9950425c69..08a96dcf860 100644 --- a/code/modules/atmospherics/machinery/portable/scrubber.dm +++ b/code/modules/atmospherics/machinery/portable/scrubber.dm @@ -137,7 +137,8 @@ investigate_log("[key_name(user)] started a transfer into [holding].", INVESTIGATE_ATMOS) /obj/machinery/portable_atmospherics/scrubber/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("power") diff --git a/code/modules/cargo/blackmarket/blackmarket_uplink.dm b/code/modules/cargo/blackmarket/blackmarket_uplink.dm index 4d1fa58cdbc..46b1acc99ce 100644 --- a/code/modules/cargo/blackmarket/blackmarket_uplink.dm +++ b/code/modules/cargo/blackmarket/blackmarket_uplink.dm @@ -98,7 +98,8 @@ return data /obj/item/blackmarket_uplink/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("set_category") diff --git a/code/modules/cargo/bounty_console.dm b/code/modules/cargo/bounty_console.dm index feec8403b0f..eb08e217a10 100644 --- a/code/modules/cargo/bounty_console.dm +++ b/code/modules/cargo/bounty_console.dm @@ -50,7 +50,8 @@ return data /obj/machinery/computer/bounty/ui_act(action,params) - if(..()) + . = ..() + if(.) return switch(action) if("ClaimBounty") diff --git a/code/modules/cargo/centcom_podlauncher.dm b/code/modules/cargo/centcom_podlauncher.dm index b747ef01163..94ee980c0d1 100644 --- a/code/modules/cargo/centcom_podlauncher.dm +++ b/code/modules/cargo/centcom_podlauncher.dm @@ -179,7 +179,8 @@ return data /datum/centcom_podlauncher/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) ////////////////////////////UTILITIES////////////////// @@ -648,7 +649,7 @@ refreshView() /area/centcom/supplypod/pod_storage/Initialize(mapload) //temp_pod holding area - . = ..() + . = ..() var/obj/imgbound = locate() in locate(200,SUPPLYPOD_X_OFFSET*-4.5, 1) call(GLOB.podlauncher, "RegisterSignal")(imgbound, "ct[GLOB.podstyles[14][9]]", "[GLOB.podstyles[14][10]]dlauncher") diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index 5101b01fdcf..cfb66e92f63 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -132,7 +132,8 @@ return data /obj/machinery/computer/cargo/ui_act(action, params, datum/tgui/ui) - if(..()) + . = ..() + if(.) return switch(action) if("send") diff --git a/code/modules/cargo/expressconsole.dm b/code/modules/cargo/expressconsole.dm index 468d1e88684..738ae603b42 100644 --- a/code/modules/cargo/expressconsole.dm +++ b/code/modules/cargo/expressconsole.dm @@ -128,6 +128,10 @@ return data /obj/machinery/computer/cargo/express/ui_act(action, params, datum/tgui/ui) + . = ..() + if(.) + return + switch(action) if("LZCargo") usingBeacon = FALSE diff --git a/code/modules/events/pirates.dm b/code/modules/events/pirates.dm index 6668cd3d846..856b7aea047 100644 --- a/code/modules/events/pirates.dm +++ b/code/modules/events/pirates.dm @@ -300,7 +300,8 @@ return data /obj/machinery/computer/piratepad_control/ui_act(action, params) - if(..()) + . = ..() + if(.) return if(!pad) return diff --git a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm index 58ea04cd164..273d859203f 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -104,7 +104,8 @@ return data /obj/machinery/computer/holodeck/ui_act(action, params) - if(..()) + . = ..() + if(.) return . = TRUE switch(action) diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index 03cb2e176c9..d6ca300180f 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -308,7 +308,8 @@ return data /obj/machinery/biogenerator/ui_act(action, list/params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm index 00381069bf6..443e20c7e91 100644 --- a/code/modules/hydroponics/seed_extractor.dm +++ b/code/modules/hydroponics/seed_extractor.dm @@ -182,7 +182,8 @@ .["seeds"] = V /obj/machinery/seed_extractor/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/language/language_menu.dm b/code/modules/language/language_menu.dm index bffd3d59af6..e9e07c28f89 100644 --- a/code/modules/language/language_menu.dm +++ b/code/modules/language/language_menu.dm @@ -63,7 +63,8 @@ return data /datum/language_menu/ui_act(action, params) - if(..()) + . = ..() + if(.) return var/mob/user = usr var/atom/movable/AM = language_holder.get_atom() diff --git a/code/modules/library/soapstone.dm b/code/modules/library/soapstone.dm index 6846de30be8..bf343829b86 100644 --- a/code/modules/library/soapstone.dm +++ b/code/modules/library/soapstone.dm @@ -232,6 +232,10 @@ return data /obj/structure/chisel_message/ui_act(action, params, datum/tgui/ui) + . = ..() + if(.) + return + var/mob/user = usr var/is_admin = check_rights_for(user.client, R_ADMIN) var/is_creator = user.ckey == creator_key diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm index 94b92ec8139..5ec77a563c3 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -73,7 +73,8 @@ GLOBAL_LIST(labor_sheet_values) return data /obj/machinery/mineral/labor_claim_console/ui_act(action, params) - if(..()) + . = ..() + if(.) return var/mob/M = usr diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 97587bbba02..43268dddcde 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -241,7 +241,8 @@ return data /obj/machinery/mineral/ore_redemption/ui_act(action, params) - if(..()) + . = ..() + if(.) return var/datum/component/material_container/mat_container = materials.mat_container switch(action) diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index 09eb790e42f..6930ba819ed 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -129,7 +129,8 @@ .["user"]["job"] = "No Job" /obj/machinery/mineral/equipment_vendor/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 4de34ecdba1..87476fcf349 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -79,7 +79,8 @@ return data /obj/structure/ore_box/ui_act(action, params) - if(..()) + . = ..() + if(.) return if(!Adjacent(usr)) return diff --git a/code/modules/mob/dead/observer/notificationprefs.dm b/code/modules/mob/dead/observer/notificationprefs.dm index 524ff80d5d8..802da5e2b80 100644 --- a/code/modules/mob/dead/observer/notificationprefs.dm +++ b/code/modules/mob/dead/observer/notificationprefs.dm @@ -39,7 +39,8 @@ )) /datum/notificationpanel/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch (action) if ("toggle_ignore") diff --git a/code/modules/mob/dead/observer/orbit.dm b/code/modules/mob/dead/observer/orbit.dm index 2a10a3dcef0..c5429bb8d2e 100644 --- a/code/modules/mob/dead/observer/orbit.dm +++ b/code/modules/mob/dead/observer/orbit.dm @@ -15,7 +15,8 @@ ui.open() /datum/orbit_menu/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) - if (..()) + . = ..() + if(.) return if (action == "orbit") diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index 1f4f8ca1f66..289ddab6ebb 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -337,7 +337,8 @@ return data /datum/action/innate/swap_body/ui_act(action, params) - if(..()) + . = ..() + if(.) return var/mob/living/carbon/human/H = owner if(!isslimeperson(owner)) diff --git a/code/modules/mob/living/silicon/ai/robot_control.dm b/code/modules/mob/living/silicon/ai/robot_control.dm index bbfb7604ba5..e84a62694d3 100644 --- a/code/modules/mob/living/silicon/ai/robot_control.dm +++ b/code/modules/mob/living/silicon/ai/robot_control.dm @@ -52,7 +52,8 @@ return data /datum/robot_control/ui_act(action, params) - if(..()) + . = ..() + if(.) return if(!is_interactable(usr)) return diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 7912004bc0c..63420e2d0f4 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -266,8 +266,11 @@ return data /mob/living/simple_animal/bot/mulebot/ui_act(action, params) - if(..() || (locked && !usr.has_unlimited_silicon_privilege)) + . = ..() + + if(. || (locked && !usr.has_unlimited_silicon_privilege)) return + switch(action) if("lock") if(usr.has_unlimited_silicon_privilege) diff --git a/code/modules/modular_computers/computers/item/computer_ui.dm b/code/modules/modular_computers/computers/item/computer_ui.dm index 2091a79077f..433159dc6a8 100644 --- a/code/modules/modular_computers/computers/item/computer_ui.dm +++ b/code/modules/modular_computers/computers/item/computer_ui.dm @@ -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") diff --git a/code/modules/modular_computers/computers/item/tablet.dm b/code/modules/modular_computers/computers/item/tablet.dm index ad2ebf1896b..273e0ec5222 100644 --- a/code/modules/modular_computers/computers/item/tablet.dm +++ b/code/modules/modular_computers/computers/item/tablet.dm @@ -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) diff --git a/code/modules/modular_computers/file_system/program.dm b/code/modules/modular_computers/file_system/program.dm index 14898bcb6af..64820d52e81 100644 --- a/code/modules/modular_computers/file_system/program.dm +++ b/code/modules/modular_computers/file_system/program.dm @@ -188,18 +188,20 @@ // Calls beginning with "PC_" are reserved for computer handling (by whatever runs the program) // ALWAYS INCLUDE PARENT CALL ..() OR DIE IN FIRE. /datum/computer_file/program/ui_act(action,list/params,datum/tgui/ui) - if(..()) - return 1 + . = ..() + if(.) + return + if(computer) switch(action) if("PC_exit") computer.kill_program() ui.close() - return 1 + return TRUE if("PC_shutdown") computer.shutdown_computer() ui.close() - return 1 + return TRUE if("PC_minimize") var/mob/user = usr if(!computer.active_program || !computer.all_components[MC_CPU]) diff --git a/code/modules/modular_computers/file_system/programs/airestorer.dm b/code/modules/modular_computers/file_system/programs/airestorer.dm index db22e8472a1..b5309b2b086 100644 --- a/code/modules/modular_computers/file_system/programs/airestorer.dm +++ b/code/modules/modular_computers/file_system/programs/airestorer.dm @@ -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() diff --git a/code/modules/modular_computers/file_system/programs/antagonist/contract_uplink.dm b/code/modules/modular_computers/file_system/programs/antagonist/contract_uplink.dm index aa361d4544b..131ccfd8a2b 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/contract_uplink.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/contract_uplink.dm @@ -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] diff --git a/code/modules/modular_computers/file_system/programs/antagonist/dos.dm b/code/modules/modular_computers/file_system/programs/antagonist/dos.dm index 3fe1d01453b..5a60971f09f 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/dos.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/dos.dm @@ -39,7 +39,8 @@ ..() /datum/computer_file/program/ntnet_dos/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("PRG_target_relay") diff --git a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm index a4408346e5e..e1ab2be915a 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm @@ -45,7 +45,8 @@ /datum/computer_file/program/revelation/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("PRG_arm") diff --git a/code/modules/modular_computers/file_system/programs/arcade.dm b/code/modules/modular_computers/file_system/programs/arcade.dm index ac2731d9c62..13b63d34bfb 100644 --- a/code/modules/modular_computers/file_system/programs/arcade.dm +++ b/code/modules/modular_computers/file_system/programs/arcade.dm @@ -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] diff --git a/code/modules/modular_computers/file_system/programs/atmosscan.dm b/code/modules/modular_computers/file_system/programs/atmosscan.dm index ebb2770f2e5..47a20d27314 100644 --- a/code/modules/modular_computers/file_system/programs/atmosscan.dm +++ b/code/modules/modular_computers/file_system/programs/atmosscan.dm @@ -39,5 +39,6 @@ return data /datum/computer_file/program/atmosscan/ui_act(action, list/params) - if(..()) - return TRUE + . = ..() + if(.) + return diff --git a/code/modules/modular_computers/file_system/programs/borg_monitor.dm b/code/modules/modular_computers/file_system/programs/borg_monitor.dm index 10931f00654..2f3051b0353 100644 --- a/code/modules/modular_computers/file_system/programs/borg_monitor.dm +++ b/code/modules/modular_computers/file_system/programs/borg_monitor.dm @@ -43,7 +43,8 @@ return data /datum/computer_file/program/borg_monitor/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/modular_computers/file_system/programs/bounty_board.dm b/code/modules/modular_computers/file_system/programs/bounty_board.dm index 2e7d3cc87f9..9c42a28a9bc 100644 --- a/code/modules/modular_computers/file_system/programs/bounty_board.dm +++ b/code/modules/modular_computers/file_system/programs/bounty_board.dm @@ -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"] diff --git a/code/modules/modular_computers/file_system/programs/card.dm b/code/modules/modular_computers/file_system/programs/card.dm index 01974008d23..de3f02e21ce 100644 --- a/code/modules/modular_computers/file_system/programs/card.dm +++ b/code/modules/modular_computers/file_system/programs/card.dm @@ -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 diff --git a/code/modules/modular_computers/file_system/programs/cargobounty.dm b/code/modules/modular_computers/file_system/programs/cargobounty.dm index a762ddda4f9..6cf8988df42 100644 --- a/code/modules/modular_computers/file_system/programs/cargobounty.dm +++ b/code/modules/modular_computers/file_system/programs/cargobounty.dm @@ -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") diff --git a/code/modules/modular_computers/file_system/programs/cargoship.dm b/code/modules/modular_computers/file_system/programs/cargoship.dm index db8d6d9f823..7f324a1f6e3 100644 --- a/code/modules/modular_computers/file_system/programs/cargoship.dm +++ b/code/modules/modular_computers/file_system/programs/cargoship.dm @@ -25,8 +25,9 @@ return data /datum/computer_file/program/shipping/ui_act(action, list/params) - if(..()) - return TRUE + . = ..() + if(.) + return if(!computer) return diff --git a/code/modules/modular_computers/file_system/programs/configurator.dm b/code/modules/modular_computers/file_system/programs/configurator.dm index fae06544d5f..cea3e854e4f 100644 --- a/code/modules/modular_computers/file_system/programs/configurator.dm +++ b/code/modules/modular_computers/file_system/programs/configurator.dm @@ -57,7 +57,8 @@ /datum/computer_file/program/computerconfig/ui_act(action,params) - if(..()) + . = ..() + if(.) return switch(action) if("PC_toggle_component") diff --git a/code/modules/modular_computers/file_system/programs/crewmanifest.dm b/code/modules/modular_computers/file_system/programs/crewmanifest.dm index c42e596f1d6..e0cc6e60d2c 100644 --- a/code/modules/modular_computers/file_system/programs/crewmanifest.dm +++ b/code/modules/modular_computers/file_system/programs/crewmanifest.dm @@ -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 diff --git a/code/modules/modular_computers/file_system/programs/file_browser.dm b/code/modules/modular_computers/file_system/programs/file_browser.dm index aba826fce89..41fb6cbceb9 100644 --- a/code/modules/modular_computers/file_system/programs/file_browser.dm +++ b/code/modules/modular_computers/file_system/programs/file_browser.dm @@ -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] diff --git a/code/modules/modular_computers/file_system/programs/jobmanagement.dm b/code/modules/modular_computers/file_system/programs/jobmanagement.dm index 2d0d1bb0555..1bca990bc04 100644 --- a/code/modules/modular_computers/file_system/programs/jobmanagement.dm +++ b/code/modules/modular_computers/file_system/programs/jobmanagement.dm @@ -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] diff --git a/code/modules/modular_computers/file_system/programs/ntdownloader.dm b/code/modules/modular_computers/file_system/programs/ntdownloader.dm index c368b6408cb..cc8465f613f 100644 --- a/code/modules/modular_computers/file_system/programs/ntdownloader.dm +++ b/code/modules/modular_computers/file_system/programs/ntdownloader.dm @@ -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) diff --git a/code/modules/modular_computers/file_system/programs/ntmonitor.dm b/code/modules/modular_computers/file_system/programs/ntmonitor.dm index 756217ad91f..86da69c2277 100644 --- a/code/modules/modular_computers/file_system/programs/ntmonitor.dm +++ b/code/modules/modular_computers/file_system/programs/ntmonitor.dm @@ -10,7 +10,8 @@ tgui_id = "NtosNetMonitor" /datum/computer_file/program/ntnetmonitor/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("resetIDS") diff --git a/code/modules/modular_computers/file_system/programs/ntnrc_client.dm b/code/modules/modular_computers/file_system/programs/ntnrc_client.dm index f03ff3f8fdf..1cf3fc54e52 100644 --- a/code/modules/modular_computers/file_system/programs/ntnrc_client.dm +++ b/code/modules/modular_computers/file_system/programs/ntnrc_client.dm @@ -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) diff --git a/code/modules/modular_computers/file_system/programs/radar.dm b/code/modules/modular_computers/file_system/programs/radar.dm index 216365d6ea2..e209cb43985 100644 --- a/code/modules/modular_computers/file_system/programs/radar.dm +++ b/code/modules/modular_computers/file_system/programs/radar.dm @@ -63,7 +63,8 @@ return data /datum/computer_file/program/radar/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/modular_computers/file_system/programs/robocontrol.dm b/code/modules/modular_computers/file_system/programs/robocontrol.dm index c0b82b9c95b..e0e2fb03d09 100644 --- a/code/modules/modular_computers/file_system/programs/robocontrol.dm +++ b/code/modules/modular_computers/file_system/programs/robocontrol.dm @@ -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) diff --git a/code/modules/modular_computers/file_system/programs/sm_monitor.dm b/code/modules/modular_computers/file_system/programs/sm_monitor.dm index f333ae9061c..59a00338ea1 100644 --- a/code/modules/modular_computers/file_system/programs/sm_monitor.dm +++ b/code/modules/modular_computers/file_system/programs/sm_monitor.dm @@ -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") diff --git a/code/modules/modular_computers/laptop_vendor.dm b/code/modules/modular_computers/laptop_vendor.dm index 79931dac613..2cc4da6f9db 100644 --- a/code/modules/modular_computers/laptop_vendor.dm +++ b/code/modules/modular_computers/laptop_vendor.dm @@ -169,8 +169,9 @@ /obj/machinery/lapvend/ui_act(action, params) - if(..()) - return TRUE + . = ..() + if(.) + return switch(action) if("pick_device") diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 1f2ba4523b7..d5ca09fe44c 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -285,7 +285,8 @@ return data /obj/item/paper/ui_act(action, params,datum/tgui/ui) - if(..()) + . = ..() + if(.) return switch(action) if("stamp") diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 7ac6fd26f73..2c55c3e35f8 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -82,7 +82,8 @@ return data /obj/machinery/photocopier/ui_act(action, list/params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/plumbing/plumbers/acclimator.dm b/code/modules/plumbing/plumbers/acclimator.dm index 6a8b6695377..ae96566e9cf 100644 --- a/code/modules/plumbing/plumbers/acclimator.dm +++ b/code/modules/plumbing/plumbers/acclimator.dm @@ -82,7 +82,8 @@ return data /obj/machinery/plumbing/acclimator/ui_act(action, params) - if(..()) + . = ..() + if(.) return . = TRUE switch(action) diff --git a/code/modules/plumbing/plumbers/filter.dm b/code/modules/plumbing/plumbers/filter.dm index 21067c46815..92f1949fd48 100644 --- a/code/modules/plumbing/plumbers/filter.dm +++ b/code/modules/plumbing/plumbers/filter.dm @@ -31,7 +31,8 @@ return data /obj/machinery/plumbing/filter/ui_act(action, params) - if(..()) + . = ..() + if(.) return . = TRUE switch(action) diff --git a/code/modules/plumbing/plumbers/pill_press.dm b/code/modules/plumbing/plumbers/pill_press.dm index bfa5a612621..1c185590d72 100644 --- a/code/modules/plumbing/plumbers/pill_press.dm +++ b/code/modules/plumbing/plumbers/pill_press.dm @@ -108,7 +108,8 @@ return data /obj/machinery/plumbing/pill_press/ui_act(action, params) - if(..()) + . = ..() + if(.) return . = TRUE switch(action) diff --git a/code/modules/plumbing/plumbers/reaction_chamber.dm b/code/modules/plumbing/plumbers/reaction_chamber.dm index 472993c6daa..ee6275916bf 100644 --- a/code/modules/plumbing/plumbers/reaction_chamber.dm +++ b/code/modules/plumbing/plumbers/reaction_chamber.dm @@ -47,7 +47,8 @@ return data /obj/machinery/plumbing/reaction_chamber/ui_act(action, params) - if(..()) + . = ..() + if(.) return . = TRUE switch(action) diff --git a/code/modules/plumbing/plumbers/splitters.dm b/code/modules/plumbing/plumbers/splitters.dm index 173af3d0be8..b1add57c3b3 100644 --- a/code/modules/plumbing/plumbers/splitters.dm +++ b/code/modules/plumbing/plumbers/splitters.dm @@ -34,7 +34,8 @@ return data /obj/machinery/plumbing/splitter/ui_act(action, params) - if(..()) + . = ..() + if(.) return . = TRUE switch(action) diff --git a/code/modules/plumbing/plumbers/synthesizer.dm b/code/modules/plumbing/plumbers/synthesizer.dm index 3cdd1b9e69b..89843124624 100644 --- a/code/modules/plumbing/plumbers/synthesizer.dm +++ b/code/modules/plumbing/plumbers/synthesizer.dm @@ -80,7 +80,8 @@ return data /obj/machinery/plumbing/synthesizer/ui_act(action, params) - if(..()) + . = ..() + if(.) return . = TRUE switch(action) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index bae022293d9..09aa355e98e 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -967,7 +967,9 @@ . = UI_INTERACTIVE /obj/machinery/power/apc/ui_act(action, params) - if(..() || !can_use(usr, 1) || (locked && !usr.has_unlimited_silicon_privilege && !failure_timer && action != "toggle_nightshift")) + . = ..() + + if(. || !can_use(usr, 1) || (locked && !usr.has_unlimited_silicon_privilege && !failure_timer && action != "toggle_nightshift")) return switch(action) if("lock") diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 8d93907e0e7..c1b8af89b8c 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -238,7 +238,8 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne return data /obj/machinery/gravity_generator/main/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 0cb5e24c720..ba1dcfb33f6 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -251,7 +251,8 @@ . = data /obj/machinery/power/port_gen/pacman/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("toggle_power") diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index a74834b5c36..1c957d3247e 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -348,7 +348,8 @@ return data /obj/machinery/power/smes/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("tryinput") diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index e78ad5389be..d7f5325c642 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -371,7 +371,8 @@ return data /obj/machinery/power/solar_control/ui_act(action, params) - if(..()) + . = ..() + if(.) return if(action == "azimuth") var/adjust = text2num(params["adjust"]) diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index 32bf4ccf046..e9aaceca01a 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -266,7 +266,8 @@ return data /obj/machinery/power/turbine/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) @@ -327,7 +328,8 @@ return data /obj/machinery/computer/turbine_computer/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index b9a5a244a0d..5dd1a6d962c 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -228,7 +228,8 @@ return data /obj/machinery/chem_dispenser/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("amount") diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index 2351374765e..5ba9346e41f 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -113,7 +113,8 @@ return data /obj/machinery/chem_heater/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("power") diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 21019a994bd..2717dd63089 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -194,7 +194,8 @@ return data /obj/machinery/chem_master/ui_act(action, params) - if(..()) + . = ..() + if(.) return if(action == "eject") diff --git a/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm b/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm index d066a6b8c48..42387d78a45 100644 --- a/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm +++ b/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm @@ -18,7 +18,8 @@ ui.open() /obj/machinery/chem_dispenser/chem_synthesizer/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("ejectBeaker") diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index fdfbb988345..83504e9232a 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -172,7 +172,8 @@ return data /obj/machinery/computer/pandemic/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("eject_beaker") diff --git a/code/modules/reagents/chemistry/machinery/smoke_machine.dm b/code/modules/reagents/chemistry/machinery/smoke_machine.dm index 9356550f6c1..9c31dd03966 100644 --- a/code/modules/reagents/chemistry/machinery/smoke_machine.dm +++ b/code/modules/reagents/chemistry/machinery/smoke_machine.dm @@ -135,7 +135,9 @@ return data /obj/machinery/smoke_machine/ui_act(action, params) - if(..() || !anchored) + . = ..() + + if(. || !anchored) return switch(action) if("purge") diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index 5870dbefff9..f102a92816f 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -299,7 +299,8 @@ return data /obj/machinery/disposal/bin/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/code/modules/research/bepis.dm b/code/modules/research/bepis.dm index dafd34ba91d..b8db53a23b9 100644 --- a/code/modules/research/bepis.dm +++ b/code/modules/research/bepis.dm @@ -233,7 +233,8 @@ return data /obj/machinery/rnd/bepis/ui_act(action,params) - if(..()) + . = ..() + if(.) return switch(action) if("deposit_cash") diff --git a/code/modules/research/nanites/nanite_chamber_computer.dm b/code/modules/research/nanites/nanite_chamber_computer.dm index 70e4d055907..da65235772a 100644 --- a/code/modules/research/nanites/nanite_chamber_computer.dm +++ b/code/modules/research/nanites/nanite_chamber_computer.dm @@ -60,7 +60,8 @@ return data /obj/machinery/computer/nanite_chamber_control/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("toggle_lock") diff --git a/code/modules/research/nanites/nanite_cloud_controller.dm b/code/modules/research/nanites/nanite_cloud_controller.dm index 27384c66ace..67fa6d879dd 100644 --- a/code/modules/research/nanites/nanite_cloud_controller.dm +++ b/code/modules/research/nanites/nanite_cloud_controller.dm @@ -162,7 +162,8 @@ return data /obj/machinery/computer/nanite_cloud_controller/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("eject") diff --git a/code/modules/research/nanites/nanite_program_hub.dm b/code/modules/research/nanites/nanite_program_hub.dm index 21eb6820257..5bf234e896f 100644 --- a/code/modules/research/nanites/nanite_program_hub.dm +++ b/code/modules/research/nanites/nanite_program_hub.dm @@ -109,7 +109,8 @@ return data /obj/machinery/nanite_program_hub/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("eject") diff --git a/code/modules/research/nanites/nanite_programmer.dm b/code/modules/research/nanites/nanite_programmer.dm index 05de658d0fe..6d17edce2b3 100644 --- a/code/modules/research/nanites/nanite_programmer.dm +++ b/code/modules/research/nanites/nanite_programmer.dm @@ -86,7 +86,8 @@ return data /obj/machinery/nanite_programmer/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("eject") diff --git a/code/modules/research/nanites/nanite_remote.dm b/code/modules/research/nanites/nanite_remote.dm index e3f5a0f286c..fee5544ff76 100644 --- a/code/modules/research/nanites/nanite_remote.dm +++ b/code/modules/research/nanites/nanite_remote.dm @@ -100,7 +100,8 @@ return data /obj/item/nanite_remote/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("set_code") @@ -215,7 +216,8 @@ return data /obj/item/nanite_remote/comm/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("set_message") diff --git a/code/modules/ruins/spaceruin_code/TheDerelict.dm b/code/modules/ruins/spaceruin_code/TheDerelict.dm index 1c8d0d4e41e..6594518d82e 100644 --- a/code/modules/ruins/spaceruin_code/TheDerelict.dm +++ b/code/modules/ruins/spaceruin_code/TheDerelict.dm @@ -121,7 +121,8 @@ ui.open() /obj/machinery/computer/vaultcontroller/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("togglelock") diff --git a/code/modules/security_levels/keycard_authentication.dm b/code/modules/security_levels/keycard_authentication.dm index 1c17412d270..23b2ac0becd 100644 --- a/code/modules/security_levels/keycard_authentication.dm +++ b/code/modules/security_levels/keycard_authentication.dm @@ -58,7 +58,9 @@ GLOBAL_DATUM_INIT(keycard_events, /datum/events, new) return ..() /obj/machinery/keycard_auth/ui_act(action, params) - if(..() || waiting || !allowed(usr)) + . = ..() + + if(. || waiting || !allowed(usr)) return switch(action) if("red_alert") diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 970a167dc62..897646bb8a2 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -51,7 +51,8 @@ return data /obj/machinery/computer/emergency_shuttle/ui_act(action, params, datum/tgui/ui) - if(..()) + . = ..() + if(.) return if(ENGINES_STARTED) // past the point of no return return diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index 7877971f033..e1a8f3996f7 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -261,8 +261,10 @@ return data /obj/machinery/computer/bsa_control/ui_act(action, params) - if(..()) + . = ..() + if(.) return + switch(action) if("build") cannon = deploy() diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index 71a256c0f7b..89e29651d4b 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -210,8 +210,10 @@ return data /obj/machinery/dna_vault/ui_act(action, params) - if(..()) + . = ..() + if(.) return + switch(action) if("gene") upgrade(usr,params["choice"]) diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm index eb3cbc1f574..940f4c6dcad 100644 --- a/code/modules/station_goals/shield.dm +++ b/code/modules/station_goals/shield.dm @@ -49,8 +49,10 @@ ui.open() /obj/machinery/computer/sat_control/ui_act(action, params) - if(..()) + . = ..() + if(.) return + switch(action) if("toggle") toggle(text2num(params["id"])) diff --git a/code/modules/tgui/external.dm b/code/modules/tgui/external.dm index 8f47c609b23..46a4317fea4 100644 --- a/code/modules/tgui/external.dm +++ b/code/modules/tgui/external.dm @@ -71,12 +71,13 @@ * required action string The action/button that has been invoked by the user. * required params list A list of parameters attached to the button. * - * return bool If the UI should be updated or not. + * return bool If the user's input has been handled and the UI should update. */ /datum/proc/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + SHOULD_CALL_PARENT(TRUE) // If UI is not interactive or usr calling Topic is not the UI user, bail. if(!ui || ui.status != UI_INTERACTIVE) - return 1 + return TRUE /** * public diff --git a/code/modules/vehicles/mecha/mech_bay.dm b/code/modules/vehicles/mecha/mech_bay.dm index 3a4c4eca47a..683be6f5f0b 100644 --- a/code/modules/vehicles/mecha/mech_bay.dm +++ b/code/modules/vehicles/mecha/mech_bay.dm @@ -96,7 +96,8 @@ ui.open() /obj/machinery/computer/mech_bay_power_console/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("reconnect") diff --git a/code/modules/vehicles/mecha/mech_fabricator.dm b/code/modules/vehicles/mecha/mech_fabricator.dm index 9689dc2e6fc..e577508eef5 100644 --- a/code/modules/vehicles/mecha/mech_fabricator.dm +++ b/code/modules/vehicles/mecha/mech_fabricator.dm @@ -512,8 +512,9 @@ return data /obj/machinery/mecha_part_fabricator/ui_act(action, list/params) - if(..()) - return TRUE + . = ..() + if(.) + return . = TRUE diff --git a/code/modules/vehicles/mecha/mecha_control_console.dm b/code/modules/vehicles/mecha/mecha_control_console.dm index 346cd920031..5bb110a3449 100644 --- a/code/modules/vehicles/mecha/mecha_control_console.dm +++ b/code/modules/vehicles/mecha/mecha_control_console.dm @@ -46,7 +46,8 @@ return data /obj/machinery/computer/mecha/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) diff --git a/tgui/docs/tutorial-and-examples.md b/tgui/docs/tutorial-and-examples.md index dea1ede5945..2e02f0e491a 100644 --- a/tgui/docs/tutorial-and-examples.md +++ b/tgui/docs/tutorial-and-examples.md @@ -76,7 +76,8 @@ input. The input's `action` and `params` are passed to the proc. ```dm /obj/machinery/my_machine/ui_act(action, params) - if(..()) + . = ..() + if(.) return if(action == "change_color") var/new_color = params["color"] @@ -88,13 +89,20 @@ input. The input's `action` and `params` are passed to the proc. ``` The `..()` (parent call) is very important here, as it is how we check that the -user is allowed to use this interface (to avoid so-called href exploits). It is -also very important to clamp and sanitize all input here. Always assume the user -is attempting to exploit the game. +user is allowed to use this interface (to avoid so-called href exploits). When +any event has been handled `..()` will return `TRUE`. It is important to clamp +and sanitize all input here. Always assume the user is attempting to exploit the +game. + +When `..()` has returned `TRUE` your interface can safely assume that the user's +action has been handled already by some parent proc and you should not continue +to handle this, instead preserving and returning the parent proc's return value. Also note the use of `. = TRUE` (or `FALSE`), which is used to notify the UI -that this input caused an update. This is especially important for UIs that do -not auto-update, as otherwise the user will never see their change. +that this input has been handled. When `ui_act` eventually returns, a value of +`TRUE` indicates that the input has been handled and that the UI should update. +This is important for UIs that do not auto-update, as otherwise the user will +not be able to see the interface update based on thier actions. ### Frontend