Lazily create landable ship's overmap z-level on first use.

- Create the landmark as normal, but instead of allocating a z-level and placing it, register a pre_move listener on the shuttle and setup the z-level only when the shuttle is about to move to its overmap landmark.
- Change when shuttles fire the shuttle_pre_move_event to before calculating translation list to give us a chance to allocate the z-level.
This commit is contained in:
Leshana
2020-04-15 19:20:59 -04:00
parent 0c3126ffad
commit 796c406965
3 changed files with 47 additions and 9 deletions
+1 -1
View File
@@ -42,7 +42,7 @@
if(moving_status == SHUTTLE_INTRANSIT)
return FALSE //already going somewhere, current_location may be an intransit location instead of in a sector
var/our_sector = waypoint_sector(current_location)
if(!our_sector && myship?.landmark && next_location == myship.landmark)
if(myship?.landmark && next_location == myship.landmark)
return TRUE //We're not on the overmap yet (admin spawned probably), and we're trying to hook up with our openspace sector
return get_dist(our_sector, waypoint_sector(next_location)) <= range