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

Nearby Buckle #752

Merged
merged 3 commits into from
Nov 24, 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
10 changes: 8 additions & 2 deletions code/game/objects/buckling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@
if(!istype(M))
return FALSE

if(check_loc && M.loc != loc)
if(check_loc && !M.Adjacent(src))
return FALSE

if(check_loc && M.loc != loc && !M.Move(loc))
return FALSE

if((!can_buckle && !force) || M.buckled || (length(buckled_mobs) >= max_buckled_mobs) || (buckle_requires_restraints && !M.restrained()) || M == src)
Expand All @@ -72,7 +75,7 @@
qdel(G)

if(!check_loc && M.loc != loc)
M.forceMove(loc)
M.Move(loc) || M.forceMove(loc)

if(!buckle_lying)
M.set_body_position(STANDING_UP)
Expand Down Expand Up @@ -139,6 +142,9 @@
if(M.loc == user.loc || user.alpha == 60) //Alpha is for detecting ranged guardians in scout mode
return //unmanifested guardians shouldn't be able to buckle mobs

if(M != user && (!in_range(M, src) || !do_after(user, 1 SECONDS, target = M)))
return FALSE

add_fingerprint(user)
. = buckle_mob(M, check_loc = check_loc)
if(.)
Expand Down
Loading