Route docked ship selection through checkpoints
This commit is contained in:
parent
8d802ce1e0
commit
afc7dc3134
5 changed files with 80 additions and 4 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue