Adds a proc to create a shuttle transit area at runtime (#11453)

* Adds 'dungeons'

* Remove hitler

* Modify maps, last tweaks

* Dynamic transit baby

* Fixes

* Transit dir, remove hitler

* CL

* ..()

* Remove old CL
This commit is contained in:
unid15
2016-08-21 11:07:25 +02:00
committed by clusterfack
parent b26dfcf0d8
commit bacb62d975
10 changed files with 183 additions and 7 deletions

View File

@@ -861,6 +861,7 @@ var/global/floorIsLava = 0
<a href='?src=\ref[src];shuttle_create_destination=1'>Create a destination docking port</a><br>
<a href='?src=\ref[src];shuttle_modify_destination=1'>Add a destination docking port</a><br>
<a href='?src=\ref[src];shuttle_set_transit=1'>Modify transit area</a><br>
<a href='?src=\ref[src];shuttle_generate_transit=1'>Generate new transit area</a><br>
<a href='?src=\ref[src];shuttle_get_console=1'>Get control console</a><br>
<a href='?src=\ref[src];shuttle_edit=1'>Modify parameters[selected_shuttle.is_special() ? " and pre-defined areas" : ""]</a>
<hr>

View File

@@ -4285,6 +4285,34 @@
S.show_outline(usr)
if(href_list["shuttle_generate_transit"])
feedback_inc("admin_shuttle_magic_used",1)
feedback_add_details("admin_shuttle_magic_used","SO")
var/datum/shuttle/S = selected_shuttle
if(!istype(S))
return
var/transit_dir = NORTH
var/list/dirs = list("north"=NORTH, "west"=WEST, "east"=EAST, "south"=SOUTH)
var/choice = input(usr, "Select a direction for the transit area (this should be the direction in which the shuttle is currently facing)", "Transit") as null|anything in dirs
if(!choice)
return
transit_dir = dirs[choice]
var/obj/docking_port/destination/D = generate_transit_area(S, transit_dir)
if(!istype(D))
to_chat(usr, "<span class='notice'>Transit area generation failed!</span>")
return
S.transit_port = D
to_chat(usr, "<span class='info'>Transit area generated successfully.</span>")
if(S.use_transit == NO_TRANSIT)
S.use_transit = TRANSIT_ACROSS_Z_LEVELS
to_chat(usr, "<span class='info'>The [S.name] will now use the transit area when traveling across z-levels. Set its use_transit to 2 to make it always use transit, or 0 to disable transit.</span>")
//------------------------------------------------------------------Shuttle stuff end---------------------------------

View File

@@ -131,7 +131,7 @@
var/datum/map_element/V = vaults[selection]
if(!V.location)
to_chat(src, "[V.file_path] doesn't have a location! Report this")
to_chat(src, "[V.file_path || V.name] doesn't have a location! Report this")
return
usr.forceMove(V.location)