mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
No more multi-Z grabs, + ladder grabbing (#3025)
Grabs break if the mobs aren't on the same Z level. You also take someone you're grabbing up ladders with you.
This commit is contained in:
@@ -288,7 +288,7 @@
|
||||
return 0
|
||||
|
||||
if(affecting)
|
||||
if(!isturf(assailant.loc) || ( !isturf(affecting.loc) || assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1) )
|
||||
if(!isturf(assailant.loc) || ( !isturf(affecting.loc) || assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1) || assailant.z != affecting.z )
|
||||
qdel(src)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -54,9 +54,17 @@
|
||||
var/obj/structure/ladder/target_ladder = getTargetLadder(M)
|
||||
if(!target_ladder)
|
||||
return
|
||||
|
||||
var/obj/item/weapon/grab/G = M.l_hand
|
||||
if (!istype(G))
|
||||
G = M.r_hand
|
||||
|
||||
if(!M.Move(get_turf(src)))
|
||||
to_chat(M, "<span class='notice'>You fail to reach \the [src].</span>")
|
||||
return
|
||||
|
||||
if (istype(G))
|
||||
G.affecting.forceMove(get_turf(src))
|
||||
|
||||
var/direction = target_ladder == target_up ? "up" : "down"
|
||||
|
||||
@@ -66,7 +74,7 @@
|
||||
|
||||
target_ladder.audible_message("<span class='notice'>You hear something coming [direction] \the [src]</span>")
|
||||
|
||||
if(do_after(M, climb_time))
|
||||
if(do_after(M, istype(G) ? (climb_time*2) : climb_time))
|
||||
climbLadder(M, target_ladder)
|
||||
|
||||
/obj/structure/ladder/attack_ghost(var/mob/M)
|
||||
@@ -126,6 +134,11 @@
|
||||
if(!A.CanPass(M, M.loc, 1.5, 0))
|
||||
to_chat(M, "<span class='notice'>\The [A] is blocking \the [src].</span>")
|
||||
return FALSE
|
||||
var/obj/item/weapon/grab/G = M.l_hand
|
||||
if (!istype(G))
|
||||
G = M.r_hand
|
||||
if (istype(G))
|
||||
G.affecting.forceMove(T)
|
||||
return M.Move(T)
|
||||
|
||||
/obj/structure/ladder/CanPass(obj/mover, turf/source, height, airflow)
|
||||
|
||||
Reference in New Issue
Block a user