Wait for daemon state after inventory requests
This commit is contained in:
parent
d9d2a1d3c4
commit
8848463b49
3 changed files with 19 additions and 8 deletions
|
|
@ -138,8 +138,7 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler
|
|||
{
|
||||
if(_displayedEntity is Ship ship)
|
||||
{
|
||||
if (GameManager.RequestDockedCurrentShip(ship))
|
||||
Current.targetGraphic.color = ToggleEnabledColor;
|
||||
GameManager.RequestDockedCurrentShip(ship);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -187,8 +186,7 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler
|
|||
var price = blueprint.Price(GameManager.ItemManager);
|
||||
return ($"{template.Name} - {price:n0}", () =>
|
||||
{
|
||||
if (GameManager.RequestRuntimeLoadoutRestore(template, out var entity) && entity != null)
|
||||
Display(entity);
|
||||
GameManager.RequestRuntimeLoadoutRestore(template);
|
||||
}, true);
|
||||
}
|
||||
|
||||
|
|
@ -258,8 +256,7 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler
|
|||
var restoreCommand = AetheriaRuntimeInventoryDropdownSurfaceBuilder.LoadoutCommand(loadoutEntry.templateIndex);
|
||||
_dropdownCommands[restoreCommand] = () =>
|
||||
{
|
||||
if (GameManager.RequestRuntimeLoadoutRestore(loadoutEntry.template, out var entity) && entity != null)
|
||||
Display(entity);
|
||||
GameManager.RequestRuntimeLoadoutRestore(loadoutEntry.template);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue