push
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/obj/docking_port/mobile/arrivals
|
||||
name = "arrivals shuttle"
|
||||
id = "arrivals"
|
||||
shuttle_id = "arrivals"
|
||||
|
||||
dwidth = 3
|
||||
width = 7
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/docking_port/mobile/assault_pod
|
||||
name = "assault pod"
|
||||
id = "steel_rain"
|
||||
shuttle_id = "steel_rain"
|
||||
dwidth = 3
|
||||
width = 7
|
||||
height = 7
|
||||
@@ -46,7 +46,7 @@
|
||||
if(!T)
|
||||
return
|
||||
var/obj/docking_port/stationary/landing_zone = new /obj/docking_port/stationary(T)
|
||||
landing_zone.id = "assault_pod([REF(src)])"
|
||||
landing_zone.shuttle_id = "assault_pod([REF(src)])"
|
||||
landing_zone.name = "Landing Zone"
|
||||
landing_zone.dwidth = dwidth
|
||||
landing_zone.dheight = dheight
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
for(var/obj/machinery/computer/shuttle/S in GLOB.machines)
|
||||
if(S.shuttleId == shuttle_id)
|
||||
S.possible_destinations = "[landing_zone.id]"
|
||||
S.possible_destinations = "[landing_zone.shuttle_id]"
|
||||
|
||||
to_chat(user, "Landing zone set.")
|
||||
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
else
|
||||
data["status"] = M.mode == SHUTTLE_IGNITING ? "Igniting" : M.mode != SHUTTLE_IDLE ? "In Transit" : "Idle"
|
||||
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
|
||||
if(!options.Find(S.id))
|
||||
if(!options.Find(S.shuttle_id))
|
||||
continue
|
||||
if(!M.check_dock(S, silent = TRUE))
|
||||
continue
|
||||
var/list/location_data = list(
|
||||
id = S.id,
|
||||
id = S.shuttle_id,
|
||||
name = S.name
|
||||
)
|
||||
data["locations"] += list(location_data)
|
||||
@@ -120,4 +120,4 @@
|
||||
|
||||
/obj/machinery/computer/shuttle/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE)
|
||||
if(port && (shuttleId == initial(shuttleId) || override))
|
||||
shuttleId = port.id
|
||||
shuttleId = port.shuttle_id
|
||||
|
||||
@@ -58,12 +58,12 @@
|
||||
data["calculated_cooldown"] = calculated_cooldown
|
||||
data["locations"] = list()
|
||||
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
|
||||
if(!options.Find(S.id))
|
||||
if(!options.Find(S.shuttle_id))
|
||||
continue
|
||||
if(!M.check_dock(S, silent = TRUE))
|
||||
continue
|
||||
var/list/location_data = list(
|
||||
id = S.id,
|
||||
id = S.shuttle_id,
|
||||
name = S.name,
|
||||
dist = round(calculateDistance(S))
|
||||
)
|
||||
@@ -217,7 +217,7 @@
|
||||
|
||||
/obj/machinery/computer/custom_shuttle/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE)
|
||||
if(port && (shuttleId == initial(shuttleId) || override))
|
||||
linkShuttle(port.id)
|
||||
linkShuttle(port.shuttle_id)
|
||||
|
||||
//Custom shuttle docker locations
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/custom
|
||||
@@ -230,7 +230,7 @@
|
||||
/turf/open/floor/plating/ashplanet,
|
||||
/turf/open/floor/plating/asteroid,
|
||||
/turf/open/floor/plating/lavaland_baseturf)
|
||||
jumpto_ports = list("whiteship_home" = 1)
|
||||
jump_to_ports = list("whiteship_home" = 1)
|
||||
view_range = 12
|
||||
designate_time = 100
|
||||
circuit = /obj/item/circuitboard/computer/shuttle/docker
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/docking_port/mobile/elevator
|
||||
name = "elevator"
|
||||
id = "elevator"
|
||||
shuttle_id = "elevator"
|
||||
dwidth = 3
|
||||
width = 7
|
||||
height = 7
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
|
||||
/obj/docking_port/mobile/emergency
|
||||
name = "emergency shuttle"
|
||||
id = "emergency"
|
||||
shuttle_id = "emergency"
|
||||
|
||||
dwidth = 9
|
||||
width = 22
|
||||
@@ -507,7 +507,7 @@
|
||||
|
||||
/obj/docking_port/mobile/pod
|
||||
name = "escape pod"
|
||||
id = "pod"
|
||||
shuttle_id = "pod"
|
||||
dwidth = 1
|
||||
width = 3
|
||||
height = 4
|
||||
@@ -576,7 +576,7 @@
|
||||
|
||||
/obj/docking_port/stationary/random
|
||||
name = "escape pod"
|
||||
id = "pod"
|
||||
shuttle_id = "pod"
|
||||
dwidth = 1
|
||||
width = 3
|
||||
height = 4
|
||||
@@ -601,7 +601,7 @@
|
||||
return
|
||||
|
||||
// Fallback: couldn't find anything
|
||||
WARNING("docking port '[id]' could not be randomly placed in [target_area]: of [original_len] turfs, none were suitable")
|
||||
WARNING("docking port '[shuttle_id]' could not be randomly placed in [target_area]: of [original_len] turfs, none were suitable")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/docking_port/stationary/random/icemoon
|
||||
@@ -650,7 +650,7 @@
|
||||
|
||||
/obj/docking_port/mobile/emergency/backup
|
||||
name = "backup shuttle"
|
||||
id = "backup"
|
||||
shuttle_id = "backup"
|
||||
dwidth = 2
|
||||
width = 8
|
||||
height = 8
|
||||
|
||||
@@ -3,19 +3,22 @@
|
||||
desc = "Used to designate a precise transit location for a spacecraft."
|
||||
jump_action = null
|
||||
should_supress_view_changes = FALSE
|
||||
var/datum/action/innate/shuttledocker_rotate/rotate_action = new
|
||||
var/datum/action/innate/shuttledocker_place/place_action = new
|
||||
|
||||
var/shuttleId = ""
|
||||
var/shuttlePortId = ""
|
||||
var/shuttlePortName = "custom location"
|
||||
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
|
||||
/// Hashset of ports to jump to and ignore for collision purposes
|
||||
var/list/jump_to_ports = list()
|
||||
/// The custom docking port placed by this console
|
||||
var/obj/docking_port/stationary/my_port
|
||||
/// The mobile docking port of the connected shuttle
|
||||
var/obj/docking_port/mobile/shuttle_port
|
||||
// Traits forbided for custom docking
|
||||
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
|
||||
var/list/whitelist_turfs = list(/turf/open/space, /turf/open/floor/plating, /turf/open/lava)
|
||||
var/list/whitelist_turfs = list(/turf/open/space, /turf/open/floor/plating, /turf/open/lava, /turf/open/openspace)
|
||||
var/space_turfs_only = TRUE
|
||||
var/see_hidden = FALSE
|
||||
var/designate_time = 0
|
||||
@@ -24,37 +27,52 @@
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/Initialize(mapload)
|
||||
. = ..()
|
||||
actions += new /datum/action/innate/shuttledocker_rotate(src)
|
||||
actions += new /datum/action/innate/shuttledocker_place(src)
|
||||
|
||||
GLOB.navigation_computers += src
|
||||
whitelist_turfs = typecacheof(whitelist_turfs)
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/Destroy()
|
||||
. = ..()
|
||||
if(my_port?.get_docked())
|
||||
my_port.delete_after = TRUE
|
||||
my_port.shuttle_id = null
|
||||
my_port.name = "Old [my_port.name]"
|
||||
my_port = null
|
||||
else
|
||||
QDEL_NULL(my_port)
|
||||
|
||||
GLOB.navigation_computers -= src
|
||||
|
||||
/// "Initializes" any default port ids we have, done so add_jumpable_port can be a proper setter
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/proc/set_init_ports()
|
||||
var/list/init_ports = jump_to_ports.Copy()
|
||||
jump_to_ports = list() //Reset it so we don't get dupes
|
||||
for(var/port_id in init_ports)
|
||||
add_jumpable_port(port_id)
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/proc/add_jumpable_port(port_id)
|
||||
if(!length(jump_to_ports))
|
||||
actions += new /datum/action/innate/camera_jump/shuttle_docker(src)
|
||||
jump_to_ports[port_id] = TRUE
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/proc/remove_jumpable_port(port_id)
|
||||
jump_to_ports -= port_id
|
||||
if(!length(jump_to_ports))
|
||||
var/datum/action/to_remove = locate(/datum/action/innate/camera_jump/shuttle_docker) in actions
|
||||
actions -= to_remove
|
||||
qdel(to_remove)
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(jammed)
|
||||
to_chat(user, "<span class='warning'>The Syndicate is jamming the console!</span>")
|
||||
to_chat(user, span_warning("The Syndicate is jamming the console!"))
|
||||
return
|
||||
if(!shuttle_port && !SSshuttle.getShuttle(shuttleId))
|
||||
to_chat(user,"<span class='warning'>Warning: Shuttle connection severed!</span>")
|
||||
to_chat(user, span_warning("Warning: Shuttle connection severed!"))
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/GrantActions(mob/living/user)
|
||||
if(jumpto_ports.len)
|
||||
jump_action = new /datum/action/innate/camera_jump/shuttle_docker
|
||||
..()
|
||||
|
||||
if(rotate_action)
|
||||
rotate_action.target = user
|
||||
rotate_action.Grant(user)
|
||||
actions += rotate_action
|
||||
|
||||
if(place_action)
|
||||
place_action.target = user
|
||||
place_action.Grant(user)
|
||||
actions += place_action
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/CreateEye()
|
||||
shuttle_port = SSshuttle.getShuttle(shuttleId)
|
||||
if(QDELETED(shuttle_port))
|
||||
@@ -65,14 +83,13 @@
|
||||
var/mob/camera/aiEye/remote/shuttle_docker/the_eye = eyeobj
|
||||
the_eye.setDir(shuttle_port.dir)
|
||||
var/turf/origin = locate(shuttle_port.x + x_offset, shuttle_port.y + y_offset, shuttle_port.z)
|
||||
for(var/V in shuttle_port.shuttle_areas)
|
||||
var/area/A = V
|
||||
for(var/turf/T in A)
|
||||
if(T.z != origin.z)
|
||||
for(var/area/shuttle_area as anything in shuttle_port.shuttle_areas)
|
||||
for(var/turf/shuttle_turf as anything in shuttle_area)
|
||||
if(shuttle_turf.z != origin.z)
|
||||
continue
|
||||
var/image/I = image('icons/effects/alphacolors.dmi', origin, "red")
|
||||
var/x_off = T.x - origin.x
|
||||
var/y_off = T.y - origin.y
|
||||
var/x_off = shuttle_turf.x - origin.x
|
||||
var/y_off = shuttle_turf.y - origin.y
|
||||
I.loc = locate(origin.x + x_off, origin.y + y_off, origin.z) //we have to set this after creating the image because it might be null, and images created in nullspace are immutable.
|
||||
I.layer = ABOVE_NORMAL_TURF_LAYER
|
||||
I.plane = 0
|
||||
@@ -112,45 +129,55 @@
|
||||
var/mob/camera/aiEye/remote/shuttle_docker/the_eye = eyeobj
|
||||
var/landing_clear = checkLandingSpot()
|
||||
if(designate_time && (landing_clear != SHUTTLE_DOCKER_BLOCKED))
|
||||
to_chat(current_user, "<span class='warning'>Targeting transit location, please wait [DisplayTimeText(designate_time)]...</span>")
|
||||
to_chat(current_user, span_warning("Targeting transit location, please wait [DisplayTimeText(designate_time)]..."))
|
||||
designating_target_loc = the_eye.loc
|
||||
var/wait_completed = do_after(current_user, designate_time, designating_target_loc, timed_action_flags = IGNORE_HELD_ITEM, extra_checks = CALLBACK(src, TYPE_PROC_REF(/obj/machinery/computer/camera_advanced/shuttle_docker, canDesignateTarget)))
|
||||
designating_target_loc = null
|
||||
if(!current_user)
|
||||
return
|
||||
if(!wait_completed)
|
||||
to_chat(current_user, "<span class='warning'>Operation aborted.</span>")
|
||||
to_chat(current_user, span_warning("Operation aborted."))
|
||||
return
|
||||
landing_clear = checkLandingSpot()
|
||||
|
||||
if(landing_clear != SHUTTLE_DOCKER_LANDING_CLEAR)
|
||||
switch(landing_clear)
|
||||
if(SHUTTLE_DOCKER_BLOCKED)
|
||||
to_chat(current_user, "<span class='warning'>Invalid transit location</span>")
|
||||
to_chat(current_user, span_warning("Invalid transit location."))
|
||||
if(SHUTTLE_DOCKER_BLOCKED_BY_HIDDEN_PORT)
|
||||
to_chat(current_user, "<span class='warning'>Unknown object detected in landing zone. Please designate another location.</span>")
|
||||
to_chat(current_user, span_warning("Unknown object detected in landing zone. Please designate another location."))
|
||||
return
|
||||
|
||||
///Make one use port that deleted after fly off, to don't lose info that need on to properly fly off.
|
||||
if(my_port?.get_docked())
|
||||
my_port.unregister()
|
||||
my_port.delete_after = TRUE
|
||||
my_port.shuttle_id = null
|
||||
my_port.name = "Old [my_port.name]"
|
||||
my_port = null
|
||||
|
||||
if(!my_port)
|
||||
my_port = new()
|
||||
my_port.unregister()
|
||||
my_port.name = shuttlePortName
|
||||
my_port.id = shuttlePortId
|
||||
my_port.shuttle_id = shuttlePortId
|
||||
my_port.height = shuttle_port.height
|
||||
my_port.width = shuttle_port.width
|
||||
my_port.dheight = shuttle_port.dheight
|
||||
my_port.dwidth = shuttle_port.dwidth
|
||||
my_port.hidden = shuttle_port.hidden
|
||||
my_port.register(TRUE)
|
||||
my_port.setDir(the_eye.dir)
|
||||
my_port.forceMove(locate(eyeobj.x - x_offset, eyeobj.y - y_offset, eyeobj.z))
|
||||
|
||||
if(current_user.client)
|
||||
current_user.client.images -= the_eye.placed_images
|
||||
|
||||
QDEL_LIST(the_eye.placed_images)
|
||||
LAZYCLEARLIST(the_eye.placed_images)
|
||||
|
||||
for(var/V in the_eye.placement_images)
|
||||
var/image/I = V
|
||||
for(var/image/place_spots as anything in the_eye.placement_images)
|
||||
var/image/newI = image('icons/effects/alphacolors.dmi', the_eye.loc, "blue")
|
||||
newI.loc = I.loc //It is highly unlikely that any landing spot including a null tile will get this far, but better safe than sorry.
|
||||
newI.loc = place_spots.loc //It is highly unlikely that any landing spot including a null tile will get this far, but better safe than sorry.
|
||||
newI.layer = ABOVE_OPEN_TURF_LAYER
|
||||
newI.plane = 0
|
||||
newI.mouse_opacity = 0
|
||||
@@ -158,11 +185,11 @@
|
||||
|
||||
if(current_user.client)
|
||||
current_user.client.images += the_eye.placed_images
|
||||
to_chat(current_user, "<span class='notice'>Transit location designated</span>")
|
||||
return
|
||||
to_chat(current_user, span_notice("Transit location designated."))
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/proc/canDesignateTarget()
|
||||
if(!designating_target_loc || !current_user || (eyeobj.loc != designating_target_loc) || (stat & (NOPOWER|BROKEN)) )
|
||||
if(!designating_target_loc || !current_user || (eyeobj.loc != designating_target_loc) || (machine_stat & (NOPOWER|BROKEN)) )
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -230,11 +257,6 @@
|
||||
if(!is_type_in_typecache(turf_type, whitelist_turfs))
|
||||
return SHUTTLE_DOCKER_BLOCKED
|
||||
|
||||
if(length(whitelist_turfs))
|
||||
var/turf_type = hidden_turf_info ? hidden_turf_info[2] : T.type
|
||||
if(!is_type_in_typecache(turf_type, whitelist_turfs))
|
||||
return SHUTTLE_DOCKER_BLOCKED
|
||||
|
||||
// Checking for overlapping dock boundaries
|
||||
for(var/i in 1 to overlappers.len)
|
||||
var/obj/docking_port/port = overlappers[i]
|
||||
@@ -251,29 +273,30 @@
|
||||
return SHUTTLE_DOCKER_BLOCKED
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/proc/update_hidden_docking_ports(list/remove_images, list/add_images)
|
||||
if(!see_hidden && current_user && current_user.client)
|
||||
if(!see_hidden && current_user?.client)
|
||||
current_user.client.images -= remove_images
|
||||
current_user.client.images += add_images
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE)
|
||||
if(port && (shuttleId == initial(shuttleId) || override))
|
||||
shuttleId = port.id
|
||||
shuttlePortId = "[port.id]_custom"
|
||||
shuttleId = port.shuttle_id
|
||||
shuttlePortId = "[port.shuttle_id]_custom"
|
||||
if(dock)
|
||||
jumpto_ports += dock.id
|
||||
add_jumpable_port(dock.shuttle_id)
|
||||
return TRUE
|
||||
|
||||
/mob/camera/aiEye/remote/shuttle_docker
|
||||
visible_icon = FALSE
|
||||
use_static = USE_STATIC_NONE
|
||||
var/list/placement_images = list()
|
||||
var/list/placed_images = list()
|
||||
use_static = FALSE
|
||||
var/list/image/placement_images = list()
|
||||
var/list/image/placed_images = list()
|
||||
|
||||
/mob/camera/aiEye/remote/shuttle_docker/Initialize(mapload, obj/machinery/computer/camera_advanced/origin)
|
||||
src.origin = origin
|
||||
return ..()
|
||||
|
||||
/mob/camera/aiEye/remote/shuttle_docker/setLoc(T)
|
||||
..()
|
||||
/mob/camera/aiEye/remote/shuttle_docker/setLoc(turf/destination, force_update = FALSE)
|
||||
. = ..()
|
||||
var/obj/machinery/computer/camera_advanced/shuttle_docker/console = origin
|
||||
console.checkLandingSpot()
|
||||
|
||||
@@ -289,10 +312,9 @@
|
||||
button_icon_state = "mech_cycle_equip_off"
|
||||
|
||||
/datum/action/innate/shuttledocker_rotate/Activate()
|
||||
if(QDELETED(target) || !isliving(target))
|
||||
if(QDELETED(owner) || !isliving(owner))
|
||||
return
|
||||
var/mob/living/C = target
|
||||
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
|
||||
var/mob/camera/aiEye/remote/remote_eye = owner.remote_control
|
||||
var/obj/machinery/computer/camera_advanced/shuttle_docker/origin = remote_eye.origin
|
||||
origin.rotateLandingSpot()
|
||||
|
||||
@@ -302,25 +324,23 @@
|
||||
button_icon_state = "mech_zoom_off"
|
||||
|
||||
/datum/action/innate/shuttledocker_place/Activate()
|
||||
if(QDELETED(target) || !isliving(target))
|
||||
if(QDELETED(owner) || !isliving(owner))
|
||||
return
|
||||
var/mob/living/C = target
|
||||
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
|
||||
var/mob/camera/aiEye/remote/remote_eye = owner.remote_control
|
||||
var/obj/machinery/computer/camera_advanced/shuttle_docker/origin = remote_eye.origin
|
||||
origin.placeLandingSpot(target)
|
||||
origin.placeLandingSpot(owner)
|
||||
|
||||
/datum/action/innate/camera_jump/shuttle_docker
|
||||
name = "Jump to Location"
|
||||
button_icon_state = "camera_jump"
|
||||
|
||||
/datum/action/innate/camera_jump/shuttle_docker/Activate()
|
||||
if(QDELETED(target) || !isliving(target))
|
||||
if(QDELETED(owner) || !isliving(owner))
|
||||
return
|
||||
var/mob/living/C = target
|
||||
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
|
||||
var/mob/camera/aiEye/remote/remote_eye = owner.remote_control
|
||||
var/obj/machinery/computer/camera_advanced/shuttle_docker/console = remote_eye.origin
|
||||
|
||||
playsound(console, 'sound/machines/terminal_prompt_deny.ogg', 25, 0)
|
||||
playsound(console, 'sound/machines/terminal_prompt_deny.ogg', 25, FALSE)
|
||||
|
||||
var/list/L = list()
|
||||
for(var/V in SSshuttle.stationary)
|
||||
@@ -330,7 +350,7 @@
|
||||
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])
|
||||
if(console.jump_to_ports[S.shuttle_id])
|
||||
L["([L.len])[S.name]"] = S
|
||||
|
||||
for(var/V in SSshuttle.beacons)
|
||||
@@ -345,18 +365,19 @@
|
||||
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
|
||||
if(QDELETED(src) || QDELETED(target) || !isliving(target))
|
||||
playsound(console, 'sound/machines/terminal_prompt.ogg', 25, FALSE)
|
||||
var/selected = tgui_input_list(usr, "Choose location to jump to", "Locations", sort_list(L))
|
||||
if(isnull(selected))
|
||||
playsound(console, 'sound/machines/terminal_prompt_deny.ogg', 25, FALSE)
|
||||
return
|
||||
playsound(src, "terminal_type", 25, 0)
|
||||
if(selected)
|
||||
var/turf/T = get_turf(L[selected])
|
||||
if(T)
|
||||
playsound(console, 'sound/machines/terminal_prompt_confirm.ogg', 25, 0)
|
||||
remote_eye.setLoc(T)
|
||||
to_chat(target, "<span class='notice'>Jumped to [selected]</span>")
|
||||
C.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/tiled/flash/static)
|
||||
C.clear_fullscreen("flash", 3)
|
||||
else
|
||||
playsound(console, 'sound/machines/terminal_prompt_deny.ogg', 25, 0)
|
||||
if(QDELETED(src) || QDELETED(owner) || !isliving(owner))
|
||||
return
|
||||
playsound(src, "terminal_type", 25, FALSE)
|
||||
var/turf/T = get_turf(L[selected])
|
||||
if(isnull(T))
|
||||
return
|
||||
playsound(console, 'sound/machines/terminal_prompt_confirm.ogg', 25, FALSE)
|
||||
remote_eye.setLoc(T)
|
||||
to_chat(owner, span_notice("Jumped to [selected]."))
|
||||
owner.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/tiled/flash/static)
|
||||
owner.clear_fullscreen("flash", 3)
|
||||
|
||||
@@ -388,7 +388,7 @@ All ShuttleMove procs go here
|
||||
. = ..()
|
||||
|
||||
/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.
|
||||
shuttle_id = "mining_public" //It will not move with the base, but will become enabled as a docking point.
|
||||
|
||||
/obj/effect/abstract/proximity_checker/onShuttleMove(turf/newT, turf/oldT, list/movement_force, move_dir, obj/docking_port/stationary/old_dock, obj/docking_port/mobile/moving_dock)
|
||||
//timer so it only happens once
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/// This will be used in numerous other places like the console,
|
||||
/// stationary ports and whatnot to tell them your ship's mobile
|
||||
/// port can be used in these places, or the docking port is compatible, etc.
|
||||
var/id
|
||||
var/shuttle_id
|
||||
/// Possible destinations
|
||||
var/port_destinations
|
||||
///Common standard is for this to point -away- from the dockingport door, ie towards the ship
|
||||
@@ -171,7 +171,7 @@
|
||||
/obj/docking_port/proc/getDockedId()
|
||||
var/obj/docking_port/P = get_docked()
|
||||
if(P)
|
||||
return P.id
|
||||
return P.shuttle_id
|
||||
|
||||
// Say that A in the absolute (rectangular) bounds of this shuttle or no.
|
||||
/obj/docking_port/proc/is_in_shuttle_bounds(atom/A)
|
||||
@@ -199,28 +199,28 @@
|
||||
|
||||
/obj/docking_port/stationary/register(replace = FALSE)
|
||||
. = ..()
|
||||
if(!id)
|
||||
id = "dock"
|
||||
if(!shuttle_id)
|
||||
shuttle_id = "dock"
|
||||
else
|
||||
port_destinations = id
|
||||
port_destinations = shuttle_id
|
||||
|
||||
if(!name)
|
||||
name = "dock"
|
||||
// how?
|
||||
// It registers the initial shuttle (no changes)
|
||||
// and if another one comes in with the same name (id) it adds the count on it
|
||||
var/counter = SSshuttle.assoc_stationary[id]
|
||||
var/counter = SSshuttle.assoc_stationary[shuttle_id]
|
||||
if(!replace || !counter)
|
||||
if(counter)
|
||||
counter++
|
||||
SSshuttle.assoc_stationary[id] = counter
|
||||
id = "[id]_[counter]"
|
||||
SSshuttle.assoc_stationary[shuttle_id] = counter
|
||||
shuttle_id = "[shuttle_id]_[counter]"
|
||||
name = "[name] [counter]"
|
||||
else
|
||||
SSshuttle.assoc_stationary[id] = 1
|
||||
SSshuttle.assoc_stationary[shuttle_id] = 1
|
||||
|
||||
if(!port_destinations)
|
||||
port_destinations = id
|
||||
port_destinations = shuttle_id
|
||||
|
||||
SSshuttle.stationary += src
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
|
||||
/obj/docking_port/stationary/picked/whiteship
|
||||
name = "Deep Space"
|
||||
id = "whiteship_away"
|
||||
shuttle_id = "whiteship_away"
|
||||
dheight = 0
|
||||
dir = 2
|
||||
dwidth = 11
|
||||
@@ -316,14 +316,14 @@
|
||||
/obj/docking_port/stationary/picked/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!LAZYLEN(shuttlekeys))
|
||||
WARNING("Random docking port [id] loaded with no shuttle keys")
|
||||
WARNING("Random docking port [shuttle_id] loaded with no shuttle keys")
|
||||
return
|
||||
var/selectedid = pick(shuttlekeys)
|
||||
roundstart_template = SSmapping.shuttle_templates[selectedid]
|
||||
|
||||
/obj/docking_port/stationary/picked/whiteship
|
||||
name = "Deep Space"
|
||||
id = "whiteship_away"
|
||||
shuttle_id = "whiteship_away"
|
||||
dheight = 0
|
||||
dir = 2
|
||||
dwidth = 11
|
||||
@@ -382,23 +382,23 @@
|
||||
|
||||
/obj/docking_port/mobile/register(replace = FALSE)
|
||||
. = ..()
|
||||
if(!id)
|
||||
id = "shuttle"
|
||||
if(!shuttle_id)
|
||||
shuttle_id = "shuttle"
|
||||
|
||||
if(!name)
|
||||
name = "shuttle"
|
||||
|
||||
var/counter = SSshuttle.assoc_mobile[id]
|
||||
var/counter = SSshuttle.assoc_mobile[shuttle_id]
|
||||
if(!replace || !counter)
|
||||
if(counter)
|
||||
counter++
|
||||
SSshuttle.assoc_mobile[id] = counter
|
||||
id = "[id]_[counter]"
|
||||
SSshuttle.assoc_mobile[shuttle_id] = counter
|
||||
shuttle_id = "[shuttle_id]_[counter]"
|
||||
name = "[name] [counter]"
|
||||
//Re link machinery to new shuttle id
|
||||
linkup()
|
||||
else
|
||||
SSshuttle.assoc_mobile[id] = 1
|
||||
SSshuttle.assoc_mobile[shuttle_id] = 1
|
||||
|
||||
SSshuttle.mobile += src
|
||||
|
||||
@@ -419,16 +419,16 @@
|
||||
/obj/docking_port/mobile/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
if(!id)
|
||||
id = "shuttle"
|
||||
if(!shuttle_id)
|
||||
shuttle_id = "shuttle"
|
||||
if(!name)
|
||||
name = "shuttle"
|
||||
var/counter = 1
|
||||
var/tmp_id = id
|
||||
var/tmp_id = shuttle_id
|
||||
var/tmp_name = name
|
||||
while(Check_id(id))
|
||||
while(Check_id(shuttle_id))
|
||||
counter++
|
||||
id = "[tmp_id]_[counter]"
|
||||
shuttle_id = "[tmp_id]_[counter]"
|
||||
name = "[tmp_name] [counter]"
|
||||
|
||||
shuttle_areas = list()
|
||||
@@ -559,14 +559,14 @@
|
||||
var/obj/docking_port/stationary/S1 = assigned_transit
|
||||
if(S1)
|
||||
if(initiate_docking(S1) != DOCKING_SUCCESS)
|
||||
WARNING("shuttle \"[id]\" could not enter transit space. Docked at [S0 ? S0.id : "null"]. Transit dock [S1 ? S1.id : "null"].")
|
||||
WARNING("shuttle \"[shuttle_id]\" could not enter transit space. Docked at [S0 ? S0.shuttle_id : "null"]. Transit dock [S1 ? S1.shuttle_id : "null"].")
|
||||
else if(S0)
|
||||
if(S0.delete_after)
|
||||
qdel(S0, TRUE)
|
||||
else
|
||||
previous = S0
|
||||
else
|
||||
WARNING("shuttle \"[id]\" could not enter transit space. S0=[S0 ? S0.id : "null"] S1=[S1 ? S1.id : "null"]")
|
||||
WARNING("shuttle \"[shuttle_id]\" could not enter transit space. S0=[S0 ? S0.shuttle_id : "null"] S1=[S1 ? S1.shuttle_id : "null"]")
|
||||
|
||||
|
||||
/obj/docking_port/mobile/proc/jumpToNullSpace()
|
||||
@@ -866,11 +866,11 @@
|
||||
else
|
||||
dst = destination
|
||||
if(dst)
|
||||
. = "(transit to) [dst.name || dst.id]"
|
||||
. = "(transit to) [dst.name || dst.shuttle_id]"
|
||||
else
|
||||
. = "(transit to) nowhere"
|
||||
else if(dockedAt)
|
||||
. = dockedAt.name || dockedAt.id
|
||||
. = dockedAt.name || dockedAt.shuttle_id
|
||||
else
|
||||
. = "unknown"
|
||||
|
||||
@@ -880,7 +880,7 @@
|
||||
for(var/place in shuttle_areas)
|
||||
var/area/shuttle/shuttle_area = place
|
||||
for(var/obj/machinery/computer/shuttle/S in shuttle_area)
|
||||
if(S.shuttleId == id)
|
||||
if(S.shuttleId == shuttle_id)
|
||||
return S
|
||||
return null
|
||||
|
||||
@@ -1011,7 +1011,7 @@
|
||||
|
||||
/obj/docking_port/mobile/pod/on_emergency_dock()
|
||||
if(launch_status == ENDGAME_LAUNCHED)
|
||||
initiate_docking(SSshuttle.getDock("[id]_away")) //Escape pods dock at centcom
|
||||
initiate_docking(SSshuttle.getDock("[shuttle_id]_away")) //Escape pods dock at centcom
|
||||
mode = SHUTTLE_ENDGAME
|
||||
|
||||
/obj/docking_port/mobile/emergency/on_emergency_dock()
|
||||
|
||||
@@ -184,8 +184,8 @@ GLOBAL_LIST_EMPTY(custom_shuttle_machines) //Machines that require updating (He
|
||||
var/obj/docking_port/stationary/stationary_port = new /obj/docking_port/stationary(get_turf(target))
|
||||
port.callTime = 50
|
||||
port.dir = NORTH //Point away from space.
|
||||
port.id = "custom_[GLOB.custom_shuttle_count]"
|
||||
linkedShuttleId = port.id
|
||||
port.shuttle_id = "custom_[GLOB.custom_shuttle_count]"
|
||||
linkedShuttleId = port.shuttle_id
|
||||
port.ignitionTime = 25
|
||||
port.name = "Custom Shuttle"
|
||||
port.port_direction = 2
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
//============ Actions ============
|
||||
/datum/action/innate/shuttle_creator
|
||||
icon_icon = 'icons/mob/actions/actions_shuttle.dmi'
|
||||
var/mob/living/C
|
||||
var/mob/camera/aiEye/remote/shuttle_creation/remote_eye
|
||||
var/obj/item/shuttle_creator/shuttle_creator
|
||||
|
||||
/datum/action/innate/shuttle_creator/Activate()
|
||||
if(!target)
|
||||
return TRUE
|
||||
C = owner
|
||||
remote_eye = C.remote_control
|
||||
if(QDELETED(owner) || !isliving(owner))
|
||||
return
|
||||
remote_eye = owner.remote_control
|
||||
var/obj/machinery/computer/camera_advanced/shuttle_creator/internal_console = target
|
||||
shuttle_creator = internal_console.owner_rsd
|
||||
|
||||
@@ -77,23 +75,23 @@
|
||||
var/turf/T = get_turf(remote_eye)
|
||||
for(var/obj/machinery/door/airlock/A in T)
|
||||
if(get_area(A) != shuttle_creator.loggedOldArea)
|
||||
to_chat(C, "<span class='warning'>Caution, airlock must be on the shuttle to function as a dock.</span>")
|
||||
to_chat(owner, "<span class='warning'>Caution, airlock must be on the shuttle to function as a dock.</span>")
|
||||
return
|
||||
if(shuttle_creator.linkedShuttleId)
|
||||
return
|
||||
if(GLOB.custom_shuttle_count > CUSTOM_SHUTTLE_LIMIT)
|
||||
to_chat(C, "<span class='warning'>Shuttle limit reached, sorry.</span>")
|
||||
to_chat(owner, "<span class='warning'>Shuttle limit reached, sorry.</span>")
|
||||
return
|
||||
if(shuttle_creator.loggedTurfs.len > SHUTTLE_CREATOR_MAX_SIZE)
|
||||
to_chat(C, "<span class='warning'>This shuttle is too large!</span>")
|
||||
to_chat(owner, "<span class='warning'>This shuttle is too large!</span>")
|
||||
return
|
||||
if(!shuttle_creator.getNonShuttleDirection(T))
|
||||
to_chat(C, "<span class='warning'>Docking port must be on an external wall, with only 1 side exposed to space.</span>")
|
||||
to_chat(owner, "<span class='warning'>Docking port must be on an external wall, with only 1 side exposed to space.</span>")
|
||||
return
|
||||
if(!shuttle_creator.create_shuttle_area(C))
|
||||
if(!shuttle_creator.create_shuttle_area(owner))
|
||||
return
|
||||
if(shuttle_creator.shuttle_create_docking_port(A, C))
|
||||
to_chat(C, "<span class='notice'>Shuttle created!</span>")
|
||||
if(shuttle_creator.shuttle_create_docking_port(A, owner))
|
||||
to_chat(owner, "<span class='notice'>Shuttle created!</span>")
|
||||
//Remove eye control
|
||||
var/obj/machinery/computer/camera_advanced/shuttle_creator/internal_console = target
|
||||
internal_console.remove_eye_control()
|
||||
|
||||
@@ -48,7 +48,7 @@ GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list(
|
||||
|
||||
/obj/docking_port/mobile/supply
|
||||
name = "supply shuttle"
|
||||
id = "supply"
|
||||
shuttle_id = "supply"
|
||||
callTime = 600
|
||||
|
||||
dir = WEST
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
shuttleId = "syndicate"
|
||||
lock_override = CAMERA_LOCK_STATION
|
||||
shuttlePortId = "syndicate_custom"
|
||||
jumpto_ports = list("syndicate_ne" = 1, "syndicate_nw" = 1, "syndicate_n" = 1, "syndicate_se" = 1, "syndicate_sw" = 1, "syndicate_s" = 1)
|
||||
jump_to_ports = list("syndicate_ne" = 1, "syndicate_nw" = 1, "syndicate_n" = 1, "syndicate_se" = 1, "syndicate_sw" = 1, "syndicate_s" = 1)
|
||||
view_range = 5.5
|
||||
x_offset = -7
|
||||
y_offset = -1
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
shuttleId = "whiteship"
|
||||
lock_override = NONE
|
||||
shuttlePortId = "whiteship_custom"
|
||||
jumpto_ports = list("whiteship_away" = 1, "whiteship_home" = 1, "whiteship_z4" = 1)
|
||||
jump_to_ports = list("whiteship_away" = 1, "whiteship_home" = 1, "whiteship_z4" = 1)
|
||||
view_range = 10
|
||||
x_offset = -6
|
||||
y_offset = -10
|
||||
@@ -35,7 +35,7 @@
|
||||
desc = "Used to designate a precise transit location for the Salvage Pod."
|
||||
shuttleId = "whiteship_pod"
|
||||
shuttlePortId = "whiteship_pod_custom"
|
||||
jumpto_ports = list("whiteship_pod_home" = 1)
|
||||
jump_to_ports = list("whiteship_pod_home" = 1)
|
||||
view_range = 0
|
||||
x_offset = -2
|
||||
y_offset = 0
|
||||
|
||||
Reference in New Issue
Block a user