mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge branch 'master' into upstream-merge-6762
This commit is contained in:
@@ -2,17 +2,17 @@
|
||||
name = "Jump a Shuttle"
|
||||
|
||||
/datum/admin_secret_item/admin_secret/jump_shuttle/can_execute(var/mob/user)
|
||||
if(!shuttle_controller) return 0
|
||||
if(!SSshuttles) return 0
|
||||
return ..()
|
||||
|
||||
/datum/admin_secret_item/admin_secret/jump_shuttle/execute(var/mob/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/shuttle_tag = input(user, "Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
|
||||
var/shuttle_tag = input(user, "Which shuttle do you want to jump?") as null|anything in SSshuttles.shuttles
|
||||
if (!shuttle_tag) return
|
||||
|
||||
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
|
||||
var/datum/shuttle/S = SSshuttles.shuttles[shuttle_tag]
|
||||
|
||||
var/origin_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
if (!origin_area) return
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Launch a Shuttle"
|
||||
|
||||
/datum/admin_secret_item/admin_secret/launch_shuttle/can_execute(var/mob/user)
|
||||
if(!shuttle_controller) return 0
|
||||
if(!SSshuttles) return 0
|
||||
return ..()
|
||||
|
||||
/datum/admin_secret_item/admin_secret/launch_shuttle/execute(var/mob/user)
|
||||
@@ -10,15 +10,15 @@
|
||||
if(!.)
|
||||
return
|
||||
var/list/valid_shuttles = list()
|
||||
for (var/shuttle_tag in shuttle_controller.shuttles)
|
||||
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
|
||||
for (var/shuttle_tag in SSshuttles.shuttles)
|
||||
if (istype(SSshuttles.shuttles[shuttle_tag], /datum/shuttle/autodock))
|
||||
valid_shuttles += shuttle_tag
|
||||
|
||||
var/shuttle_tag = input(user, "Which shuttle do you want to launch?") as null|anything in valid_shuttles
|
||||
if (!shuttle_tag)
|
||||
return
|
||||
|
||||
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
|
||||
var/datum/shuttle/autodock/S = SSshuttles.shuttles[shuttle_tag]
|
||||
if (S.can_launch())
|
||||
S.launch(user)
|
||||
log_and_message_admins("launched the [shuttle_tag] shuttle", user)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Launch a Shuttle (Forced)"
|
||||
|
||||
/datum/admin_secret_item/admin_secret/launch_shuttle_forced/can_execute(var/mob/user)
|
||||
if(!shuttle_controller) return 0
|
||||
if(!SSshuttles) return 0
|
||||
return ..()
|
||||
|
||||
/datum/admin_secret_item/admin_secret/launch_shuttle_forced/execute(var/mob/user)
|
||||
@@ -10,15 +10,15 @@
|
||||
if(!.)
|
||||
return
|
||||
var/list/valid_shuttles = list()
|
||||
for (var/shuttle_tag in shuttle_controller.shuttles)
|
||||
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
|
||||
for (var/shuttle_tag in SSshuttles.shuttles)
|
||||
if (istype(SSshuttles.shuttles[shuttle_tag], /datum/shuttle/autodock))
|
||||
valid_shuttles += shuttle_tag
|
||||
|
||||
var/shuttle_tag = input(user, "Which shuttle's launch do you want to force?") as null|anything in valid_shuttles
|
||||
if (!shuttle_tag)
|
||||
return
|
||||
|
||||
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
|
||||
var/datum/shuttle/autodock/S = SSshuttles.shuttles[shuttle_tag]
|
||||
if (S.can_force())
|
||||
S.force_launch(user)
|
||||
log_and_message_admins("forced the [shuttle_tag] shuttle", user)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Move a Shuttle"
|
||||
|
||||
/datum/admin_secret_item/admin_secret/move_shuttle/can_execute(var/mob/user)
|
||||
if(!shuttle_controller) return 0
|
||||
if(!SSshuttles) return 0
|
||||
return ..()
|
||||
|
||||
/datum/admin_secret_item/admin_secret/move_shuttle/execute(var/mob/user)
|
||||
@@ -13,16 +13,15 @@
|
||||
if (confirm == "Cancel")
|
||||
return
|
||||
|
||||
var/shuttle_tag = input(user, "Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
|
||||
var/shuttle_tag = input(user, "Which shuttle do you want to jump?") as null|anything in SSshuttles.shuttles
|
||||
if (!shuttle_tag) return
|
||||
|
||||
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
|
||||
var/datum/shuttle/S = SSshuttles.shuttles[shuttle_tag]
|
||||
|
||||
var/origin_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
if (!origin_area) return
|
||||
var/destination_tag = input(user, "Which landmark do you want to jump to? (IF YOU GET THIS WRONG THINGS WILL BREAK)") as null|anything in SSshuttles.registered_shuttle_landmarks
|
||||
if (!destination_tag) return
|
||||
var/destination_location = SSshuttles.get_landmark(destination_tag)
|
||||
if (!destination_location) return
|
||||
|
||||
var/destination_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
if (!destination_area) return
|
||||
|
||||
S.move(origin_area, destination_area)
|
||||
S.attempt_move(destination_location)
|
||||
log_and_message_admins("moved the [shuttle_tag] shuttle", user)
|
||||
|
||||
Reference in New Issue
Block a user