mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Fixes edge cases revolving who can strip and who can't (#58445)
Fixes all simple mobs being able to strip, as well as being able to strip when your hands are blocked (e.g. cuffed). Fixes #58260.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
/proc/default_ui_state(mob/user, atom/source)
|
||||
return min(
|
||||
ui_status_user_is_abled(user, source),
|
||||
ui_status_user_has_free_hands(user, source),
|
||||
ui_status_user_is_advanced_tool_user(user),
|
||||
ui_status_only_living(user),
|
||||
max(
|
||||
@@ -47,7 +48,12 @@
|
||||
/proc/ui_status_user_is_abled(mob/user, atom/source)
|
||||
return user.shared_ui_interaction(source)
|
||||
|
||||
/// Returns a UI status such that advanced tool users will be able to update,
|
||||
/// Returns a UI status such that those without blocked hands will be able to interact,
|
||||
/// but everyone else can only watch.
|
||||
/proc/ui_status_user_has_free_hands(mob/user, atom/source)
|
||||
return HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) ? UI_UPDATE : UI_INTERACTIVE
|
||||
|
||||
/// Returns a UI status such that advanced tool users will be able to interact,
|
||||
/// but everyone else can only watch.
|
||||
/proc/ui_status_user_is_advanced_tool_user(mob/user)
|
||||
return ISADVANCEDTOOLUSER(user) ? UI_INTERACTIVE : UI_UPDATE
|
||||
|
||||
Reference in New Issue
Block a user