mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 02:58:45 +01:00
More compat fixes
This commit is contained in:
@@ -621,106 +621,6 @@
|
||||
|
||||
return
|
||||
|
||||
<<<<<<< HEAD
|
||||
// Almost all of this handles pulling movables behind us
|
||||
/mob/living/Move(atom/newloc, direct, movetime)
|
||||
if(buckled && buckled.loc != newloc) //not updating position
|
||||
if(!buckled.anchored && buckled.buckle_movable)
|
||||
return buckled.Move(newloc, direct)
|
||||
else
|
||||
return 0
|
||||
|
||||
var/atom/movable/pullee = pulling
|
||||
// Prior to our move it's already too far away
|
||||
if(pullee && get_dist(src, pullee) > 1)
|
||||
stop_pulling()
|
||||
// Shenanigans! Pullee closed into locker for eg.
|
||||
if(pullee && !isturf(pullee.loc) && pullee.loc != loc)
|
||||
stop_pulling()
|
||||
// Can't pull with no hands
|
||||
if(restrained())
|
||||
stop_pulling()
|
||||
|
||||
// Will move our mob (probably)
|
||||
. = ..() // Moved() called at this point if successful
|
||||
|
||||
if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1) //seperated from our puller and not in the middle of a diagonal move
|
||||
pulledby.stop_pulling()
|
||||
|
||||
if(s_active && !(s_active in contents) && get_turf(s_active) != get_turf(src)) //check !( s_active in contents ) first so we hopefully don't have to call get_turf() so much.
|
||||
s_active.close(src)
|
||||
|
||||
/mob/living/proc/dragged(var/mob/living/dragger, var/oldloc)
|
||||
var/area/A = get_area(src)
|
||||
if(lying && !buckled && pull_damage() && A.has_gravity() && (prob(getBruteLoss() * 200 / maxHealth)))
|
||||
adjustBruteLoss(2)
|
||||
visible_message("<span class='danger'>\The [src]'s [isSynthetic() ? "state" : "wounds"] worsen terribly from being dragged!</span>")
|
||||
|
||||
/mob/living/Moved(var/atom/oldloc, direct, forced, movetime)
|
||||
. = ..()
|
||||
handle_footstep(loc)
|
||||
// Begin VOREstation edit
|
||||
if(is_shifted)
|
||||
is_shifted = FALSE
|
||||
pixel_x = default_pixel_x
|
||||
pixel_y = default_pixel_y
|
||||
// End VOREstation edit
|
||||
|
||||
if(pulling) // we were pulling a thing and didn't lose it during our move.
|
||||
var/pull_dir = get_dir(src, pulling)
|
||||
|
||||
if(pulling.anchored || !isturf(pulling.loc))
|
||||
stop_pulling()
|
||||
|
||||
else if(get_dist(src, pulling) > 1 || (moving_diagonally != SECOND_DIAG_STEP && ((pull_dir - 1) & pull_dir))) // puller and pullee more than one tile away or in diagonal position
|
||||
// If it is too far away or across z-levels from old location, stop pulling.
|
||||
if(get_dist(pulling.loc, oldloc) > 1 || pulling.loc.z != oldloc?.z)
|
||||
stop_pulling()
|
||||
|
||||
// living might take damage from drags
|
||||
else if(isliving(pulling))
|
||||
var/mob/living/M = pulling
|
||||
M.dragged(src, oldloc)
|
||||
|
||||
pulling.Move(oldloc, 0, movetime) // the pullee tries to reach our previous position
|
||||
if(pulling && get_dist(src, pulling) > 1) // the pullee couldn't keep up
|
||||
stop_pulling()
|
||||
|
||||
if(!isturf(loc))
|
||||
return
|
||||
else if(lastarea?.has_gravity == 0)
|
||||
inertial_drift()
|
||||
//VOREStation Edit Start
|
||||
else if(flying)
|
||||
inertial_drift()
|
||||
make_floating(1)
|
||||
//VOREStation Edit End
|
||||
else if(!isspace(loc))
|
||||
inertia_dir = 0
|
||||
make_floating(0)
|
||||
|
||||
/mob/living/proc/inertial_drift()
|
||||
if(x > 1 && x < (world.maxx) && y > 1 && y < (world.maxy))
|
||||
if(Process_Spacemove(1))
|
||||
inertia_dir = 0
|
||||
return
|
||||
|
||||
var/locthen = loc
|
||||
spawn(5)
|
||||
if(!anchored && !pulledby && loc == locthen)
|
||||
var/stepdir = inertia_dir ? inertia_dir : last_move
|
||||
if(!stepdir)
|
||||
return
|
||||
var/turf/T = get_step(src, stepdir)
|
||||
if(!T)
|
||||
return
|
||||
Move(T, stepdir, 5)
|
||||
|
||||
/mob/living/proc/handle_footstep(turf/T)
|
||||
return FALSE
|
||||
|
||||
=======
|
||||
>>>>>>> 47f71b2... Reworks stairs to be sensible (#7783)
|
||||
/mob/living/verb/resist()
|
||||
set name = "Resist"
|
||||
set category = "IC"
|
||||
|
||||
@@ -258,6 +258,12 @@ default behaviour is:
|
||||
/mob/living/Moved(var/atom/oldloc, direct, forced, movetime)
|
||||
. = ..()
|
||||
handle_footstep(loc)
|
||||
// Begin VOREstation edit
|
||||
if(is_shifted)
|
||||
is_shifted = FALSE
|
||||
pixel_x = default_pixel_x
|
||||
pixel_y = default_pixel_y
|
||||
// End VOREstation edit
|
||||
|
||||
if(pulling) // we were pulling a thing and didn't lose it during our move.
|
||||
var/pull_dir = get_dir(src, pulling)
|
||||
@@ -283,6 +289,11 @@ default behaviour is:
|
||||
return
|
||||
else if(lastarea?.has_gravity == 0)
|
||||
inertial_drift()
|
||||
//VOREStation Edit Start
|
||||
else if(flying)
|
||||
inertial_drift()
|
||||
make_floating(1)
|
||||
//VOREStation Edit End
|
||||
else if(!isspace(loc))
|
||||
inertia_dir = 0
|
||||
make_floating(0)
|
||||
|
||||
Reference in New Issue
Block a user