Derive available entities from observed daemon state
This commit is contained in:
parent
05146a6768
commit
2175cbdd1f
4 changed files with 23 additions and 14 deletions
|
|
@ -1048,7 +1048,7 @@ public class TradeMenu : MonoBehaviour
|
|||
(dockingBay, "Docking Bay");
|
||||
}
|
||||
|
||||
foreach (var ship in GameManager.AvailableEntities()
|
||||
foreach (var ship in GameManager.ObservedAvailableEntities()
|
||||
.OfType<Ship>()
|
||||
.Where(ship => ship.IsPlayerShip)
|
||||
.Select((ship, shipIndex) => (ship, shipIndex)))
|
||||
|
|
@ -1186,7 +1186,7 @@ public class TradeMenu : MonoBehaviour
|
|||
|
||||
private int CountAvailablePlayerShips(string itemKey)
|
||||
{
|
||||
return GameManager.AvailableEntities()
|
||||
return GameManager.ObservedAvailableEntities()
|
||||
.OfType<Ship>()
|
||||
.Count(ship => ship.IsPlayerShip && ship.Hull?.ItemKey == itemKey);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue