diff --git a/Zennysoft.Game.Ma/src/items/EffectService.cs b/Zennysoft.Game.Ma/src/items/EffectService.cs index 6062390dd..97f790cec 100644 --- a/Zennysoft.Game.Ma/src/items/EffectService.cs +++ b/Zennysoft.Game.Ma/src/items/EffectService.cs @@ -252,17 +252,13 @@ public class EffectService public void TradeRandomItem(BoxItem box) where T : IBaseInventoryItem { - var tradableItems = _player.Inventory.Items.OfType().Where(x => x != box).ToList(); - + var tradableItems = _player.Inventory.Items.OfType().ToList(); var rng = new RandomNumberGenerator(); rng.Randomize(); var randomIndex = rng.RandiRange(0, tradableItems.Count - 1); var randomItem = tradableItems[randomIndex]; - if (randomItem is IEquipableItem equipableItem) - { - if (_player.EquipmentComponent.IsItemEquipped(equipableItem)) - _player.Unequip(equipableItem); - } + if (randomItem is IEquipableItem equipableItem && _player.EquipmentComponent.IsItemEquipped(equipableItem)) + _player.Unequip(equipableItem); _player.Inventory.Remove(randomItem); GetRandomItemOfType(); diff --git a/Zennysoft.Game.Ma/src/items/weapons/textures/RONDO.PNG.import b/Zennysoft.Game.Ma/src/items/weapons/textures/RONDO.PNG.import index 947fcd210..0c842ad38 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/textures/RONDO.PNG.import +++ b/Zennysoft.Game.Ma/src/items/weapons/textures/RONDO.PNG.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://c63uufq63qpuy" -path.bptc="res://.godot/imported/RONDO.PNG-77b50e9afaf9eb46f5672e079a5f50bf.bptc.ctex" +path.bptc="res://.godot/imported/Rondo.png-57553b850a093da6dba43a1e1947fcce.bptc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://src/items/weapons/textures/RONDO.PNG" -dest_files=["res://.godot/imported/RONDO.PNG-77b50e9afaf9eb46f5672e079a5f50bf.bptc.ctex"] +source_file="res://src/items/weapons/textures/Rondo.png" +dest_files=["res://.godot/imported/Rondo.png-57553b850a093da6dba43a1e1947fcce.bptc.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/map/dungeon/code/MonsterRoom.cs b/Zennysoft.Game.Ma/src/map/dungeon/code/MonsterRoom.cs index 4647c996b..c4d8ce722 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/code/MonsterRoom.cs +++ b/Zennysoft.Game.Ma/src/map/dungeon/code/MonsterRoom.cs @@ -19,54 +19,54 @@ public partial class MonsterRoom : DungeonRoom public override void _Ready() { - SpawnItems(); + SpawnItems(); } public void SpawnEnemies(Godot.Collections.Dictionary enemyInfo) { - if (enemyInfo == null || !enemyInfo.Any(x => x.Value > 0)) - return; + if (enemyInfo == null || !enemyInfo.Any(x => x.Value > 0)) + return; - var rng = new RandomNumberGenerator(); - rng.Randomize(); - var enemySpawnPoints = EnemySpawnPoints.GetChildren(); - var numberOfEnemiesToSpawn = rng.RandiRange(1, enemySpawnPoints.Count); + var rng = new RandomNumberGenerator(); + rng.Randomize(); + var enemySpawnPoints = EnemySpawnPoints.GetChildren(); + var numberOfEnemiesToSpawn = rng.RandiRange(1, enemySpawnPoints.Count); - foreach (var spawnPoint in enemySpawnPoints.Cast()) - { - if (numberOfEnemiesToSpawn <= 0) - break; - numberOfEnemiesToSpawn--; + foreach (var spawnPoint in enemySpawnPoints.Cast()) + { + if (numberOfEnemiesToSpawn <= 0) + break; + numberOfEnemiesToSpawn--; - var index = rng.RandWeighted([.. enemyInfo.Values]); - var selectedEnemy = enemyInfo.ElementAt((int)index); - var instantiatedEnemy = EnemyTypeToEnemyConverter.Convert(selectedEnemy.Key); - instantiatedEnemy.Position = new Vector3(spawnPoint.Position.X, 0f, spawnPoint.Position.Z); - AddChild(instantiatedEnemy); - } + var index = rng.RandWeighted([.. enemyInfo.Values]); + var selectedEnemy = enemyInfo.ElementAt((int)index); + var instantiatedEnemy = EnemyTypeToEnemyConverter.Convert(selectedEnemy.Key); + instantiatedEnemy.Position = new Vector3(spawnPoint.Position.X, 0f, spawnPoint.Position.Z); + AddChild(instantiatedEnemy); + } } private void SpawnItems() { - if (ItemSpawnPoints == null) - return; + if (ItemSpawnPoints == null) + return; - var itemSpawnPoints = ItemSpawnPoints.GetChildren(); - var rng = new RandomNumberGenerator(); - rng.Randomize(); - var numberOfItemsToSpawn = rng.RandiRange(1, itemSpawnPoints.Count); - itemSpawnPoints.Shuffle(); - var database = ItemDatabase.Instance; - foreach (var spawnPoint in itemSpawnPoints.Cast()) - { - if (numberOfItemsToSpawn <= 0) - break; - numberOfItemsToSpawn--; + var itemSpawnPoints = ItemSpawnPoints.GetChildren(); + var rng = new RandomNumberGenerator(); + rng.Randomize(); + var numberOfItemsToSpawn = rng.RandiRange(1, itemSpawnPoints.Count); + itemSpawnPoints.Shuffle(); + var database = ItemDatabase.Instance; + foreach (var spawnPoint in itemSpawnPoints.Cast()) + { + if (numberOfItemsToSpawn <= 0) + break; + numberOfItemsToSpawn--; - var selectedItem = database.PickItem(); - var duplicated = selectedItem.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D; - duplicated.Position = new Vector3(spawnPoint.Position.X, 0, spawnPoint.Position.Z); - AddChild(duplicated); - } + var selectedItem = database.PickItem() as Node3D; + var duplicated = selectedItem.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D; + duplicated.Position = new Vector3(spawnPoint.Position.X, 0, spawnPoint.Position.Z); + AddChild(duplicated); + } } } diff --git a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_AREA_2_MAIN_222STONE.png.import b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_AREA_2_MAIN_222STONE.png.import index 495df45d7..32e69d626 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_AREA_2_MAIN_222STONE.png.import +++ b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_AREA_2_MAIN_222STONE.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://cp0er3xxxjkr5" -path="res://.godot/imported/a2-puer_AREA_2_MAIN_222STONE.png-139f243ac630853348798dfe584da1e0.ctex" +path="res://.godot/imported/A2-Puer_AREA_2_MAIN_222STONE.png-992459ef9849c39922a9b9e0c7774a4a.ctex" metadata={ "vram_texture": false } @@ -13,8 +13,8 @@ generator_parameters={ [deps] -source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_AREA_2_MAIN_222STONE.png" -dest_files=["res://.godot/imported/a2-puer_AREA_2_MAIN_222STONE.png-139f243ac630853348798dfe584da1e0.ctex"] +source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_AREA_2_MAIN_222STONE.png" +dest_files=["res://.godot/imported/A2-Puer_AREA_2_MAIN_222STONE.png-992459ef9849c39922a9b9e0c7774a4a.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_AREA_2_MAIN_STONE.png.import b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_AREA_2_MAIN_STONE.png.import index 21e6e0d98..6b7d90a6d 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_AREA_2_MAIN_STONE.png.import +++ b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_AREA_2_MAIN_STONE.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://5r16swvuqjjg" -path="res://.godot/imported/a2-puer_AREA_2_MAIN_STONE.png-986249227e569ea1e40b4825b7f05c47.ctex" +path="res://.godot/imported/A2-Puer_AREA_2_MAIN_STONE.png-2267bd7e464cdc2e03c8954de01941bf.ctex" metadata={ "vram_texture": false } @@ -13,8 +13,8 @@ generator_parameters={ [deps] -source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_AREA_2_MAIN_STONE.png" -dest_files=["res://.godot/imported/a2-puer_AREA_2_MAIN_STONE.png-986249227e569ea1e40b4825b7f05c47.ctex"] +source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_AREA_2_MAIN_STONE.png" +dest_files=["res://.godot/imported/A2-Puer_AREA_2_MAIN_STONE.png-2267bd7e464cdc2e03c8954de01941bf.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_COLUMN_WHITE.png.import b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_COLUMN_WHITE.png.import index 04bb9e3d9..e762e21b3 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_COLUMN_WHITE.png.import +++ b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_COLUMN_WHITE.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://cvnpxln2mmtkp" -path="res://.godot/imported/a2-puer_COLUMN_WHITE.png-0b80d510851319464b2ef729d8868892.ctex" +path="res://.godot/imported/A2-Puer_COLUMN_WHITE.png-18037c22b966bb159d05cb7acac1bc53.ctex" metadata={ "vram_texture": false } @@ -13,8 +13,8 @@ generator_parameters={ [deps] -source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_COLUMN_WHITE.png" -dest_files=["res://.godot/imported/a2-puer_COLUMN_WHITE.png-0b80d510851319464b2ef729d8868892.ctex"] +source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_COLUMN_WHITE.png" +dest_files=["res://.godot/imported/A2-Puer_COLUMN_WHITE.png-18037c22b966bb159d05cb7acac1bc53.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_GREENBIT.png.import b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_GREENBIT.png.import index 180e28565..9e3842f74 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_GREENBIT.png.import +++ b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_GREENBIT.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://tjtjbktl51kd" -path="res://.godot/imported/a2-puer_GREENBIT.png-e1ed395f917a2fe57ed6288185af0729.ctex" +path="res://.godot/imported/A2-Puer_GREENBIT.png-40a9ca6a0efc569a5f329f19b3c3e572.ctex" metadata={ "vram_texture": false } @@ -13,8 +13,8 @@ generator_parameters={ [deps] -source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_GREENBIT.png" -dest_files=["res://.godot/imported/a2-puer_GREENBIT.png-e1ed395f917a2fe57ed6288185af0729.ctex"] +source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_GREENBIT.png" +dest_files=["res://.godot/imported/A2-Puer_GREENBIT.png-40a9ca6a0efc569a5f329f19b3c3e572.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_M13_14.png.import b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_M13_14.png.import index 3ebf2724e..9338c9fcb 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_M13_14.png.import +++ b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_M13_14.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://dqfdyguq83bhs" -path="res://.godot/imported/a2-puer_M13_14.png-ed8b29b0af1c2b973bfaee62e57cab14.ctex" +path="res://.godot/imported/A2-Puer_M13_14.png-e781478f15895763a566a64ff37db311.ctex" metadata={ "vram_texture": false } @@ -13,8 +13,8 @@ generator_parameters={ [deps] -source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_M13_14.png" -dest_files=["res://.godot/imported/a2-puer_M13_14.png-ed8b29b0af1c2b973bfaee62e57cab14.ctex"] +source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_M13_14.png" +dest_files=["res://.godot/imported/A2-Puer_M13_14.png-e781478f15895763a566a64ff37db311.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_M13_49.png.import b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_M13_49.png.import index 4508979cd..80697846d 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_M13_49.png.import +++ b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_M13_49.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://dorqwrqy03rim" -path="res://.godot/imported/a2-puer_M13_49.png-86429b5a3cd80a9159f32ded99a631bc.ctex" +path="res://.godot/imported/A2-Puer_M13_49.png-44faadb5ae300e9ecea145cfe1949536.ctex" metadata={ "vram_texture": false } @@ -13,8 +13,8 @@ generator_parameters={ [deps] -source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_M13_49.png" -dest_files=["res://.godot/imported/a2-puer_M13_49.png-86429b5a3cd80a9159f32ded99a631bc.ctex"] +source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_M13_49.png" +dest_files=["res://.godot/imported/A2-Puer_M13_49.png-44faadb5ae300e9ecea145cfe1949536.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_RUBBLE_1.png.import b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_RUBBLE_1.png.import index db04979bf..1d382c04e 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_RUBBLE_1.png.import +++ b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_RUBBLE_1.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://nl3bwenfa8fi" -path="res://.godot/imported/a2-puer_RUBBLE_1.png-c7185e2aad2613007d1951f1515ef882.ctex" +path="res://.godot/imported/A2-Puer_RUBBLE_1.png-72d7ff861d1df58d800502546da8d607.ctex" metadata={ "vram_texture": false } @@ -13,8 +13,8 @@ generator_parameters={ [deps] -source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_RUBBLE_1.png" -dest_files=["res://.godot/imported/a2-puer_RUBBLE_1.png-c7185e2aad2613007d1951f1515ef882.ctex"] +source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_RUBBLE_1.png" +dest_files=["res://.godot/imported/A2-Puer_RUBBLE_1.png-72d7ff861d1df58d800502546da8d607.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_STUCCO_DECAL_BIG.png.import b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_STUCCO_DECAL_BIG.png.import index f0fbaffea..09c9a2eaa 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_STUCCO_DECAL_BIG.png.import +++ b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_STUCCO_DECAL_BIG.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://0p6suo7fpxum" -path="res://.godot/imported/a2-puer_STUCCO_DECAL_BIG.png-882b477f490f6ddbf5bffb3a6f8904e1.ctex" +path="res://.godot/imported/A2-Puer_STUCCO_DECAL_BIG.png-015d9f8dd06372231a1f422979d3604e.ctex" metadata={ "vram_texture": false } @@ -13,8 +13,8 @@ generator_parameters={ [deps] -source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_STUCCO_DECAL_BIG.png" -dest_files=["res://.godot/imported/a2-puer_STUCCO_DECAL_BIG.png-882b477f490f6ddbf5bffb3a6f8904e1.ctex"] +source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_STUCCO_DECAL_BIG.png" +dest_files=["res://.godot/imported/A2-Puer_STUCCO_DECAL_BIG.png-015d9f8dd06372231a1f422979d3604e.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_Tile 4.png.import b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_Tile 4.png.import index 199806321..24318b1e7 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_Tile 4.png.import +++ b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_Tile 4.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://ct3mkni0v0y3g" -path="res://.godot/imported/a2-puer_Tile 4.png-9d089a32db3fc38a0c5dee6cdb6d3495.ctex" +path="res://.godot/imported/A2-Puer_Tile 4.png-0cfd085ec5fcea35eb2d1373e4717f77.ctex" metadata={ "vram_texture": false } @@ -13,8 +13,8 @@ generator_parameters={ [deps] -source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_Tile 4.png" -dest_files=["res://.godot/imported/a2-puer_Tile 4.png-9d089a32db3fc38a0c5dee6cdb6d3495.ctex"] +source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_Tile 4.png" +dest_files=["res://.godot/imported/A2-Puer_Tile 4.png-0cfd085ec5fcea35eb2d1373e4717f77.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_imag2esnormal.jpg.import b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_imag2esnormal.jpg.import index 64b96d318..a2a510b2b 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_imag2esnormal.jpg.import +++ b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_imag2esnormal.jpg.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://b40fbcriycpp5" -path="res://.godot/imported/a2-puer_imag2esnormal.jpg-d6e063b2785344af34fa3bb45d47aa2f.ctex" +path="res://.godot/imported/A2-Puer_imag2esnormal.jpg-be023c8af9ff59eedfb3ede232c75195.ctex" metadata={ "vram_texture": false } @@ -13,8 +13,8 @@ generator_parameters={ [deps] -source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_imag2esnormal.jpg" -dest_files=["res://.godot/imported/a2-puer_imag2esnormal.jpg-d6e063b2785344af34fa3bb45d47aa2f.ctex"] +source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_imag2esnormal.jpg" +dest_files=["res://.godot/imported/A2-Puer_imag2esnormal.jpg-be023c8af9ff59eedfb3ede232c75195.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_inner_rock2.png.import b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_inner_rock2.png.import index b8a78e4ab..98a06282f 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_inner_rock2.png.import +++ b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_inner_rock2.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://b25r6gysyhu3e" -path="res://.godot/imported/a2-puer_inner_rock2.png-943622742770f7b55d1e40645d07d057.ctex" +path="res://.godot/imported/A2-Puer_inner_rock2.png-7c99975de214e5dddd3507f87212b910.ctex" metadata={ "vram_texture": false } @@ -13,8 +13,8 @@ generator_parameters={ [deps] -source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_inner_rock2.png" -dest_files=["res://.godot/imported/a2-puer_inner_rock2.png-943622742770f7b55d1e40645d07d057.ctex"] +source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_inner_rock2.png" +dest_files=["res://.godot/imported/A2-Puer_inner_rock2.png-7c99975de214e5dddd3507f87212b910.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_lime_hand_relief.png.import b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_lime_hand_relief.png.import index c74c8b3f7..652b45073 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_lime_hand_relief.png.import +++ b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_lime_hand_relief.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://cw4hq3kofjowa" -path="res://.godot/imported/a2-puer_lime_hand_relief.png-85b73e808337e8b8841453cbda0e78cd.ctex" +path="res://.godot/imported/A2-Puer_lime_hand_relief.png-825857ea33249fe0361c829ba37bbfdb.ctex" metadata={ "vram_texture": false } @@ -13,8 +13,8 @@ generator_parameters={ [deps] -source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_lime_hand_relief.png" -dest_files=["res://.godot/imported/a2-puer_lime_hand_relief.png-85b73e808337e8b8841453cbda0e78cd.ctex"] +source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_lime_hand_relief.png" +dest_files=["res://.godot/imported/A2-Puer_lime_hand_relief.png-825857ea33249fe0361c829ba37bbfdb.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_mother_GREEN.png.import b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_mother_GREEN.png.import index 225a80ba0..daa0c8454 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_mother_GREEN.png.import +++ b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_mother_GREEN.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://bqrsde28o867s" -path="res://.godot/imported/a2-puer_mother_GREEN.png-7bb7d8dd57027953ba1e08ed0c256c8b.ctex" +path="res://.godot/imported/A2-Puer_mother_GREEN.png-ba1f3d21981ed19fc5cc87868e04808c.ctex" metadata={ "vram_texture": false } @@ -13,8 +13,8 @@ generator_parameters={ [deps] -source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_mother_GREEN.png" -dest_files=["res://.godot/imported/a2-puer_mother_GREEN.png-7bb7d8dd57027953ba1e08ed0c256c8b.ctex"] +source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_mother_GREEN.png" +dest_files=["res://.godot/imported/A2-Puer_mother_GREEN.png-ba1f3d21981ed19fc5cc87868e04808c.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_swirled_column _AREA222.png.import b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_swirled_column _AREA222.png.import index d34c69948..54793d5e9 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_swirled_column _AREA222.png.import +++ b/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer_swirled_column _AREA222.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://4aq3a26dliyg" -path="res://.godot/imported/a2-puer_swirled_column _AREA222.png-6f90c188eae5b7e81110f39984d5d43f.ctex" +path="res://.godot/imported/A2-Puer_swirled_column _AREA222.png-4842b180cffdbc0274ecb9cbbbbc8221.ctex" metadata={ "vram_texture": false } @@ -13,8 +13,8 @@ generator_parameters={ [deps] -source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_swirled_column _AREA222.png" -dest_files=["res://.godot/imported/a2-puer_swirled_column _AREA222.png-6f90c188eae5b7e81110f39984d5d43f.ctex"] +source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_swirled_column _AREA222.png" +dest_files=["res://.godot/imported/A2-Puer_swirled_column _AREA222.png-4842b180cffdbc0274ecb9cbbbbc8221.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/player/Player.cs b/Zennysoft.Game.Ma/src/player/Player.cs index 6037ea859..950f62947 100644 --- a/Zennysoft.Game.Ma/src/player/Player.cs +++ b/Zennysoft.Game.Ma/src/player/Player.cs @@ -340,7 +340,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide { Inventory.Remove(jewel); - ApplyNewAugment((dynamic)augmentableItem, jewel.Stats.JewelTag); + ApplyNewAugment((dynamic)augmentableItem, (jewel as Jewel).Stats.JewelTag); if (augmentableItem is IEquipableItem equipable && EquipmentComponent.IsItemEquipped(equipable)) augmentableItem.Augment.AugmentType.Apply(); diff --git a/Zennysoft.Game.Ma/src/ui/inventory_menu/IItemSlot.cs b/Zennysoft.Game.Ma/src/ui/inventory_menu/IItemSlot.cs index c8ad5afad..530f6354b 100644 --- a/Zennysoft.Game.Ma/src/ui/inventory_menu/IItemSlot.cs +++ b/Zennysoft.Game.Ma/src/ui/inventory_menu/IItemSlot.cs @@ -1,13 +1,12 @@ using Chickensoft.Collections; using Chickensoft.GodotNodeInterfaces; using System; -using Zennysoft.Ma.Adapter; namespace Zennysoft.Game.Ma; public interface IItemSlot : IControl { - public AutoProp Item { get; } + public AutoProp Item { get; } public void SetItemEquipmentStatus(bool isEquipped); diff --git a/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.cs b/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.cs index 021d4bb2d..98e74a8b1 100644 --- a/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.cs +++ b/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.cs @@ -173,7 +173,7 @@ public partial class InventoryMenu : Control, IInventoryMenu DropButton.Disabled = true; InteractButton.GrabFocus(); } - else if (item is EquipableItem equipable) + else if (item is IEquipableItem equipable) { var itemIsEquipped = _player.EquipmentComponent.IsItemEquipped(equipable); InteractButton.Text = itemIsEquipped ? "Unequip" : "Equip"; diff --git a/Zennysoft.Game.Ma/src/ui/inventory_menu/ItemSlot.cs b/Zennysoft.Game.Ma/src/ui/inventory_menu/ItemSlot.cs index 56a378a4a..332a1af1b 100644 --- a/Zennysoft.Game.Ma/src/ui/inventory_menu/ItemSlot.cs +++ b/Zennysoft.Game.Ma/src/ui/inventory_menu/ItemSlot.cs @@ -71,7 +71,8 @@ public partial class ItemSlot : Control, IItemSlot return; ItemName.Text = obj.ItemName; - SetItemEquipmentStatus(_player.EquipmentComponent.IsItemEquipped(obj)); + if (obj is IEquipableItem equipable) + SetItemEquipmentStatus(_player.EquipmentComponent.IsItemEquipped(equipable)); if (obj is IAugmentableItem augmentable) SetAugmentStatus(augmentable.Augment != null); }