Moves transit space to separate z level. (#1696)
This commit is contained in:
committed by
kevinz000
parent
2304cb7887
commit
ca2d03a082
@@ -10,7 +10,6 @@
|
||||
/turf/closed/indestructible/riveted,
|
||||
/area/space)
|
||||
"ad" = (
|
||||
/obj/effect/landmark/transit,
|
||||
/turf/open/space,
|
||||
/area/space)
|
||||
"ae" = (
|
||||
|
||||
@@ -38,9 +38,10 @@ Last space-z level = empty
|
||||
#define ZLEVEL_STATION 2
|
||||
#define ZLEVEL_MINING 5
|
||||
#define ZLEVEL_LAVALAND 5
|
||||
#define ZLEVEL_EMPTY_SPACE 11
|
||||
#define ZLEVEL_EMPTY_SPACE 12
|
||||
#define ZLEVEL_TRANSIT 11
|
||||
|
||||
#define ZLEVEL_SPACEMIN 3
|
||||
#define ZLEVEL_SPACEMAX 11
|
||||
#define ZLEVEL_SPACEMAX 12
|
||||
|
||||
#define SPACERUIN_MAP_EDGE_PAD 15
|
||||
@@ -52,5 +52,4 @@ GLOBAL_LIST_EMPTY(awaydestinations) //a list of landmarks that the warpgate can
|
||||
//used by jump-to-area etc. Updated by area/updateName()
|
||||
GLOBAL_LIST_EMPTY(sortedAreas)
|
||||
|
||||
GLOBAL_LIST_EMPTY(transit_markers)
|
||||
GLOBAL_LIST_EMPTY(all_abstract_markers)
|
||||
@@ -50,7 +50,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
var/space_zlevels = list()
|
||||
for(var/i in ZLEVEL_SPACEMIN to ZLEVEL_SPACEMAX)
|
||||
switch(i)
|
||||
if(ZLEVEL_MINING, ZLEVEL_LAVALAND, ZLEVEL_EMPTY_SPACE)
|
||||
if(ZLEVEL_MINING, ZLEVEL_LAVALAND, ZLEVEL_EMPTY_SPACE, ZLEVEL_TRANSIT)
|
||||
continue
|
||||
else
|
||||
space_zlevels += i
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#define HIGHLIGHT_DYNAMIC_TRANSIT 1
|
||||
#define MAX_TRANSIT_REQUEST_RETRIES 10
|
||||
|
||||
SUBSYSTEM_DEF(shuttle)
|
||||
name = "Shuttle"
|
||||
@@ -13,6 +14,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
|
||||
var/list/turf/transit_turfs = list()
|
||||
var/list/transit_requesters = list()
|
||||
var/list/transit_request_failures = list()
|
||||
var/clear_transit = FALSE
|
||||
|
||||
//emergency shuttle stuff
|
||||
@@ -75,12 +77,9 @@ SUBSYSTEM_DEF(shuttle)
|
||||
..()
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/setup_transit_zone()
|
||||
if(GLOB.transit_markers.len == 0)
|
||||
WARNING("No /obj/effect/landmark/transit placed on the map!")
|
||||
return
|
||||
// transit zone
|
||||
var/turf/A = get_turf(GLOB.transit_markers[1])
|
||||
var/turf/B = get_turf(GLOB.transit_markers[2])
|
||||
var/turf/A = get_turf(locate(SHUTTLE_TRANSIT_BORDER,SHUTTLE_TRANSIT_BORDER,ZLEVEL_TRANSIT))
|
||||
var/turf/B = get_turf(locate(world.maxx - SHUTTLE_TRANSIT_BORDER,world.maxy - SHUTTLE_TRANSIT_BORDER,ZLEVEL_TRANSIT))
|
||||
for(var/i in block(A, B))
|
||||
var/turf/T = i
|
||||
T.ChangeTurf(/turf/open/space)
|
||||
@@ -89,11 +88,8 @@ SUBSYSTEM_DEF(shuttle)
|
||||
|
||||
#ifdef HIGHLIGHT_DYNAMIC_TRANSIT
|
||||
/datum/controller/subsystem/shuttle/proc/color_space()
|
||||
if(GLOB.transit_markers.len == 0)
|
||||
WARNING("No /obj/effect/landmark/transit placed on the map!")
|
||||
return
|
||||
var/turf/A = get_turf(GLOB.transit_markers[1])
|
||||
var/turf/B = get_turf(GLOB.transit_markers[2])
|
||||
var/turf/A = get_turf(locate(SHUTTLE_TRANSIT_BORDER,SHUTTLE_TRANSIT_BORDER,ZLEVEL_TRANSIT))
|
||||
var/turf/B = get_turf(locate(world.maxx - SHUTTLE_TRANSIT_BORDER,world.maxy - SHUTTLE_TRANSIT_BORDER,ZLEVEL_TRANSIT))
|
||||
for(var/i in block(A, B))
|
||||
var/turf/T = i
|
||||
// Only dying the "pure" space, not the transit tiles
|
||||
@@ -147,7 +143,12 @@ SUBSYSTEM_DEF(shuttle)
|
||||
var/requester = popleft(transit_requesters)
|
||||
var/success = generate_transit_dock(requester)
|
||||
if(!success) // BACK OF THE QUEUE
|
||||
transit_requesters += requester
|
||||
transit_request_failures[requester]++
|
||||
if(transit_request_failures[requester] < MAX_TRANSIT_REQUEST_RETRIES)
|
||||
transit_requesters += requester
|
||||
else
|
||||
var/obj/docking_port/mobile/M = requester
|
||||
M.transit_failure()
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
|
||||
@@ -592,7 +592,7 @@
|
||||
/atom/movable/proc/in_bounds()
|
||||
. = FALSE
|
||||
var/turf/currentturf = get_turf(src)
|
||||
if(currentturf && (currentturf.z == ZLEVEL_CENTCOM || currentturf.z == ZLEVEL_STATION))
|
||||
if(currentturf && (currentturf.z == ZLEVEL_CENTCOM || currentturf.z == ZLEVEL_STATION || currentturf.z == ZLEVEL_TRANSIT))
|
||||
. = TRUE
|
||||
|
||||
|
||||
|
||||
@@ -450,7 +450,7 @@
|
||||
if(istype(SSticker.mode, /datum/game_mode/nuclear))
|
||||
var/obj/docking_port/mobile/Shuttle = SSshuttle.getShuttle("syndicate")
|
||||
var/datum/game_mode/nuclear/NM = SSticker.mode
|
||||
NM.syndies_didnt_escape = (Shuttle && Shuttle.z == ZLEVEL_CENTCOM) ? 0 : 1
|
||||
NM.syndies_didnt_escape = (Shuttle && (Shuttle.z == ZLEVEL_CENTCOM || Shuttle.z == ZLEVEL_TRANSIT)) ? 0 : 1
|
||||
NM.nuke_off_station = off_station
|
||||
|
||||
SSticker.station_explosion_cinematic(off_station,null,src)
|
||||
|
||||
@@ -396,6 +396,16 @@
|
||||
mode = SHUTTLE_ENDGAME
|
||||
timer = 0
|
||||
|
||||
/obj/docking_port/mobile/emergency/transit_failure()
|
||||
..()
|
||||
message_admins("Moving emergency shuttle directly to centcom dock to prevent deadlock.")
|
||||
|
||||
mode = SHUTTLE_ESCAPE
|
||||
launch_status = ENDGAME_LAUNCHED
|
||||
setTimer(SSshuttle.emergencyEscapeTime)
|
||||
priority_announce("The Emergency Shuttle preparing for direct jump. Estimate [timeLeft(600)] minutes until the shuttle docks at Central Command.", null, null, "Priority")
|
||||
|
||||
|
||||
/obj/docking_port/mobile/pod
|
||||
name = "escape pod"
|
||||
id = "pod"
|
||||
|
||||
@@ -316,6 +316,9 @@
|
||||
message_admins(msg)
|
||||
return FALSE
|
||||
|
||||
/obj/docking_port/mobile/proc/transit_failure()
|
||||
message_admins("Shuttle [src] repeatedly failed to create transit zone.")
|
||||
|
||||
//call the shuttle to destination S
|
||||
/obj/docking_port/mobile/proc/request(obj/docking_port/stationary/S)
|
||||
if(!check_dock(S))
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
/obj/effect/landmark/transit
|
||||
name = "transit space marker"
|
||||
desc = "This indicates where transit space begins and ends."
|
||||
invisibility = FALSE
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "at_shield1"
|
||||
|
||||
/obj/effect/landmark/transit/Initialize()
|
||||
. = ..()
|
||||
GLOB.transit_markers += src
|
||||
|
||||
/obj/effect/landmark/transit/Destroy()
|
||||
GLOB.transit_markers -= src
|
||||
. = ..()
|
||||
@@ -2081,7 +2081,6 @@
|
||||
#include "code\modules\shuttle\special.dm"
|
||||
#include "code\modules\shuttle\supply.dm"
|
||||
#include "code\modules\shuttle\syndicate.dm"
|
||||
#include "code\modules\shuttle\transit.dm"
|
||||
#include "code\modules\shuttle\white_ship.dm"
|
||||
#include "code\modules\space_transition\space_transition.dm"
|
||||
#include "code\modules\spells\spell.dm"
|
||||
|
||||
Reference in New Issue
Block a user