mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-11 04:25:55 +00:00
Game state manager and restored inventory
This commit is contained in:
parent
f0f49f8fb4
commit
a0ec2f3d74
27 changed files with 1283 additions and 1175 deletions
|
|
@ -311,39 +311,6 @@ public partial class Hud : CanvasLayer
|
|||
}
|
||||
}
|
||||
|
||||
// public void RemoveInventoryItem(string itemKey, int currentAmount)
|
||||
// {
|
||||
// if (_items.TryGetValue(itemKey, out var itm))
|
||||
// {
|
||||
// if (currentAmount <= 0)
|
||||
// {
|
||||
// itm.Container.QueueFree();
|
||||
// _items.Remove(itemKey);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (itm.Item.UiType == UiItemType.IconText)
|
||||
// {
|
||||
// itm.Label.Text = currentAmount.ToString();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GD.Print($"Tried to remove item {itemKey} but it was not found");
|
||||
// }
|
||||
//
|
||||
// // var containerItem = _items.FirstOrDefault(x => x.Item == item);
|
||||
// // if (containerItem == null)
|
||||
// // {
|
||||
// // GD.Print($"Tried to remove item {item.ItemName} but it was not found");
|
||||
// // return;
|
||||
// // }
|
||||
// //
|
||||
// // containerItem.Container.QueueFree();
|
||||
//
|
||||
// }
|
||||
|
||||
private void SpawnDebugMenu()
|
||||
{
|
||||
ClearPauseMenu();
|
||||
|
|
@ -364,7 +331,7 @@ public partial class Hud : CanvasLayer
|
|||
menu.MenuClosed += () =>
|
||||
{
|
||||
DebugMenuHolder.Visible = false;
|
||||
if (GameManager.Instance.GameState is GameState.Paused)
|
||||
if (GameStateManager.Instance.GameState is GameState.Paused)
|
||||
{
|
||||
SpawnPauseMenu();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue