[MIRROR] Return on place shuttle rotating. No more shuttle crashing on rotating. and one tile shifting. (#859)

* Fix shuttles being destroyed if piloted too close to where they already were (#53631)

Return on place shuttle rotating.
No more shuttle crashing on rotating. and one tile shifting.

Shuttles no more able move stationary docking ports.

Reverts #53133
Shuttle hulk fix.
fixes #47764
fixes #45853

Add destroying of custom dock on shuttle_docker Destroy.

* Return on place shuttle rotating. No more shuttle crashing on rotating. and one tile shifting.

Co-authored-by: Dennok <Deneles@yandex.ru>
This commit is contained in:
SkyratBot
2020-09-18 05:15:29 +02:00
committed by GitHub
co-authored by Dennok
parent efd9ccc2c6
commit 443fa7c3ff
2 changed files with 26 additions and 4 deletions
+10 -2
View File
@@ -36,6 +36,14 @@
. = ..()
GLOB.navigation_computers -= src
if(my_port && my_port.get_docked())
my_port.delete_after = TRUE
my_port.id = null
my_port.name = "Old [my_port.name]"
my_port = null
else
QDEL_NULL(my_port)
/obj/machinery/computer/camera_advanced/shuttle_docker/attack_hand(mob/user)
if(jammed)
to_chat(user, "<span class='warning'>The Syndicate is jamming the console!</span>")
@@ -227,9 +235,9 @@
// Too close to the map edge is never allowed
if(!T || T.x <= 10 || T.y <= 10 || T.x >= world.maxx - 10 || T.y >= world.maxy - 10)
return SHUTTLE_DOCKER_BLOCKED
/* // If it's one of our shuttle areas assume it's ok to be there
// If it's one of our shuttle areas assume it's ok to be there
if(shuttle_port.shuttle_areas[T.loc])
return SHUTTLE_DOCKER_LANDING_CLEAR */
return SHUTTLE_DOCKER_LANDING_CLEAR
. = SHUTTLE_DOCKER_LANDING_CLEAR
// See if the turf is hidden from us
var/list/hidden_turf_info
+16 -2
View File
@@ -371,10 +371,24 @@ All ShuttleMove procs go here
if(moving_dock == src)
. |= MOVE_CONTENTS
/obj/docking_port/stationary/onShuttleMove(turf/newT, turf/oldT, list/movement_force, move_dir, obj/docking_port/stationary/old_dock, obj/docking_port/mobile/moving_dock)
// Never move the stationary docking port, otherwise things get WEIRD
/obj/docking_port/stationary/onShuttleMove()
return FALSE
// Special movable stationary port, for your mothership shenanigans
/obj/docking_port/stationary/movable/onShuttleMove(turf/newT, turf/oldT, list/movement_force, move_dir, obj/docking_port/stationary/old_dock, obj/docking_port/mobile/moving_dock)
if(!moving_dock.can_move_docking_ports || old_dock == src)
return FALSE
. = ..()
if(newT == oldT) // In case of in place shuttle rotation shenanigans.
return
if(loc != oldT) // This is for multi tile objects
return
loc = newT
return TRUE
/obj/docking_port/stationary/public_mining_dock/onShuttleMove(turf/newT, turf/oldT, list/movement_force, move_dir, obj/docking_port/stationary/old_dock, obj/docking_port/mobile/moving_dock)
id = "mining_public" //It will not move with the base, but will become enabled as a docking point.