mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-22 04:28:33 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user