Merge pull request #3145 from Citadel-Station-13/upstream-merge-31255
[MIRROR] Makes shuttle movement a bit smoother and faster
This commit is contained in:
@@ -203,7 +203,7 @@ All ShuttleMove procs go here
|
||||
if(pipe_vision_img)
|
||||
pipe_vision_img.loc = loc
|
||||
|
||||
/obj/machinery/computer/auxillary_base/onShuttleMove(turf/newT, turf/oldT, rotation, list/movement_force, move_dir, old_dock)
|
||||
/obj/machinery/computer/auxillary_base/afterShuttleMove(list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir)
|
||||
. = ..()
|
||||
if(z == ZLEVEL_MINING) //Avoids double logging and landing on other Z-levels due to badminnery
|
||||
SSblackbox.add_details("colonies_dropped", "[x]|[y]|[z]") //Number of times a base has been dropped!
|
||||
@@ -297,24 +297,25 @@ All ShuttleMove procs go here
|
||||
|
||||
/************************************Item move procs************************************/
|
||||
|
||||
/obj/item/storage/pod/onShuttleMove(turf/newT, turf/oldT, rotation, list/movement_force, move_dir, old_dock)
|
||||
/obj/item/storage/pod/afterShuttleMove(turf/newT, turf/oldT, rotation, list/movement_force, move_dir, old_dock)
|
||||
. = ..()
|
||||
unlocked = TRUE
|
||||
// If the pod was launched, the storage will always open.
|
||||
return ..()
|
||||
|
||||
/************************************Mob move procs************************************/
|
||||
|
||||
/mob/onShuttleMove(turf/newT, turf/oldT, rotation, list/movement_force, move_dir, old_dock)
|
||||
if(!move_on_shuttle)
|
||||
return 0
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(client)
|
||||
. = ..()
|
||||
|
||||
/mob/afterShuttleMove(list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir)
|
||||
. = ..()
|
||||
if(client && movement_force)
|
||||
var/shake_force = max(movement_force["THROW"], movement_force["KNOCKDOWN"])
|
||||
if(buckled)
|
||||
shake_camera(src, 2, 1) // turn it down a bit come on
|
||||
else
|
||||
shake_camera(src, 7, 1)
|
||||
shake_force *= 0.25
|
||||
shake_camera(src, shake_force, 1)
|
||||
|
||||
/mob/living/afterShuttleMove(list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir)
|
||||
. = ..()
|
||||
@@ -373,7 +374,6 @@ All ShuttleMove procs go here
|
||||
|
||||
/obj/docking_port/stationary/public_mining_dock/onShuttleMove(turf/newT, turf/oldT, rotation, list/movement_force, move_dir, old_dock)
|
||||
id = "mining_public" //It will not move with the base, but will become enabled as a docking point.
|
||||
return 0
|
||||
|
||||
/obj/effect/abstract/proximity_checker/onShuttleMove(turf/newT, turf/oldT, rotation, list/movement_force, move_dir, old_dock)
|
||||
//timer so it only happens once
|
||||
|
||||
@@ -553,6 +553,8 @@
|
||||
var/list/moved_atoms = list() //Everything not a turf that gets moved in the shuttle
|
||||
var/list/areas_to_move = list() //unique assoc list of areas on turfs being moved
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
/****************************************All beforeShuttleMove procs*****************************************/
|
||||
var/index = 0
|
||||
for(var/place in old_turfs)
|
||||
@@ -578,6 +580,7 @@
|
||||
areas_to_move[old_area] = TRUE
|
||||
|
||||
old_turfs[place] = move_mode
|
||||
CHECK_TICK
|
||||
|
||||
/*******************************************All onShuttleMove procs******************************************/
|
||||
|
||||
@@ -608,17 +611,28 @@
|
||||
var/turf/oldT = thing
|
||||
var/turf/newT = new_turfs[index]
|
||||
newT.afterShuttleMove(oldT) //turfs
|
||||
CHECK_TICK
|
||||
|
||||
for(var/i in 1 to moved_atoms.len)
|
||||
var/atom/movable/moved_object = moved_atoms[i]
|
||||
moved_object.afterShuttleMove(movement_force, dir, preferred_direction, movement_direction) //atoms
|
||||
CHECK_TICK
|
||||
|
||||
underlying_old_area.afterShuttleMove()
|
||||
|
||||
for(var/thing in areas_to_move)
|
||||
var/area/internal_area = thing
|
||||
internal_area.afterShuttleMove() //areas
|
||||
CHECK_TICK
|
||||
|
||||
// Parallax handling
|
||||
var/new_parallax_dir = FALSE
|
||||
if(istype(new_dock, /obj/docking_port/stationary/transit))
|
||||
new_parallax_dir = preferred_direction
|
||||
for(var/i in shuttle_areas)
|
||||
var/area/place = i
|
||||
place.parallax_movedir = new_parallax_dir
|
||||
CHECK_TICK
|
||||
check_poddoors()
|
||||
new_dock.last_dock_time = world.time
|
||||
setDir(new_dock.dir)
|
||||
|
||||
Reference in New Issue
Block a user