Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes yautja bracers getting stuck in-hand #4528

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions code/modules/cm_preds/yaut_bracers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
flags_item = initial(flags_item)
UnregisterSignal(user, list(COMSIG_MOB_STAT_SET_ALIVE, COMSIG_MOB_DEATH))
SSminimaps.remove_marker(user)
unlock_bracer() // So as to prevent the bracer being stuck with nodrop if the pred gets gibbed/arm removed/etc.
..()

/obj/item/clothing/gloves/yautja/pickup(mob/living/user)
Expand Down Expand Up @@ -1164,18 +1165,26 @@
/// The actual unlock/lock function.
/obj/item/clothing/gloves/yautja/proc/toggle_lock_internal(mob/wearer, force_lock)
if(((flags_item & NODROP) || (flags_inventory & CANTSTRIP)) && !force_lock)
flags_item &= ~NODROP
flags_inventory &= ~CANTSTRIP
if(!isyautja(wearer))
to_chat(wearer, SPAN_WARNING("The bracer beeps pleasantly, releasing it's grip on your forearm."))
else
to_chat(wearer, SPAN_WARNING("With an angry blare the bracer releases your forearm."))
return TRUE
return unlock_bracer()

return lock_bracer()

/obj/item/clothing/gloves/yautja/proc/lock_bracer(mob/wearer)
flags_item |= NODROP
flags_inventory |= CANTSTRIP
if(isyautja(wearer))
to_chat(wearer, SPAN_WARNING("The bracer clamps securely around your forearm and beeps in a comfortable, familiar way."))
else
to_chat(wearer, SPAN_WARNING("The bracer clamps painfully around your forearm and beeps angrily. It won't come off!"))
if(wearer)
if(isyautja(wearer))
to_chat(wearer, SPAN_WARNING("The bracer clamps securely around your forearm and beeps in a comfortable, familiar way."))
else
to_chat(wearer, SPAN_WARNING("The bracer clamps painfully around your forearm and beeps angrily. It won't come off!"))
return TRUE

/obj/item/clothing/gloves/yautja/proc/unlock_bracer(mob/wearer)
flags_item &= ~NODROP
flags_inventory &= ~CANTSTRIP
if(wearer)
if(!isyautja(wearer))
to_chat(wearer, SPAN_WARNING("The bracer beeps pleasantly, releasing its grip on your forearm."))
else
to_chat(wearer, SPAN_WARNING("With an angry blare, the bracer releases your forearm."))
return TRUE
Loading