mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Remove transit when not in use
Now with pretty colors!
This commit is contained in:
@@ -158,15 +158,26 @@
|
||||
name = "In Transit"
|
||||
turf_type = /turf/open/space/transit
|
||||
var/list/turf/assigned_turfs = list()
|
||||
var/obj/docking_port/mobile/owner
|
||||
|
||||
/obj/docking_port/stationary/transit/New()
|
||||
..()
|
||||
SSshuttle.transit += src
|
||||
|
||||
/obj/docking_port/stationary/transit/proc/dezone()
|
||||
for(var/i in assigned_turfs)
|
||||
var/turf/T = i
|
||||
if(T.type == turf_type)
|
||||
T.ChangeTurf(/turf/open/space)
|
||||
T.flags |= UNUSED_TRANSIT_TURF
|
||||
|
||||
/obj/docking_port/stationary/transit/Destroy(force=FALSE)
|
||||
if(force)
|
||||
SSshuttle.transit -= src
|
||||
if(owner)
|
||||
owner = null
|
||||
if(assigned_turfs)
|
||||
dezone()
|
||||
assigned_turfs.Cut()
|
||||
assigned_turfs = null
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user