mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-16 18:45:22 +01:00
1c0ac21cb4
## About The Pull Request
Fixes the issue of usr pointing to admins by making Trigger pass down
clicker, as usr is fucky and can be passed down by other unrelated
procs. Fun.
Added the clicker arg to all usages of Trigger as well
Also changes isobserver check in antagonist ui_act code that prevents
observers from clicking UI's instead to check if the ui.user is
owner.current
## Why It's Good For The Game
Fixes admins giving heretic to people opening the heretic UI for the
admin instead
(cherry picked from commit 0bc42d6940)
23 lines
647 B
Plaintext
23 lines
647 B
Plaintext
/**
|
|
* The action button given by the weight machine's buckle.
|
|
* This allows users to manually trigger working out.
|
|
*/
|
|
/datum/action/push_weights
|
|
name = "Work out"
|
|
desc = "Start working out"
|
|
button_icon = 'icons/obj/fluff/gym_equipment.dmi'
|
|
button_icon_state = "stacklifter"
|
|
///Reference to the weightpress we are created inside of.
|
|
var/obj/structure/weightmachine/weightpress
|
|
|
|
/datum/action/push_weights/IsAvailable(feedback = FALSE)
|
|
if(DOING_INTERACTION(owner, weightpress))
|
|
return FALSE
|
|
return TRUE
|
|
|
|
/datum/action/push_weights/Trigger(mob/clicker, trigger_flags)
|
|
. = ..()
|
|
if(!.)
|
|
return FALSE
|
|
weightpress.perform_workout(owner)
|