mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Tweak: Nearby Buckle (Second Try) (#22828)
* Tweak: Nearby Buckle * Adjacent * It's definitely better Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com> * Small cleanup Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --------- Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
@@ -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)
|
||||
@@ -135,9 +138,11 @@
|
||||
if(!in_range(user, src) || !isturf(user.loc) || user.incapacitated() || M.anchored)
|
||||
return FALSE
|
||||
|
||||
if(isguardian(user))
|
||||
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(isguardian(user) && (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)
|
||||
|
||||
Reference in New Issue
Block a user