[MIRROR] Transit space refactor (#7130)

* Transit space refactor

* Update bitfields.dm
This commit is contained in:
CitadelStationBot
2018-06-18 13:51:02 -05:00
committed by kevinz000
parent 389e9584a3
commit 03a22ca16d
19 changed files with 241 additions and 163 deletions
+3 -3
View File
@@ -16,7 +16,7 @@
// The area that gets placed under where the shuttle moved from
var/underlying_area_type = SHUTTLE_DEFAULT_UNDERLYING_AREA
if(old_dock) //Dock overwrites
underlying_area_type = old_dock.area_type
@@ -105,7 +105,7 @@
list/areas_to_move,
rotation,
)
for(var/i in 1 to old_turfs.len)
CHECK_TICK
var/turf/oldT = old_turfs[i]
@@ -173,7 +173,7 @@
movement_direction,
area/underlying_old_area,
)
underlying_old_area.afterShuttleMove()
// Parallax handling
+8 -17
View File
@@ -202,7 +202,7 @@
/obj/docking_port/stationary/transit
name = "In Transit"
var/list/turf/assigned_turfs = list()
var/datum/turf_reservation/reserved_area
var/area/shuttle/transit/assigned_area
var/obj/docking_port/mobile/owner
@@ -210,14 +210,6 @@
. = ..()
SSshuttle.transit += src
/obj/docking_port/stationary/transit/proc/dezone()
for(var/i in 1 to assigned_turfs.len)
var/turf/T = assigned_turfs[i]
if(istype(T, /turf/open/space/transit))
T.ChangeTurf(/turf/open/space)
T.assemble_baseturfs(initial(T.baseturfs))
T.flags_1 |= UNUSED_TRANSIT_TURF_1
/obj/docking_port/stationary/transit/Destroy(force=FALSE)
if(force)
if(get_docked())
@@ -227,11 +219,10 @@
if(owner.assigned_transit == src)
owner.assigned_transit = null
owner = null
if(assigned_turfs)
dezone()
assigned_turfs.Cut()
assigned_turfs = null
. = ..()
if(!QDELETED(reserved_area))
qdel(reserved_area)
reserved_area = null
return ..()
/obj/docking_port/mobile
name = "shuttle"
@@ -282,7 +273,7 @@
SSshuttle.mobile -= src
destination = null
previous = null
assigned_transit = null
QDEL_NULL(assigned_transit) //don't need it where we're goin'!
shuttle_areas = null
remove_ripples()
. = ..()
@@ -433,7 +424,7 @@
underlying_area_type = current_dock.area_type
var/list/old_turfs = return_ordered_turfs(x, y, z, dir)
var/area/underlying_area
for(var/i in GLOB.sortedAreas)
var/area/place = i
@@ -451,7 +442,7 @@
underlying_area.contents += oldT
oldT.change_area(old_area, underlying_area)
oldT.empty(FALSE)
// Here we locate the bottomost shuttle boundary and remove all turfs above it
var/list/baseturf_cache = oldT.baseturfs
for(var/k in 1 to length(baseturf_cache))