Skip to content

Commit

Permalink
stops people from buckling others when they shouldn't be able to (#6807)
Browse files Browse the repository at this point in the history
# About the pull request

adds checks to stop people from buckling others when they are knocked
out etc.

# Explain why it's good for the game

fixes bug


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
fix: stops people from buckling others when they are knocked out etc.
/:cl:
  • Loading branch information
zzzmike authored Jul 30, 2024
1 parent 386deda commit 4b4d766
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions code/game/objects/objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,11 @@

//trying to buckle a mob
/obj/proc/buckle_mob(mob/M, mob/user)
if (!ismob(M) || (get_dist(src, user) > 1) || user.is_mob_restrained() || user.stat || buckled_mob || M.buckled || !isturf(user.loc))
if (!ismob(M) || (get_dist(src, user) > 1) || user.stat || buckled_mob || M.buckled || !isturf(user.loc))
return

if (user.is_mob_incapacitated() || HAS_TRAIT(user, TRAIT_IMMOBILIZED) || HAS_TRAIT(user, TRAIT_FLOORED))
to_chat(user, SPAN_WARNING("You can't do this right now."))
return

if (isxeno(user) && !HAS_TRAIT(user, TRAIT_OPPOSABLE_THUMBS))
Expand All @@ -286,11 +290,6 @@
if (iszombie(user))
return

// mobs that become immobilized should not be able to buckle themselves.
if(M == user && HAS_TRAIT(user, TRAIT_IMMOBILIZED))
to_chat(user, SPAN_WARNING("You are unable to do this in your current state."))
return

if(density)
density = FALSE
if(!step(M, get_dir(M, src)) && loc != M.loc)
Expand Down

0 comments on commit 4b4d766

Please sign in to comment.