diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm
index 5bf36debee6..5900d91bea3 100644
--- a/code/modules/shuttle/shuttle.dm
+++ b/code/modules/shuttle/shuttle.dm
@@ -444,7 +444,7 @@
A0.contents += T0
//move or squish anything in the way ship at destination
- roadkill(L1, S1.dir)
+ roadkill(L0, L1, S1.dir)
var/list/door_unlock_list = list()
@@ -570,13 +570,7 @@
/obj/effect/landmark/shuttle_import
name = "Shuttle Import"
-/* commented out due to issues with rotation
- for(var/obj/docking_port/stationary/transit/S in shuttle_master.transit)
- if(S.id)
- continue
- if(!canDock(S))
- return S
-*/
+
//shuttle-door closing is handled in the dock() proc whilst looping through turfs
diff --git a/code/modules/shuttle/shuttle_manipulator.dm b/code/modules/shuttle/shuttle_manipulator.dm
index 1cb4293be8c..b69d219161b 100644
--- a/code/modules/shuttle/shuttle_manipulator.dm
+++ b/code/modules/shuttle/shuttle_manipulator.dm
@@ -1,6 +1,8 @@
#define SHUTTLE_MANIPULATOR_STATUS 1
#define SHUTTLE_MANIPULATOR_TEMPLATE 2
#define SHUTTLE_MANIPULATOR_MOD 3
+#define NUM_SHUTTLE_MANIPULATOR_TABS 3
+
/obj/machinery/shuttle_manipulator
name = "shuttle manipulator"
@@ -41,9 +43,10 @@
/obj/machinery/shuttle_manipulator/process()
return
-/obj/machinery/shuttle_manipulator/attack_ghost(mob/user as mob)
- user.set_machine(src)
- interact(user)
+/obj/machinery/shuttle_manipulator/attack_ghost(user as mob)
+ if(!is_admin(user))
+ return
+ attack_hand(user)
/obj/machinery/shuttle_manipulator/attack_hand(mob/user as mob)
user.set_machine(src)
@@ -89,9 +92,9 @@
var/dat = ""
dat += "
"
- dat += "Status"
- dat += "Templates"
- dat += "Modification"
+ dat += "Status"
+ dat += "Templates"
+ dat += "Modification"
dat += ""
dat += "
"
@@ -118,7 +121,7 @@
dat += "Load Template"
dat += "Select Template"
dat += "Preview Template"
- dat += ""
+ dat += "
"
dat += ""
if(SHUTTLE_MANIPULATOR_MOD)
dat += ""
@@ -127,8 +130,9 @@
dat += "
[shuttle["name"]] [shuttle["id"]]
[shuttle["description"]]
[shuttle["admin_notes"]]
"
dat += "
Send to port"
dat += "
Jump To"
- dat += "
"
+ dat += "
"
dat += ""
+ dat += ""
var/datum/browser/popup = new(user, "shuttle manipulator", "Shuttle Manipulator", 500, 500)
popup.set_content(dat)
@@ -140,6 +144,9 @@
if(..())
return
+ for(var/thing in href_list)
+ log_debug("[thing]: [href_list[thing]]")
+
var/mob/user = usr
// Preload some common parameters
@@ -152,13 +159,12 @@
selected = S
. = TRUE
if(href_list["jump_to"])
- if(href_list["type"] == "mobile")
- . = TRUE
- for(var/i in shuttle_master.mobile)
- var/obj/docking_port/mobile/M = i
- if(M.id == href_list["id"])
- user.forceMove(get_turf(M))
- break
+ . = TRUE
+ for(var/i in shuttle_master.mobile)
+ var/obj/docking_port/mobile/M = i
+ if(M.id == href_list["id"])
+ user.forceMove(get_turf(M))
+ break
if(href_list["preview"])
if(S)
@@ -181,6 +187,14 @@
var/mdp = action_load(S)
if(mdp)
user.forceMove(get_turf(mdp))
+ if(href_list["tabchange"])
+ var/newtab = text2num(href_list["tab"])
+ // I am NOT making this take like 10 lines
+ if(!(newtab in list(1,2,3)))
+ log_debug("[newtab] is not a valid tab ID!")
+ return
+ . = TRUE
+ current_tab = round(newtab)
/obj/machinery/shuttle_manipulator/proc/action_load(
datum/map_template/shuttle/loading_template)
@@ -280,9 +294,9 @@
if(!found)
var/msg = "load_template(): Shuttle Template [S.mappath] has no \
mobile docking port. Aborting import."
- //for(var/T in affected)//wot do?
- // var/turf/T0 = T
- // T0.empty()
+ for(var/T in affected)//wot do?
+ var/turf/T0 = T
+ T0.contents = null
message_admins(msg)
WARNING(msg)