mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 12:13:06 +00:00
Largely ported from the work done at Baystation in https://github.com/Baystation12/Baystation12/pull/17460 and later commits. - Shuttles no longer require a separate area for each location they jump to. Instead destinations are indicated by landmark objects, which are not necessarily exclusive to that shuttle. This means that more than one shuttle could use the same docking port (not at the same time of course). - Enhanced shuttle control computers to use nanoui if they didn't. - Organizes shuttle datum code a bit better so there is less re-inventing the wheel in subtypes. - Allows the possibility of shuttles (or destinations) that start on late-loaded maps. - Deprecate the "extra" shuttle areas that are no longer needed and update shuttle areas in unit tests This all required a bit of infrastructure improvements. - ChangeArea proc, for changing the area of a turf. - Fixed lighting overlays actually being able to be destroyed. - Added a few utility macros and procs. - Added "turf translation" procs which are like move_contents_to but more flexible.
37 lines
2.0 KiB
Plaintext
37 lines
2.0 KiB
Plaintext
/datum/admin_secret_item/admin_secret/jump_shuttle
|
|
name = "Jump a Shuttle"
|
|
|
|
/datum/admin_secret_item/admin_secret/jump_shuttle/can_execute(var/mob/user)
|
|
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 SSshuttles.shuttles
|
|
if (!shuttle_tag) return
|
|
|
|
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_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
|
|
|
|
var/long_jump = alert(user, "Is there a transition area for this jump?","", "Yes", "No")
|
|
if (long_jump == "Yes")
|
|
var/transition_area = input(user, "Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
|
if (!transition_area) return
|
|
|
|
var/move_duration = input(user, "How many seconds will this jump take?") as num
|
|
|
|
S.long_jump(origin_area, destination_area, transition_area, move_duration)
|
|
message_admins("<span class='notice'>[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle</span>", 1)
|
|
log_admin("[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle")
|
|
else
|
|
S.short_jump(origin_area, destination_area)
|
|
message_admins("<span class='notice'>[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle</span>", 1)
|
|
log_admin("[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle")
|