From 8a9a2313fece92569d43fed448581fe929cb866a Mon Sep 17 00:00:00 2001 From: Zenny Date: Thu, 27 Mar 2025 00:00:29 -0700 Subject: [PATCH] Close inventory on certain inventory actions --- Zennysoft.Game.Ma/src/game/Game.cs | 10 +++++++++- Zennysoft.Game.Ma/src/map/dungeon/floors/Floor00.tscn | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Zennysoft.Game.Ma/src/game/Game.cs b/Zennysoft.Game.Ma/src/game/Game.cs index f7949c0b..3ecaa0c4 100644 --- a/Zennysoft.Game.Ma/src/game/Game.cs +++ b/Zennysoft.Game.Ma/src/game/Game.cs @@ -403,24 +403,31 @@ public partial class Game : Node3D, IGame { case UsableItemTag.TeleportAllEnemiesToRoom: _effectService.TeleportEnemiesToCurrentRoom(); + InGameUI.CloseInventory(); break; case UsableItemTag.KillHalfEnemiesInRoom: _effectService.KillHalfEnemiesInRoom(); + InGameUI.CloseInventory(); break; case UsableItemTag.TurnAllEnemiesIntoHealingItem: _effectService.TurnAllEnemiesInRoomIntoHealingItem(); + InGameUI.CloseInventory(); break; case UsableItemTag.HealsAllInRoomToMaxHP: _effectService.HealAllEnemiesAndPlayerInRoomToFull(); + InGameUI.CloseInventory(); break; case UsableItemTag.AbsorbHPFromAllEnemiesInRoom: _effectService.AbsorbHPFromAllEnemiesInRoom(); + InGameUI.CloseInventory(); break; case UsableItemTag.DealElementalDamageToAllEnemiesInRoom: - _effectService.DealElementalDamageToAllEnemiesInRoom(ElementType.Hydric); + _effectService.DealElementalDamageToAllEnemiesInRoom(effectItem.Stats.ElementalDamageType); + InGameUI.CloseInventory(); break; case UsableItemTag.SwapHPAndVT: _effectService.SwapHPandVT(); + InGameUI.CloseInventory(); break; case UsableItemTag.RaiseCurrentWeaponAttack: _effectService.RaiseCurrentWeaponAttack(); @@ -443,6 +450,7 @@ public partial class Game : Node3D, IGame { case ThrowableItemTag.DoubleExp: GameRepo.StartDoubleEXP(TimeSpan.FromSeconds(30)); + InGameUI.CloseInventory(); break; case ThrowableItemTag.TeleportToRandomLocation: _effectService.TeleportToRandomRoom(Player); diff --git a/Zennysoft.Game.Ma/src/map/dungeon/floors/Floor00.tscn b/Zennysoft.Game.Ma/src/map/dungeon/floors/Floor00.tscn index d8ba23f3..70fa8601 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/floors/Floor00.tscn +++ b/Zennysoft.Game.Ma/src/map/dungeon/floors/Floor00.tscn @@ -26,7 +26,7 @@ [ext_resource type="PackedScene" uid="uid://c6w7dpk0hurj0" path="res://src/items/consumable/ConsumableItem.tscn" id="22_he1ou"] [ext_resource type="Resource" uid="uid://bjwbx3ymt8o7" path="res://src/items/consumable/resources/MysteryConsumable.tres" id="23_rufnk"] [ext_resource type="PackedScene" uid="uid://d0pl1n1jf77jm" path="res://src/items/effect/EffectItem.tscn" id="24_t3xa0"] -[ext_resource type="Resource" uid="uid://cx8kpmyhl5vkj" path="res://src/items/effect/resources/FerrousResolution.tres" id="25_qqc7i"] +[ext_resource type="Resource" uid="uid://bg2fsie2g3j6q" path="res://src/items/effect/resources/Cosmos.tres" id="25_qqc7i"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3ubi4"] shading_mode = 0