mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-16 21:22:40 +00:00
stuff
This commit is contained in:
@@ -41,73 +41,6 @@
|
||||
pulledby.pulling = null
|
||||
pulledby = null
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
//This proc should never be overridden elsewhere at /atom/movable to keep directions sane.
|
||||
/atom/movable/Move(newloc, direct)
|
||||
if (direct & (direct - 1))
|
||||
if (direct & 1)
|
||||
if (direct & 4)
|
||||
if (step(src, NORTH))
|
||||
step(src, EAST)
|
||||
else
|
||||
if (step(src, EAST))
|
||||
step(src, NORTH)
|
||||
else
|
||||
if (direct & 8)
|
||||
if (step(src, NORTH))
|
||||
step(src, WEST)
|
||||
else
|
||||
if (step(src, WEST))
|
||||
step(src, NORTH)
|
||||
else
|
||||
if (direct & 2)
|
||||
if (direct & 4)
|
||||
if (step(src, SOUTH))
|
||||
step(src, EAST)
|
||||
else
|
||||
if (step(src, EAST))
|
||||
step(src, SOUTH)
|
||||
else
|
||||
if (direct & 8)
|
||||
if (step(src, SOUTH))
|
||||
step(src, WEST)
|
||||
else
|
||||
if (step(src, WEST))
|
||||
step(src, SOUTH)
|
||||
else
|
||||
var/atom/A = src.loc
|
||||
|
||||
var/olddir = dir //we can't override this without sacrificing the rest of movable/New()
|
||||
. = ..()
|
||||
if(direct != olddir)
|
||||
dir = olddir
|
||||
set_dir(direct)
|
||||
|
||||
src.move_speed = world.time - src.l_move_time
|
||||
src.l_move_time = world.time
|
||||
src.m_flag = 1
|
||||
if ((A != src.loc && A && A.z == src.z))
|
||||
src.last_move = get_dir(A, src.loc)
|
||||
if(.)
|
||||
Moved(A, direct)
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////
|
||||
// Here's where we rewrite how byond handles movement except slightly different
|
||||
// To be removed on step_ conversion
|
||||
@@ -156,17 +89,6 @@
|
||||
////////////////////////////////////////
|
||||
|
||||
/atom/movable/Move(atom/newloc, direct)
|
||||
/*
|
||||
var/atom/movable/pullee = pulling
|
||||
var/turf/T = loc
|
||||
if(pulling)
|
||||
if(pullee && get_dist(src, pullee) > 1)
|
||||
stop_pulling()
|
||||
|
||||
if(pullee && pullee.loc != loc && !isturf(pullee.loc) ) //to be removed once all code that changes an object's loc uses forceMove().
|
||||
log_game("DEBUG:[src]'s pull on [pullee] wasn't broken despite [pullee] being in [pullee.loc]. Pull stopped manually.")
|
||||
stop_pulling()
|
||||
*/
|
||||
if(!loc || !newloc)
|
||||
return FALSE
|
||||
var/atom/oldloc = loc
|
||||
@@ -235,21 +157,11 @@
|
||||
if(.)
|
||||
Moved(oldloc, direct)
|
||||
|
||||
/*
|
||||
if(. && pulling && pulling == pullee) //we were pulling a thing and didn't lose it during our move.
|
||||
if(pulling.anchored)
|
||||
stop_pulling()
|
||||
else
|
||||
var/pull_dir = get_dir(src, pulling)
|
||||
//puller and pullee more than one tile away or in diagonal position
|
||||
if(get_dist(src, pulling) > 1 || (moving_diagonally != SECOND_DIAG_STEP && ((pull_dir - 1) & pull_dir)))
|
||||
pulling.Move(T, get_dir(pulling, T)) //the pullee tries to reach our previous position
|
||||
if(pulling && get_dist(src, pulling) > 1) //the pullee couldn't keep up
|
||||
stop_pulling()
|
||||
if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1)//separated from our puller and not in the middle of a diagonal move.
|
||||
pulledby.stop_pulling()
|
||||
*/
|
||||
|
||||
//Polaris stuff
|
||||
move_speed = world.time - l_move_time
|
||||
l_move_time = world.time
|
||||
m_flag = 1
|
||||
//End
|
||||
|
||||
last_move = direct
|
||||
set_dir(direct)
|
||||
|
||||
@@ -171,73 +171,21 @@ var/const/enterloopsanity = 100
|
||||
var/objects = 0
|
||||
if(A && (A.flags & PROXMOVE))
|
||||
for(var/atom/movable/thing in range(1))
|
||||
if(objects > enterloopsanity) break
|
||||
objects++
|
||||
if(objects++ > enterloopsanity) break
|
||||
spawn(0)
|
||||
if(A) //Runtime prevention
|
||||
A.HasProximity(thing, 1)
|
||||
if ((thing && A) && (thing.flags & PROXMOVE))
|
||||
thing.HasProximity(A, 1)
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
/turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area)
|
||||
if(movement_disabled && usr.ckey != movement_disabled_exception)
|
||||
usr << "<span class='warning'>Movement is admin-disabled.</span>" //This is to identify lag problems
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
if (!mover || !isturf(mover.loc))
|
||||
return 1
|
||||
|
||||
//First, check objects to block exit that are not on the border
|
||||
for(var/obj/obstacle in mover.loc)
|
||||
if(!(obstacle.flags & ON_BORDER) && (mover != obstacle) && (forget != obstacle))
|
||||
if(!obstacle.CheckExit(mover, src))
|
||||
mover.Bump(obstacle, 1)
|
||||
return 0
|
||||
|
||||
//Now, check objects to block exit that are on the border
|
||||
for(var/obj/border_obstacle in mover.loc)
|
||||
if((border_obstacle.flags & ON_BORDER) && (mover != border_obstacle) && (forget != border_obstacle))
|
||||
if(!border_obstacle.CheckExit(mover, src))
|
||||
mover.Bump(border_obstacle, 1)
|
||||
return 0
|
||||
|
||||
//Next, check objects to block entry that are on the border
|
||||
for(var/obj/border_obstacle in src)
|
||||
if(border_obstacle.flags & ON_BORDER)
|
||||
if(!border_obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != border_obstacle))
|
||||
mover.Bump(border_obstacle, 1)
|
||||
return 0
|
||||
|
||||
//Then, check the turf itself
|
||||
if (!src.CanPass(mover, src))
|
||||
mover.Bump(src, 1)
|
||||
return 0
|
||||
|
||||
//Finally, check objects/mobs to block entry that are not on the border
|
||||
for(var/atom/movable/obstacle in src)
|
||||
if(!(obstacle.flags & ON_BORDER))
|
||||
if(!obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != obstacle))
|
||||
mover.Bump(obstacle, 1)
|
||||
return 0
|
||||
return 1 //Nothing found to block so return success!
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/turf/Enter(atom/movable/mover, atom/oldloc)
|
||||
if(movement_disabled && usr.ckey != movement_disabled_exception)
|
||||
usr << "<span class='warning'>Movement is admin-disabled.</span>" //This is to identify lag problems
|
||||
return
|
||||
// Do not call ..()
|
||||
// Byond's default turf/Enter() doesn't have the behaviour we want with Bump()
|
||||
// By default byond will call Bump() on the first dense object in contents
|
||||
@@ -273,18 +221,6 @@ var/const/enterloopsanity = 100
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/turf/proc/adjacent_fire_act(turf/simulated/floor/source, temperature, volume)
|
||||
return
|
||||
|
||||
|
||||
@@ -166,10 +166,6 @@
|
||||
if(!loc || !trajectory)
|
||||
return
|
||||
last_projectile_move = world.time
|
||||
if(!nondirectional_sprite && !hitscanning)
|
||||
var/matrix/M = new
|
||||
M.Turn(Angle)
|
||||
transform = M
|
||||
if(homing)
|
||||
process_homing()
|
||||
var/forcemoved = FALSE
|
||||
@@ -301,10 +297,6 @@
|
||||
if(dispersion)
|
||||
setAngle(Angle + rand(-dispersion, dispersion))
|
||||
original_angle = Angle
|
||||
if(!nondirectional_sprite)
|
||||
var/matrix/M = new
|
||||
M.Turn(Angle)
|
||||
transform = M
|
||||
trajectory_ignore_forcemove = TRUE
|
||||
forceMove(starting)
|
||||
trajectory_ignore_forcemove = FALSE
|
||||
@@ -463,7 +455,6 @@
|
||||
return (target && ((target.layer >= TABLE_LAYER) || ismob(target)) && (loc == get_turf(target)) && (!(target in passthrough)))
|
||||
|
||||
/obj/item/projectile/Bump(atom/A)
|
||||
to_chat(world, "DEBUG: Bump([A]) [__LINE__] [__FILE__]")
|
||||
if(A in permutated)
|
||||
return FALSE
|
||||
if(firer && !reflected)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 31 KiB |
Reference in New Issue
Block a user