diff --git a/code/datums/shuttle.dm b/code/datums/shuttle.dm
index 0cf41851a82..af30b2b1ebd 100644
--- a/code/datums/shuttle.dm
+++ b/code/datums/shuttle.dm
@@ -75,7 +75,7 @@
//When the shuttle moves, if stable is 0 then all unbuckled mobs will be stunned
var/stable = 0
- var/password = 28011
+ var/password = null
var/can_link_to_computer = LINK_FORBIDDEN
//Whether the shuttle gibs or displaces stuff. Change this to COLLISION_DISPLACE to make all shuttles displace stuff by default
@@ -101,8 +101,8 @@
if(istype(linked_area) && linked_area.contents.len) //Only add the shuttle to the list if its area exists and it has something in it
shuttles |= src
-
- password = rand(10000,99999)
+ if(password)
+ password = rand(10000,99999)
//initialize() proc - called automatically in proc/setup_shuttles() below.
//Returns INIT_SUCCESS, INIT_NO_AREA, INIT_NO_START or INIT_NO_PORT, depending on whether there were any errors
@@ -819,6 +819,7 @@
//Custom shuttles
/datum/shuttle/custom
name = "custom shuttle"
+ can_link_to_computer = LINK_FREE
/datum/shuttle/proc/show_outline(var/mob/user, var/turf/centered_at)
if(!user)
diff --git a/code/game/machinery/computer/shuttle_computers.dm b/code/game/machinery/computer/shuttle_computers.dm
index a61e885df93..49d8ebc4e47 100644
--- a/code/game/machinery/computer/shuttle_computers.dm
+++ b/code/game/machinery/computer/shuttle_computers.dm
@@ -186,9 +186,6 @@
span_s = ""
span_e = ""
- if(shuttle && !shuttle.linked_port)
- span_s = ""
- span_e = ""
return "[span_s][name][span_e]"
@@ -224,12 +221,10 @@
dat += "Additional information has not been provided."
else if(!shuttle.linked_area)
dat = "
UNABLE TO FIND [uppertext(shuttle.name)]
"
- else if(!shuttle.linked_port)
- dat += {"This shuttle has no docking port specified.
- Scan for docking ports"}
else if(shuttle.moving)
dat += "Currently moving [shuttle.destination_port.areaname ? "to [shuttle.destination_port.areaname]" : ""]
"
else
+ dat += {"Scan for docking ports
"}
if(shuttle.current_port)
dat += "Location: [shuttle.current_port.areaname]
"
else
@@ -302,6 +297,7 @@
src.add_fingerprint(usr)
if(href_list["move"])
if(!shuttle)
+ to_chat(usr, "No shuttle detected.")
return
if(!allowed(usr))
to_chat(usr, "Access denied.")
@@ -314,9 +310,11 @@
if(!allow_selecting_all && !(selected_port in shuttle.docking_ports))
//Check disks too
if(!disk || !disk.compactible(shuttle) || (disk.destination != selected_port))
+ to_chat(usr, "[!disk?"No disk detected":!disk.compactible(shuttle)?"Current disk not conpatable with current shuttle.":"Currently selected docking port not valid."]")
return
if(selected_port.docked_with) //If used by another shuttle, don't try to move this shuttle
+ to_chat(usr, "Selected port is currently in use.")
return
//Send a message to the shuttle to move
@@ -367,13 +365,15 @@
return
var/list/L = list()
for(var/datum/shuttle/S in shuttles)
- var/name = S.name
- switch(S.can_link_to_computer)
- if(LINK_PASSWORD_ONLY)
- name = "[name] (requires password)"
- if(LINK_FORBIDDEN)
- continue
-
+ var/name
+ if(S.can_link_to_computer == LINK_FORBIDDEN)
+ continue
+ else if(S.can_link_to_computer == LINK_FREE || get_area(src).get_shuttle() == S)
+ name = S.name
+ else if(S.password)
+ name = "[S.name] (requires password)"
+ else
+ continue
L += name
L[name] = S
@@ -383,7 +383,7 @@
if(L[choice] && istype(L[choice],/datum/shuttle))
var/datum/shuttle/S = L[choice]
- if(S.can_link_to_computer == LINK_PASSWORD_ONLY)
+ if(S.password)
var/password_attempt = input(usr,"Please input [capitalize(S.name)]'s interface password:", "Shuttle control console", 00000) as num
if(!Adjacent(usr) && !isAdminGhost(usr) && !isAI(usr))
@@ -444,13 +444,15 @@
var/list/L = list()
for(var/datum/shuttle/S in shuttles)
- var/name = S.name
- switch(S.can_link_to_computer)
- if(LINK_PASSWORD_ONLY)
- name = "[name] (password)"
- if(LINK_FORBIDDEN)
- name = "[name] (private)"
-
+ var/name
+ if(S.can_link_to_computer == LINK_FORBIDDEN)
+ continue
+ else if(S.can_link_to_computer == LINK_FREE || get_area(src).get_shuttle() == S)
+ name = S.name
+ else if(S.password)
+ name = "[S.name] (requires password)"
+ else
+ continue
L += name
L[name] = S
diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm
index 1103e525b13..92cac21add7 100644
--- a/code/game/objects/items/blueprints.dm
+++ b/code/game/objects/items/blueprints.dm
@@ -486,7 +486,7 @@ these cannot rename rooms that are in by default BUT can rename rooms that are c
var/area_size = A.area_turfs.len
var/active_engines = 0
for(var/obj/structure/shuttle/engine/propulsion/DIY/D in A)
- if(D.heater && anchored)
+ if(D.heater && D.anchored)
active_engines++
if(active_engines < 2 || area_size/active_engines > 12.5) //2 engines per 25 tiles, with a minimum of 2 engines.
@@ -496,7 +496,7 @@ these cannot rename rooms that are in by default BUT can rename rooms that are c
var/turf/check_turf = get_step(user, user.dir)
- if(!istype(check_turf, /turf/space))
+ if(get_area(check_turf) == A)
to_chat(user, "This area is not a viable shuttle. Reason: Unable to create docking port at current user location.")
return
@@ -508,7 +508,7 @@ these cannot rename rooms that are in by default BUT can rename rooms that are c
to_chat(user, "Shuttlifying cancelled.")
return
- var/obj/docking_port/shuttle/DP = new /obj/docking_port/shuttle(A.loc)
+ var/obj/docking_port/shuttle/DP = new /obj/docking_port/shuttle(get_turf(src))
DP.dir = user.dir
diff --git a/code/game/shuttle_engines.dm b/code/game/shuttle_engines.dm
index 2fa1753a611..2165b9c7ca1 100644
--- a/code/game/shuttle_engines.dm
+++ b/code/game/shuttle_engines.dm
@@ -48,7 +48,7 @@
/obj/structure/shuttle/engine/heater/DIY/attackby(obj/item/I, mob/user)
if(iswrench(I) && wrenchAnchor(user, 5 SECONDS))
- if(anchored)
+ if(!anchored)
if(connected_engine)
connected_engine.heater = null
connected_engine = null
diff --git a/code/game/shuttles/salvage.dm b/code/game/shuttles/salvage.dm
index 81742f7bf15..450f9008a7b 100644
--- a/code/game/shuttles/salvage.dm
+++ b/code/game/shuttles/salvage.dm
@@ -12,7 +12,7 @@ var/global/datum/shuttle/salvage/salvage_shuttle = new(starting_area=/area/shutt
pre_flight_delay = 30
can_link_to_computer = LINK_PASSWORD_ONLY
-
+ password = TRUE
stable = 1 //Don't stun everyone and don't throw anything when moving
can_rotate = 0 //Sleepers, body scanners and multi-tile airlocks aren't rotated properly