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

stops people from buckling others when they shouldn't be able to #6807

Merged
merged 5 commits into from
Jul 30, 2024
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
11 changes: 5 additions & 6 deletions code/game/objects/objs.dm
Drulikar marked this conversation as resolved.
Show resolved Hide resolved
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
Loading