Skip to content

Commit

Permalink
Fix asylum shuttle transitions when terrainified (#6165)
Browse files Browse the repository at this point in the history
* Shuttles the destroyers of planets

* Why did I do that, that just... no...

Ha ha ha funny though https://cdn.discordapp.com/attachments/890226559691157524/894435700567597096/unknown.png
  • Loading branch information
Azrun committed Oct 4, 2021
1 parent 6fd79c3 commit a099579
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions code/obj/machinery/computer/shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,17 @@
//Prison -> Station -> Outpost -> Prison.
//Skip outpost if there's a lockdown there.
//drsingh took outpost out for cogmap prison shuttle
var/area/start_location
var/area/end_location
switch(brigshuttle_location)
if(0)
var/area/start_location = locate(/area/shuttle/brig/prison)
var/area/end_location = locate(/area/shuttle/brig/station)
start_location = locate(/area/shuttle/brig/prison)
end_location = locate(/area/shuttle/brig/station)
start_location.move_contents_to(end_location)
brigshuttle_location = 1
if(1)
var/area/start_location = locate(/area/shuttle/brig/station)
var/area/end_location = null
start_location = locate(/area/shuttle/brig/station)
end_location = null
//if(researchshuttle_lockdown)
end_location = locate(/area/shuttle/brig/prison)
//else
Expand All @@ -390,6 +392,11 @@
brigshuttle_location = 0
*/

if(station_repair.station_generator)
var/list/turf/turfs_to_fix = get_area_turfs(start_location)
if(length(turfs_to_fix))
station_repair.repair_turfs(turfs_to_fix)

for(var/obj/machinery/computer/prison_shuttle/C in machine_registry[MACHINES_SHUTTLECOMPS])
active = 0
C.visible_message("<span class='alert'>The Prison Shuttle has Moved!</span>")
Expand Down Expand Up @@ -483,9 +490,6 @@
var/list/turf/turfs_to_fix = get_area_turfs(start_location)
if(length(turfs_to_fix))
station_repair.repair_turfs(turfs_to_fix)
turfs_to_fix = get_area_turfs(end_location)
if(length(turfs_to_fix))
station_repair.repair_turfs(turfs_to_fix)

for(var/obj/machinery/computer/research_shuttle/C in machine_registry[MACHINES_SHUTTLECOMPS])
active = 0
Expand Down Expand Up @@ -588,6 +592,11 @@

start_location.move_contents_to(end_location)

if(station_repair.station_generator)
var/list/turf/turfs_to_fix = get_area_turfs(start_location)
if(length(turfs_to_fix))
station_repair.repair_turfs(turfs_to_fix)

for(var/obj/machinery/computer/asylum_shuttle/C in machine_registry[MACHINES_SHUTTLECOMPS])
C.active = 0
C.shuttle_loc = target_loc
Expand Down

0 comments on commit a099579

Please sign in to comment.