Route docked ship selection through checkpoints

This commit is contained in:
Meta Vens 2026-06-16 03:43:21 +01:00
commit afc7dc3134
5 changed files with 80 additions and 4 deletions

View file

@ -1336,6 +1336,23 @@ public class ActionGameManager : MonoBehaviour
return true;
}
public bool CommitDockedCurrentShip(Ship ship)
{
if (ship == null ||
!ship.IsPlayerShip ||
DockedEntity == null ||
DockingBay == null ||
!DockedEntity.Children.Contains(ship))
{
return false;
}
CurrentEntity = ship;
DockingBay.DockedShip = ship;
QueueRunCheckpoint("docked-current-ship");
return true;
}
private static AetheriaRuntimeLoadoutTemplateSnapshot CreateRuntimeLoadoutTemplateSnapshot(
AetheriaRuntimeLoadoutTemplateCommit template)
{

View file

@ -119,9 +119,8 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler
{
if(_displayedEntity is Ship ship)
{
GameManager.CurrentEntity = ship;
GameManager.DockingBay.DockedShip = ship;
Current.targetGraphic.color = ToggleEnabledColor;
if (GameManager.CommitDockedCurrentShip(ship))
Current.targetGraphic.color = ToggleEnabledColor;
}
else
{