From fe3c539a6213ddf7e9425f3fe83cf258445f27ea Mon Sep 17 00:00:00 2001 From: Zenny Date: Fri, 7 Mar 2025 18:40:14 -0800 Subject: [PATCH] Fix up item usage --- .../Inventory/IInventoryItem.cs | 8 +++++ .../Game/GameRepo.cs | 30 +++++++++++++++---- .../UI/InGameUI/InGameUILogic.State.cs | 21 ++++++++++--- .../UI/InGameUI/state/InGameUILogic.Output.cs | 8 +++-- Zennysoft.Game.Ma/src/game/Game.cs | 15 +++++----- Zennysoft.Game.Ma/src/game/IGame.cs | 10 +++---- .../src/inventory_menu/InventoryMenu.cs | 30 ++++++++++--------- .../src/inventory_menu/ItemSlot.cs | 7 +++-- .../src/item_rescue/RescuedItemDatabase.cs | 5 ++-- Zennysoft.Game.Ma/src/items/Inventory.cs | 21 ++++++------- Zennysoft.Game.Ma/src/items/InventoryItem.cs | 3 +- .../src/items/dropped/DroppedItem.cs | 5 ++-- .../src/items/thrown/ThrownItem.cs | 9 +++--- Zennysoft.Game.Ma/src/player/Player.cs | 8 ++--- .../src/ui/in_game_ui/InGameUI.cs | 10 ++++++- 15 files changed, 125 insertions(+), 65 deletions(-) create mode 100644 Zennysoft.Game.Abstractions/Inventory/IInventoryItem.cs diff --git a/Zennysoft.Game.Abstractions/Inventory/IInventoryItem.cs b/Zennysoft.Game.Abstractions/Inventory/IInventoryItem.cs new file mode 100644 index 00000000..1717b63a --- /dev/null +++ b/Zennysoft.Game.Abstractions/Inventory/IInventoryItem.cs @@ -0,0 +1,8 @@ +namespace Zennysoft.Game.Abstractions; + +public interface IInventoryItem +{ + string ItemName { get; } + + string Description { get; } +} diff --git a/Zennysoft.Game.Ma.Implementation/Game/GameRepo.cs b/Zennysoft.Game.Ma.Implementation/Game/GameRepo.cs index 380a8f42..796d191e 100644 --- a/Zennysoft.Game.Ma.Implementation/Game/GameRepo.cs +++ b/Zennysoft.Game.Ma.Implementation/Game/GameRepo.cs @@ -1,5 +1,6 @@ using Chickensoft.Collections; using Godot; +using Zennysoft.Game.Abstractions; namespace Zennysoft.Game.Ma.Implementation; @@ -11,12 +12,16 @@ public interface IGameRepo : IDisposable event Action? CloseInventory; - event Action? AnnounceMessage; + event Action? AnnounceMessageOnMainScreenEvent; + + event Action? AnnounceMessageInInventoryEvent; event Action? DoubleExpTimeStart; event Action? DoubleExpTimeEnd; + event Action? RemoveItemFromInventoryEvent; + void Pause(); void Resume(); @@ -29,6 +34,10 @@ public interface IGameRepo : IDisposable public void AnnounceMessageOnMainScreen(string message); + public void AnnounceMessageInInventory(string message); + + public void RemoveItemFromInventory(IInventoryItem item); + public double ExpRate { get; } } @@ -37,9 +46,11 @@ public class GameRepo : IGameRepo public event Action? Ended; public event Action? OpenInventory; public event Action? CloseInventory; - public event Action? AnnounceMessage; + public event Action? AnnounceMessageOnMainScreenEvent; + public event Action? AnnounceMessageInInventoryEvent; public event Action? DoubleExpTimeStart; public event Action? DoubleExpTimeEnd; + public event Action? RemoveItemFromInventoryEvent; public IAutoProp IsPaused => _isPaused; private readonly AutoProp _isPaused; @@ -68,8 +79,7 @@ public class GameRepo : IGameRepo public void StartDoubleEXP(TimeSpan lengthOfEffect) { - CloseInventory?.Invoke(); - AnnounceMessageOnMainScreen("Experience points temporarily doubled."); + AnnounceMessageInInventory("Experience points temporarily doubled."); DoubleExpTimeStart?.Invoke(lengthOfEffect.Seconds); ExpRate = 2; } @@ -82,7 +92,17 @@ public class GameRepo : IGameRepo public void AnnounceMessageOnMainScreen(string message) { - AnnounceMessage?.Invoke(message); + AnnounceMessageOnMainScreenEvent?.Invoke(message); + } + + public void AnnounceMessageInInventory(string message) + { + AnnounceMessageInInventoryEvent?.Invoke(message); + } + + public void RemoveItemFromInventory(IInventoryItem item) + { + RemoveItemFromInventoryEvent?.Invoke(item); } public void OnGameEnded() diff --git a/Zennysoft.Game.Ma.Implementation/UI/InGameUI/InGameUILogic.State.cs b/Zennysoft.Game.Ma.Implementation/UI/InGameUI/InGameUILogic.State.cs index 8eefbb10..56531884 100644 --- a/Zennysoft.Game.Ma.Implementation/UI/InGameUI/InGameUILogic.State.cs +++ b/Zennysoft.Game.Ma.Implementation/UI/InGameUI/InGameUILogic.State.cs @@ -1,5 +1,7 @@ using Chickensoft.Introspection; using Chickensoft.LogicBlocks; +using Zennysoft.Game.Abstractions; + namespace Zennysoft.Game.Ma.Implementation; @@ -13,18 +15,29 @@ public partial class InGameUILogic OnAttach(() => { var gameRepo = Get(); - gameRepo.AnnounceMessage += OnAnnounceMessage; + gameRepo.AnnounceMessageOnMainScreenEvent += OnAnnounceMessageOnMainScreen; + gameRepo.AnnounceMessageInInventoryEvent += OnAnnounceMessageInInventory; + gameRepo.RemoveItemFromInventoryEvent += OnRemoveItemFromInventory; }); OnDetach(() => { var gameRepo = Get(); - gameRepo.AnnounceMessage -= OnAnnounceMessage; + gameRepo.AnnounceMessageOnMainScreenEvent -= OnAnnounceMessageOnMainScreen; + gameRepo.AnnounceMessageInInventoryEvent -= OnAnnounceMessageInInventory; }); } - private void OnAnnounceMessage(string message) + private void OnAnnounceMessageOnMainScreen(string message) { - Output(new Output.AnnounceMessage(message)); + Output(new Output.AnnounceMessageOnMainScreen(message)); } + + private void OnAnnounceMessageInInventory(string message) + { + Output(new Output.AnnounceMessageInInventory(message)); + } + + private void OnRemoveItemFromInventory(IInventoryItem item) => Output(new Output.RemoveItemFromInventory(item)); + } } diff --git a/Zennysoft.Game.Ma.Implementation/UI/InGameUI/state/InGameUILogic.Output.cs b/Zennysoft.Game.Ma.Implementation/UI/InGameUI/state/InGameUILogic.Output.cs index ed66125f..994e6ae7 100644 --- a/Zennysoft.Game.Ma.Implementation/UI/InGameUI/state/InGameUILogic.Output.cs +++ b/Zennysoft.Game.Ma.Implementation/UI/InGameUI/state/InGameUILogic.Output.cs @@ -1,8 +1,12 @@ -namespace Zennysoft.Game.Ma.Implementation; +using Zennysoft.Game.Abstractions; + +namespace Zennysoft.Game.Ma.Implementation; public partial class InGameUILogic { public static class Output { - public readonly record struct AnnounceMessage(string Message); + public readonly record struct AnnounceMessageOnMainScreen(string Message); + public readonly record struct AnnounceMessageInInventory(string Message); + public readonly record struct RemoveItemFromInventory(IInventoryItem Item); } } diff --git a/Zennysoft.Game.Ma/src/game/Game.cs b/Zennysoft.Game.Ma/src/game/Game.cs index 33aebe92..7c1a3e20 100644 --- a/Zennysoft.Game.Ma/src/game/Game.cs +++ b/Zennysoft.Game.Ma/src/game/Game.cs @@ -14,6 +14,7 @@ using Zennysoft.Game.Ma.Implementation; using System.IO; using SimpleInjector; using static Zennysoft.Game.Ma.Implementation.GameLogic.State; +using System.Threading.Tasks; [Meta(typeof(IAutoNode))] public partial class Game : Node3D, IGame @@ -266,7 +267,7 @@ public partial class Game : Node3D, IGame GameEventDepot.OnTeleportEntered(); } - public void UseItem(InventoryItem item) + public async Task UseItem(IInventoryItem item) { if (item is ConsumableItem consumableItem) { @@ -338,9 +339,12 @@ public partial class Game : Node3D, IGame if (throwableItem.ThrowableItemTag == ThrowableItemTag.WarpToExitIfFound) _effectService.WarpToExit(Player); } + + await ToSignal(GetTree().CreateTimer(1f), "timeout"); + GameRepo.RemoveItemFromInventory(item); } - public void DropItem(InventoryItem item) + public void DropItem(IInventoryItem item) { var droppedScene = GD.Load("res://src/items/dropped/DroppedItem.tscn"); var dropped = droppedScene.Instantiate(); @@ -349,7 +353,7 @@ public partial class Game : Node3D, IGame dropped.Drop(); } - public void ThrowItem(InventoryItem item) + public void ThrowItem(IInventoryItem item) { var thrownScene = GD.Load("res://src/items/thrown/ThrownItem.tscn"); var thrown = thrownScene.Instantiate(); @@ -359,11 +363,6 @@ public partial class Game : Node3D, IGame thrown.Throw(_effectService); } - public void AnnounceMessageOnInventoryScreen(string message) - { - InGameUI.InventoryMenu.ShowMessage(message); - } - public IDungeonFloor CurrentFloor => Map.CurrentFloor; public void EnemyDefeated(Vector3 defeatedLocation, EnemyStatResource resource) diff --git a/Zennysoft.Game.Ma/src/game/IGame.cs b/Zennysoft.Game.Ma/src/game/IGame.cs index 71c740ab..02dd0299 100644 --- a/Zennysoft.Game.Ma/src/game/IGame.cs +++ b/Zennysoft.Game.Ma/src/game/IGame.cs @@ -5,6 +5,8 @@ using Chickensoft.AutoInject; using Chickensoft.GodotNodeInterfaces; using Chickensoft.SaveFileBuilder; using Godot; +using System.Threading.Tasks; +using Zennysoft.Game.Abstractions; using Zennysoft.Game.Ma.Implementation; public interface IGame : IProvide, IProvide, IProvide, IProvide, IProvide>, INode3D @@ -19,18 +21,16 @@ public interface IGame : IProvide, IProvide, IProvid public IDungeonFloor CurrentFloor { get; } - public void UseItem(InventoryItem item); + public Task UseItem(IInventoryItem item); - public void DropItem(InventoryItem item); + public void DropItem(IInventoryItem item); - public void ThrowItem(InventoryItem item); + public void ThrowItem(IInventoryItem item); public void ToggleInventory(); public void ToggleMinimap(); - public void AnnounceMessageOnInventoryScreen(string message); - public void FloorExitReached(); public void NextFloorLoaded(); diff --git a/Zennysoft.Game.Ma/src/inventory_menu/InventoryMenu.cs b/Zennysoft.Game.Ma/src/inventory_menu/InventoryMenu.cs index 8724de2a..b89eb12e 100644 --- a/Zennysoft.Game.Ma/src/inventory_menu/InventoryMenu.cs +++ b/Zennysoft.Game.Ma/src/inventory_menu/InventoryMenu.cs @@ -4,6 +4,7 @@ using Chickensoft.Introspection; using Godot; using System.Linq; using System.Threading.Tasks; +using Zennysoft.Game.Abstractions; using Zennysoft.Game.Ma.Implementation; namespace Zennysoft.Game.Ma; @@ -12,9 +13,11 @@ public interface IInventoryMenu : IControl { public Task RefreshInventoryScreen(); - public Task ShowMessage(string message); + public Task DisplayMessage(string message); event InventoryMenu.ClosedMenuEventHandler ClosedMenu; + + public void RemoveItem(IInventoryItem item); } [Meta(typeof(IAutoNode))] @@ -99,7 +102,7 @@ public partial class InventoryMenu : Control, IInventoryMenu SetProcessInput(false); } - public async Task ShowMessage(string message) + public async Task DisplayMessage(string message) { SetProcessInput(false); await HideUserActionPrompt(); @@ -229,6 +232,15 @@ public partial class InventoryMenu : Control, IInventoryMenu } #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed + public async void RemoveItem(IInventoryItem item) + { + Player.Inventory.Remove(item); + if (_currentIndex >= ItemSlots.Length - 1) + _currentIndex--; + if (_currentIndex <= 0) + _currentIndex = 0; + } + private void PopulateItems() { PopulateInventory(); @@ -398,23 +410,13 @@ public partial class InventoryMenu : Control, IInventoryMenu await EquipOrUnequipItem(); else { - Game.UseItem(currentItem); - DestroyItem(currentItem); - EmitSignal(SignalName.ClosedMenu); + await Game.UseItem(currentItem); + //DestroyItem(currentItem); } RefreshUIAfterUserSelection(); } - private async void DestroyItem(InventoryItem item) - { - Player.Inventory.Remove(item); - if (_currentIndex >= ItemSlots.Length - 1) - _currentIndex--; - if (_currentIndex <= 0) - _currentIndex = 0; - } - private async void ThrowButtonPressed() { var currentItem = ItemSlots[_currentIndex].Item; diff --git a/Zennysoft.Game.Ma/src/inventory_menu/ItemSlot.cs b/Zennysoft.Game.Ma/src/inventory_menu/ItemSlot.cs index 2b1c8469..f05fb45e 100644 --- a/Zennysoft.Game.Ma/src/inventory_menu/ItemSlot.cs +++ b/Zennysoft.Game.Ma/src/inventory_menu/ItemSlot.cs @@ -2,12 +2,13 @@ using Chickensoft.AutoInject; using Chickensoft.GodotNodeInterfaces; using Chickensoft.Introspection; using Godot; +using Zennysoft.Game.Abstractions; namespace Zennysoft.Game.Ma; public interface IItemSlot : IHBoxContainer { - public InventoryItem Item { get; set; } + public IInventoryItem Item { get; set; } public void SetItemStyle(); @@ -41,7 +42,7 @@ public partial class ItemSlot : HBoxContainer, IItemSlot { ItemName.Text = Item.ItemName; //EquipBonus.Text = "..."; - ItemTexture.Texture = Item.ItemStats.Texture; + ItemTexture.Texture = ((InventoryItem)Item).ItemStats.Texture; Player.EquippedWeapon.Sync += EquippedWeapon_Sync; Player.EquippedArmor.Sync += EquippedArmor_Sync; Player.EquippedAccessory.Sync += EquippedAccessory_Sync; @@ -113,5 +114,5 @@ public partial class ItemSlot : HBoxContainer, IItemSlot //EquipBonus.LabelSettings = EquippedItemFont; } - public InventoryItem Item { get; set; } = default!; + public IInventoryItem Item { get; set; } = default!; } diff --git a/Zennysoft.Game.Ma/src/item_rescue/RescuedItemDatabase.cs b/Zennysoft.Game.Ma/src/item_rescue/RescuedItemDatabase.cs index 389dcb39..c649fb7d 100644 --- a/Zennysoft.Game.Ma/src/item_rescue/RescuedItemDatabase.cs +++ b/Zennysoft.Game.Ma/src/item_rescue/RescuedItemDatabase.cs @@ -1,6 +1,7 @@ using Chickensoft.Introspection; using Chickensoft.Serialization; using System.Collections.Generic; +using Zennysoft.Game.Abstractions; namespace Zennysoft.Game.Ma; @@ -8,10 +9,10 @@ namespace Zennysoft.Game.Ma; public partial class RescuedItemDatabase { [Save("rescued_item_list")] - public List Items { get; init; } + public List Items { get; init; } public RescuedItemDatabase() { - Items = new List(); + Items = new List(); } } diff --git a/Zennysoft.Game.Ma/src/items/Inventory.cs b/Zennysoft.Game.Ma/src/items/Inventory.cs index 520f7c12..c9935591 100644 --- a/Zennysoft.Game.Ma/src/items/Inventory.cs +++ b/Zennysoft.Game.Ma/src/items/Inventory.cs @@ -5,16 +5,17 @@ using Chickensoft.Serialization; using Godot; using System.Collections.Generic; using System.Linq; +using Zennysoft.Game.Abstractions; namespace Zennysoft.Game.Ma; public interface IInventory : INode { - public List Items { get; } + public List Items { get; } - public bool TryAdd(InventoryItem inventoryItem); + public bool TryAdd(IInventoryItem inventoryItem); - public void Remove(InventoryItem inventoryItem); + public void Remove(IInventoryItem inventoryItem); public void Sort(); } @@ -33,9 +34,9 @@ public partial class Inventory : Node, IInventory } [Save("inventory_items")] - public List Items { get; private set; } + public List Items { get; private set; } - public bool TryAdd(InventoryItem inventoryItem) + public bool TryAdd(IInventoryItem inventoryItem) { if (Items.Count >= _maxInventorySize) return false; @@ -44,15 +45,15 @@ public partial class Inventory : Node, IInventory return true; } - public void Remove(InventoryItem inventoryItem) => Items.Remove(inventoryItem); + public void Remove(IInventoryItem inventoryItem) => Items.Remove(inventoryItem); public void Sort() { - var equippedWeapon = Items.OfType().Where(x => x.IsEquipped); - var equippedArmor = Items.OfType().Where(x => x.IsEquipped); - var equippedAccessory = Items.OfType().Where(x => x.IsEquipped); - var equippedItems = new List(); + var equippedWeapon = Items.OfType().Where(x => x.IsEquipped).Cast(); + var equippedArmor = Items.OfType().Where(x => x.IsEquipped).Cast(); + var equippedAccessory = Items.OfType().Where(x => x.IsEquipped).Cast(); + var equippedItems = new List(); equippedItems.AddRange(equippedWeapon); equippedItems.AddRange(equippedArmor); equippedItems.AddRange(equippedAccessory); diff --git a/Zennysoft.Game.Ma/src/items/InventoryItem.cs b/Zennysoft.Game.Ma/src/items/InventoryItem.cs index 705e2cc1..66171b33 100644 --- a/Zennysoft.Game.Ma/src/items/InventoryItem.cs +++ b/Zennysoft.Game.Ma/src/items/InventoryItem.cs @@ -2,11 +2,12 @@ using Chickensoft.Serialization; using Godot; using System; +using Zennysoft.Game.Abstractions; namespace Zennysoft.Game.Ma; [Meta] -public abstract partial class InventoryItem : Node3D +public abstract partial class InventoryItem : Node3D, IInventoryItem { [Save("inventory_item_id")] public Guid ID => Guid.NewGuid(); diff --git a/Zennysoft.Game.Ma/src/items/dropped/DroppedItem.cs b/Zennysoft.Game.Ma/src/items/dropped/DroppedItem.cs index 3ecb6d36..8cb8e1bc 100644 --- a/Zennysoft.Game.Ma/src/items/dropped/DroppedItem.cs +++ b/Zennysoft.Game.Ma/src/items/dropped/DroppedItem.cs @@ -2,6 +2,7 @@ using Chickensoft.GodotNodeInterfaces; using Chickensoft.Introspection; using Godot; +using Zennysoft.Game.Abstractions; namespace Zennysoft.Game.Ma; @@ -23,12 +24,12 @@ public partial class DroppedItem : RigidBody3D, IDroppedItem [Node] private Area3D Pickup { get; set; } = default!; - public InventoryItem Item { get; set; } + public IInventoryItem Item { get; set; } public void OnResolved() { ContactMonitor = true; - Sprite.Texture = Item.ItemStats.Texture; + Sprite.Texture = ((InventoryItem)Item).ItemStats.Texture; } public async void Drop() diff --git a/Zennysoft.Game.Ma/src/items/thrown/ThrownItem.cs b/Zennysoft.Game.Ma/src/items/thrown/ThrownItem.cs index 64155e1f..144b2519 100644 --- a/Zennysoft.Game.Ma/src/items/thrown/ThrownItem.cs +++ b/Zennysoft.Game.Ma/src/items/thrown/ThrownItem.cs @@ -3,6 +3,7 @@ using Chickensoft.Introspection; using Zennysoft.Game.Ma.src.items; using Godot; using Zennysoft.Game.Ma.Implementation; +using Zennysoft.Game.Abstractions; namespace Zennysoft.Game.Ma; @@ -15,7 +16,7 @@ public partial class ThrownItem : RigidBody3D [Dependency] public IGame Game => this.DependOn(); - public InventoryItem ItemThatIsThrown; + public IInventoryItem ItemThatIsThrown; private EffectService _effectService; @@ -25,7 +26,7 @@ public partial class ThrownItem : RigidBody3D { BodyEntered += ThrownItem_BodyEntered; GlobalPosition = Player.CurrentPosition; - Sprite.Texture = ItemThatIsThrown.ItemStats.Texture; + Sprite.Texture = ((InventoryItem)ItemThatIsThrown).ItemStats.Texture; AddCollisionExceptionWith((Node)Player); } @@ -39,7 +40,7 @@ public partial class ThrownItem : RigidBody3D public void Throw(EffectService effectService) { _effectService = effectService; - ApplyCentralImpulse(-Player.CurrentBasis.Z.Normalized() * ItemThatIsThrown.ThrowSpeed); + ApplyCentralImpulse(-Player.CurrentBasis.Z.Normalized() * ((InventoryItem)ItemThatIsThrown).ThrowSpeed); } public void RescueItem() @@ -100,6 +101,6 @@ public partial class ThrownItem : RigidBody3D } } else - enemy.TakeDamage(ItemThatIsThrown.ThrowDamage); + enemy.TakeDamage(((InventoryItem)ItemThatIsThrown).ThrowDamage); } } \ No newline at end of file diff --git a/Zennysoft.Game.Ma/src/player/Player.cs b/Zennysoft.Game.Ma/src/player/Player.cs index 02cdab4c..5df26224 100644 --- a/Zennysoft.Game.Ma/src/player/Player.cs +++ b/Zennysoft.Game.Ma/src/player/Player.cs @@ -292,14 +292,14 @@ public partial class Player : CharacterBody3D, IPlayer { Stats.SetMaximumHP(Stats.MaximumHP.Value + amountToRaise); Stats.SetCurrentHP(Stats.MaximumHP.Value); - Game.AnnounceMessageOnInventoryScreen($"{amountToRaise}MAXHP Up."); + _gameRepo.AnnounceMessageInInventory($"{amountToRaise}MAXHP Up."); } public void HealHP(int amountToRestore) { Stats.SetCurrentHP(Stats.CurrentHP.Value + amountToRestore); var raiseString = amountToRestore == 1000 ? "MAX" : $"{amountToRestore}"; - Game.AnnounceMessageOnInventoryScreen($"{raiseString}HP Restored."); + _gameRepo.AnnounceMessageInInventory($"{raiseString}HP Restored."); } public void RaiseVT(int amountToRaise) @@ -308,7 +308,7 @@ public partial class Player : CharacterBody3D, IPlayer { Stats.SetMaximumVT(Stats.MaximumVT.Value + amountToRaise); Stats.SetCurrentVT(Stats.MaximumVT.Value); - Game.AnnounceMessageOnInventoryScreen($"{amountToRaise}MAXVT Up."); + _gameRepo.AnnounceMessageInInventory($"{amountToRaise}MAXVT Up."); } } @@ -316,7 +316,7 @@ public partial class Player : CharacterBody3D, IPlayer { Stats.SetCurrentVT(Stats.CurrentVT.Value + amountToRestore); var raiseString = amountToRestore == 1000 ? "MAX" : $"{amountToRestore}"; - Game.AnnounceMessageOnInventoryScreen($"{raiseString}VT Restored."); + _gameRepo.AnnounceMessageInInventory($"{raiseString}VT Restored."); } public void ModifyBonusAttack(int amount) diff --git a/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.cs b/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.cs index 7f7d6a15..5ecd45b5 100644 --- a/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.cs +++ b/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.cs @@ -53,9 +53,17 @@ public partial class InGameUI : Control, IInGameUI InGameUILogicBinding = InGameUILogic.Bind(); InGameUILogicBinding - .Handle((in InGameUILogic.Output.AnnounceMessage output) => + .Handle((in InGameUILogic.Output.AnnounceMessageOnMainScreen output) => { PlayerInfoUI.DisplayMessage(output.Message); + }) + .Handle((in InGameUILogic.Output.AnnounceMessageInInventory output) => + { + InventoryMenu.DisplayMessage(output.Message); + }) + .Handle((in InGameUILogic.Output.RemoveItemFromInventory output) => + { + InventoryMenu.RemoveItem(output.Item); }); InGameUILogic.Start();