Route loadout restore through checkpoints
This commit is contained in:
parent
f58e738cf8
commit
8d802ce1e0
5 changed files with 99 additions and 11 deletions
|
|
@ -198,16 +198,8 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler
|
|||
var price = blueprint.Price(GameManager.ItemManager);
|
||||
return ($"{template.Name} - {price:n0}", () =>
|
||||
{
|
||||
var entity = EntityConstructionBlueprintProjector.InstantiateFromBlueprint(GameManager.ItemManager, GameManager.Zone, blueprint, true);
|
||||
entity.SetParent(GameManager.DockedEntity);
|
||||
GameManager.Credits -= price;
|
||||
GameManager.CurrentEntity = entity;
|
||||
if(entity is Ship ship)
|
||||
{
|
||||
ship.IsPlayerShip = true;
|
||||
GameManager.DockingBay.DockedShip = ship;
|
||||
}
|
||||
Display(entity);
|
||||
if (GameManager.CommitRuntimeLoadoutRestore(template, out var entity))
|
||||
Display(entity);
|
||||
}, price < GameManager.Credits);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue