Fixes supply shuttle state when returning

When returning to centcom, the supply shuttle's state was not being set
to INTRANSIT.
This commit is contained in:
mwerezak
2014-10-01 00:48:16 -04:00
parent 6eea41bcc1
commit d81670edfb

View File

@@ -9,7 +9,7 @@
var/max_late_time = 300
/datum/shuttle/ferry/supply/short_jump(var/area/origin,var/area/destination)
if(moving_status != SHUTTLE_IDLE)
if(moving_status != SHUTTLE_IDLE)
return
if(isnull(location))
@@ -20,9 +20,6 @@
if(!origin)
origin = get_location_area(location)
if (!at_station()) //at centcom
supply_controller.buy()
//it would be cool to play a sound here
moving_status = SHUTTLE_WARMUP
spawn(warmup_time*10)
@@ -34,11 +31,15 @@
moving_status = SHUTTLE_IDLE
return
if (!at_station()) //at centcom
supply_controller.buy()
//We pretend it's a long_jump by making the shuttle stay at centcom for the "in-transit" period.
var/area/away_area = get_location_area(away_location)
if (origin == away_area)
moving_status = SHUTTLE_INTRANSIT //pretend
else
moving_status = SHUTTLE_INTRANSIT
//If we are at the away_area then we are just pretending to move, otherwise actually do the move
if (origin != away_area)
move(origin, away_area)
//wait ETA here.