Ports bluespace navigation gigabeaconon
port of https://github.com/tgstation/tgstation/pull/44807
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
var/list/jumpto_ports = list() //hashset of ports to jump to and ignore for collision purposes
|
||||
var/obj/docking_port/stationary/my_port //the custom docking port placed by this console
|
||||
var/obj/docking_port/mobile/shuttle_port //the mobile docking port of the connected shuttle
|
||||
var/list/locked_traits = list(ZTRAIT_RESERVED, ZTRAIT_CENTCOM, ZTRAIT_AWAY, ZTRAIT_REEBE) //traits forbided for custom docking
|
||||
var/view_range = 0
|
||||
var/x_offset = 0
|
||||
var/y_offset = 0
|
||||
@@ -186,7 +187,7 @@
|
||||
var/turf/eyeturf = get_turf(the_eye)
|
||||
if(!eyeturf)
|
||||
return SHUTTLE_DOCKER_BLOCKED
|
||||
if(z_lock.len && !(eyeturf.z in z_lock))
|
||||
if(!eyeturf.z || SSmapping.level_has_any_trait(eyeturf.z, locked_traits))
|
||||
return SHUTTLE_DOCKER_BLOCKED
|
||||
|
||||
. = SHUTTLE_DOCKER_LANDING_CLEAR
|
||||
@@ -224,9 +225,9 @@
|
||||
if(hidden_turf_info)
|
||||
. = SHUTTLE_DOCKER_BLOCKED_BY_HIDDEN_PORT
|
||||
|
||||
if(space_turfs_only)
|
||||
if(length(whitelist_turfs))
|
||||
var/turf_type = hidden_turf_info ? hidden_turf_info[2] : T.type
|
||||
if(!ispath(turf_type, /turf/open/space))
|
||||
if(!is_type_in_typecache(turf_type, whitelist_turfs))
|
||||
return SHUTTLE_DOCKER_BLOCKED
|
||||
|
||||
if(length(whitelist_turfs))
|
||||
@@ -324,12 +325,25 @@
|
||||
var/list/L = list()
|
||||
for(var/V in SSshuttle.stationary)
|
||||
if(!V)
|
||||
stack_trace("SSshuttle.stationary have null entry!")
|
||||
continue
|
||||
var/obj/docking_port/stationary/S = V
|
||||
if(console.z_lock.len && !(S.z in console.z_lock))
|
||||
continue
|
||||
if(console.jumpto_ports[S.id])
|
||||
L[S.name] = S
|
||||
L["([L.len])[S.name]"] = S
|
||||
|
||||
for(var/V in SSshuttle.beacons)
|
||||
if(!V)
|
||||
stack_trace("SSshuttle.beacons have null entry!")
|
||||
continue
|
||||
var/obj/machinery/spaceship_navigation_beacon/nav_beacon = V
|
||||
if(!nav_beacon.z || SSmapping.level_has_any_trait(nav_beacon.z, console.locked_traits))
|
||||
break
|
||||
if(!nav_beacon.locked)
|
||||
L["([L.len]) [nav_beacon.name] located: [nav_beacon.x] [nav_beacon.y] [nav_beacon.z]"] = nav_beacon
|
||||
else
|
||||
L["([L.len]) [nav_beacon.name] locked"] = null
|
||||
|
||||
playsound(console, 'sound/machines/terminal_prompt.ogg', 25, 0)
|
||||
var/selected = input("Choose location to jump to", "Locations", null) as null|anything in L
|
||||
|
||||
Reference in New Issue
Block a user