Remaining changes

This commit is contained in:
2026-02-13 16:33:30 -08:00
parent e14007b7f4
commit a20c80d922
21 changed files with 89 additions and 93 deletions

View File

@@ -252,17 +252,13 @@ public class EffectService
public void TradeRandomItem<T>(BoxItem box) public void TradeRandomItem<T>(BoxItem box)
where T : IBaseInventoryItem where T : IBaseInventoryItem
{ {
var tradableItems = _player.Inventory.Items.OfType<T>().Where(x => x != box).ToList(); var tradableItems = _player.Inventory.Items.OfType<T>().ToList();
var rng = new RandomNumberGenerator(); var rng = new RandomNumberGenerator();
rng.Randomize(); rng.Randomize();
var randomIndex = rng.RandiRange(0, tradableItems.Count - 1); var randomIndex = rng.RandiRange(0, tradableItems.Count - 1);
var randomItem = tradableItems[randomIndex]; var randomItem = tradableItems[randomIndex];
if (randomItem is IEquipableItem equipableItem) if (randomItem is IEquipableItem equipableItem && _player.EquipmentComponent.IsItemEquipped(equipableItem))
{ _player.Unequip(equipableItem);
if (_player.EquipmentComponent.IsItemEquipped(equipableItem))
_player.Unequip(equipableItem);
}
_player.Inventory.Remove(randomItem); _player.Inventory.Remove(randomItem);
GetRandomItemOfType<T>(); GetRandomItemOfType<T>();

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://c63uufq63qpuy" uid="uid://c63uufq63qpuy"
path.bptc="res://.godot/imported/RONDO.PNG-77b50e9afaf9eb46f5672e079a5f50bf.bptc.ctex" path.bptc="res://.godot/imported/Rondo.png-57553b850a093da6dba43a1e1947fcce.bptc.ctex"
metadata={ metadata={
"imported_formats": ["s3tc_bptc"], "imported_formats": ["s3tc_bptc"],
"vram_texture": true "vram_texture": true
@@ -11,8 +11,8 @@ metadata={
[deps] [deps]
source_file="res://src/items/weapons/textures/RONDO.PNG" source_file="res://src/items/weapons/textures/Rondo.png"
dest_files=["res://.godot/imported/RONDO.PNG-77b50e9afaf9eb46f5672e079a5f50bf.bptc.ctex"] dest_files=["res://.godot/imported/Rondo.png-57553b850a093da6dba43a1e1947fcce.bptc.ctex"]
[params] [params]

View File

@@ -19,54 +19,54 @@ public partial class MonsterRoom : DungeonRoom
public override void _Ready() public override void _Ready()
{ {
SpawnItems(); SpawnItems();
} }
public void SpawnEnemies(Godot.Collections.Dictionary<EnemyType, float> enemyInfo) public void SpawnEnemies(Godot.Collections.Dictionary<EnemyType, float> enemyInfo)
{ {
if (enemyInfo == null || !enemyInfo.Any(x => x.Value > 0)) if (enemyInfo == null || !enemyInfo.Any(x => x.Value > 0))
return; return;
var rng = new RandomNumberGenerator(); var rng = new RandomNumberGenerator();
rng.Randomize(); rng.Randomize();
var enemySpawnPoints = EnemySpawnPoints.GetChildren(); var enemySpawnPoints = EnemySpawnPoints.GetChildren();
var numberOfEnemiesToSpawn = rng.RandiRange(1, enemySpawnPoints.Count); var numberOfEnemiesToSpawn = rng.RandiRange(1, enemySpawnPoints.Count);
foreach (var spawnPoint in enemySpawnPoints.Cast<Marker3D>()) foreach (var spawnPoint in enemySpawnPoints.Cast<Marker3D>())
{ {
if (numberOfEnemiesToSpawn <= 0) if (numberOfEnemiesToSpawn <= 0)
break; break;
numberOfEnemiesToSpawn--; numberOfEnemiesToSpawn--;
var index = rng.RandWeighted([.. enemyInfo.Values]); var index = rng.RandWeighted([.. enemyInfo.Values]);
var selectedEnemy = enemyInfo.ElementAt((int)index); var selectedEnemy = enemyInfo.ElementAt((int)index);
var instantiatedEnemy = EnemyTypeToEnemyConverter.Convert(selectedEnemy.Key); var instantiatedEnemy = EnemyTypeToEnemyConverter.Convert(selectedEnemy.Key);
instantiatedEnemy.Position = new Vector3(spawnPoint.Position.X, 0f, spawnPoint.Position.Z); instantiatedEnemy.Position = new Vector3(spawnPoint.Position.X, 0f, spawnPoint.Position.Z);
AddChild(instantiatedEnemy); AddChild(instantiatedEnemy);
} }
} }
private void SpawnItems() private void SpawnItems()
{ {
if (ItemSpawnPoints == null) if (ItemSpawnPoints == null)
return; return;
var itemSpawnPoints = ItemSpawnPoints.GetChildren(); var itemSpawnPoints = ItemSpawnPoints.GetChildren();
var rng = new RandomNumberGenerator(); var rng = new RandomNumberGenerator();
rng.Randomize(); rng.Randomize();
var numberOfItemsToSpawn = rng.RandiRange(1, itemSpawnPoints.Count); var numberOfItemsToSpawn = rng.RandiRange(1, itemSpawnPoints.Count);
itemSpawnPoints.Shuffle(); itemSpawnPoints.Shuffle();
var database = ItemDatabase.Instance; var database = ItemDatabase.Instance;
foreach (var spawnPoint in itemSpawnPoints.Cast<Marker3D>()) foreach (var spawnPoint in itemSpawnPoints.Cast<Marker3D>())
{ {
if (numberOfItemsToSpawn <= 0) if (numberOfItemsToSpawn <= 0)
break; break;
numberOfItemsToSpawn--; numberOfItemsToSpawn--;
var selectedItem = database.PickItem<InventoryItem>(); var selectedItem = database.PickItem<IBaseInventoryItem>() as Node3D;
var duplicated = selectedItem.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D; var duplicated = selectedItem.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D;
duplicated.Position = new Vector3(spawnPoint.Position.X, 0, spawnPoint.Position.Z); duplicated.Position = new Vector3(spawnPoint.Position.X, 0, spawnPoint.Position.Z);
AddChild(duplicated); AddChild(duplicated);
} }
} }
} }

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cp0er3xxxjkr5" 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={ metadata={
"vram_texture": false "vram_texture": false
} }
@@ -13,8 +13,8 @@ generator_parameters={
[deps] [deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_AREA_2_MAIN_222STONE.png" 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"] dest_files=["res://.godot/imported/A2-Puer_AREA_2_MAIN_222STONE.png-992459ef9849c39922a9b9e0c7774a4a.ctex"]
[params] [params]

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://5r16swvuqjjg" 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={ metadata={
"vram_texture": false "vram_texture": false
} }
@@ -13,8 +13,8 @@ generator_parameters={
[deps] [deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_AREA_2_MAIN_STONE.png" 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"] dest_files=["res://.godot/imported/A2-Puer_AREA_2_MAIN_STONE.png-2267bd7e464cdc2e03c8954de01941bf.ctex"]
[params] [params]

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cvnpxln2mmtkp" 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={ metadata={
"vram_texture": false "vram_texture": false
} }
@@ -13,8 +13,8 @@ generator_parameters={
[deps] [deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_COLUMN_WHITE.png" 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"] dest_files=["res://.godot/imported/A2-Puer_COLUMN_WHITE.png-18037c22b966bb159d05cb7acac1bc53.ctex"]
[params] [params]

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://tjtjbktl51kd" uid="uid://tjtjbktl51kd"
path="res://.godot/imported/a2-puer_GREENBIT.png-e1ed395f917a2fe57ed6288185af0729.ctex" path="res://.godot/imported/A2-Puer_GREENBIT.png-40a9ca6a0efc569a5f329f19b3c3e572.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
@@ -13,8 +13,8 @@ generator_parameters={
[deps] [deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_GREENBIT.png" 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"] dest_files=["res://.godot/imported/A2-Puer_GREENBIT.png-40a9ca6a0efc569a5f329f19b3c3e572.ctex"]
[params] [params]

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://dqfdyguq83bhs" 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={ metadata={
"vram_texture": false "vram_texture": false
} }
@@ -13,8 +13,8 @@ generator_parameters={
[deps] [deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_M13_14.png" 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"] dest_files=["res://.godot/imported/A2-Puer_M13_14.png-e781478f15895763a566a64ff37db311.ctex"]
[params] [params]

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://dorqwrqy03rim" 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={ metadata={
"vram_texture": false "vram_texture": false
} }
@@ -13,8 +13,8 @@ generator_parameters={
[deps] [deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_M13_49.png" 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"] dest_files=["res://.godot/imported/A2-Puer_M13_49.png-44faadb5ae300e9ecea145cfe1949536.ctex"]
[params] [params]

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://nl3bwenfa8fi" 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={ metadata={
"vram_texture": false "vram_texture": false
} }
@@ -13,8 +13,8 @@ generator_parameters={
[deps] [deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_RUBBLE_1.png" 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"] dest_files=["res://.godot/imported/A2-Puer_RUBBLE_1.png-72d7ff861d1df58d800502546da8d607.ctex"]
[params] [params]

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://0p6suo7fpxum" 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={ metadata={
"vram_texture": false "vram_texture": false
} }
@@ -13,8 +13,8 @@ generator_parameters={
[deps] [deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_STUCCO_DECAL_BIG.png" 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"] dest_files=["res://.godot/imported/A2-Puer_STUCCO_DECAL_BIG.png-015d9f8dd06372231a1f422979d3604e.ctex"]
[params] [params]

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://ct3mkni0v0y3g" 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={ metadata={
"vram_texture": false "vram_texture": false
} }
@@ -13,8 +13,8 @@ generator_parameters={
[deps] [deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_Tile 4.png" 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"] dest_files=["res://.godot/imported/A2-Puer_Tile 4.png-0cfd085ec5fcea35eb2d1373e4717f77.ctex"]
[params] [params]

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://b40fbcriycpp5" uid="uid://b40fbcriycpp5"
path="res://.godot/imported/a2-puer_imag2esnormal.jpg-d6e063b2785344af34fa3bb45d47aa2f.ctex" path="res://.godot/imported/A2-Puer_imag2esnormal.jpg-be023c8af9ff59eedfb3ede232c75195.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
@@ -13,8 +13,8 @@ generator_parameters={
[deps] [deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_imag2esnormal.jpg" 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"] dest_files=["res://.godot/imported/A2-Puer_imag2esnormal.jpg-be023c8af9ff59eedfb3ede232c75195.ctex"]
[params] [params]

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://b25r6gysyhu3e" 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={ metadata={
"vram_texture": false "vram_texture": false
} }
@@ -13,8 +13,8 @@ generator_parameters={
[deps] [deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_inner_rock2.png" 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"] dest_files=["res://.godot/imported/A2-Puer_inner_rock2.png-7c99975de214e5dddd3507f87212b910.ctex"]
[params] [params]

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cw4hq3kofjowa" 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={ metadata={
"vram_texture": false "vram_texture": false
} }
@@ -13,8 +13,8 @@ generator_parameters={
[deps] [deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_lime_hand_relief.png" 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"] dest_files=["res://.godot/imported/A2-Puer_lime_hand_relief.png-825857ea33249fe0361c829ba37bbfdb.ctex"]
[params] [params]

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://bqrsde28o867s" 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={ metadata={
"vram_texture": false "vram_texture": false
} }
@@ -13,8 +13,8 @@ generator_parameters={
[deps] [deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_mother_GREEN.png" 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"] dest_files=["res://.godot/imported/A2-Puer_mother_GREEN.png-ba1f3d21981ed19fc5cc87868e04808c.ctex"]
[params] [params]

View File

@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://4aq3a26dliyg" 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={ metadata={
"vram_texture": false "vram_texture": false
} }
@@ -13,8 +13,8 @@ generator_parameters={
[deps] [deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_swirled_column _AREA222.png" 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"] dest_files=["res://.godot/imported/A2-Puer_swirled_column _AREA222.png-4842b180cffdbc0274ecb9cbbbbc8221.ctex"]
[params] [params]

View File

@@ -340,7 +340,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
{ {
Inventory.Remove(jewel); 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)) if (augmentableItem is IEquipableItem equipable && EquipmentComponent.IsItemEquipped(equipable))
augmentableItem.Augment.AugmentType.Apply(); augmentableItem.Augment.AugmentType.Apply();

View File

@@ -1,13 +1,12 @@
using Chickensoft.Collections; using Chickensoft.Collections;
using Chickensoft.GodotNodeInterfaces; using Chickensoft.GodotNodeInterfaces;
using System; using System;
using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma; namespace Zennysoft.Game.Ma;
public interface IItemSlot : IControl public interface IItemSlot : IControl
{ {
public AutoProp<InventoryItem> Item { get; } public AutoProp<IBaseInventoryItem> Item { get; }
public void SetItemEquipmentStatus(bool isEquipped); public void SetItemEquipmentStatus(bool isEquipped);

View File

@@ -173,7 +173,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
DropButton.Disabled = true; DropButton.Disabled = true;
InteractButton.GrabFocus(); InteractButton.GrabFocus();
} }
else if (item is EquipableItem equipable) else if (item is IEquipableItem equipable)
{ {
var itemIsEquipped = _player.EquipmentComponent.IsItemEquipped(equipable); var itemIsEquipped = _player.EquipmentComponent.IsItemEquipped(equipable);
InteractButton.Text = itemIsEquipped ? "Unequip" : "Equip"; InteractButton.Text = itemIsEquipped ? "Unequip" : "Equip";

View File

@@ -71,7 +71,8 @@ public partial class ItemSlot : Control, IItemSlot
return; return;
ItemName.Text = obj.ItemName; ItemName.Text = obj.ItemName;
SetItemEquipmentStatus(_player.EquipmentComponent.IsItemEquipped(obj)); if (obj is IEquipableItem equipable)
SetItemEquipmentStatus(_player.EquipmentComponent.IsItemEquipped(equipable));
if (obj is IAugmentableItem augmentable) if (obj is IAugmentableItem augmentable)
SetAugmentStatus(augmentable.Augment != null); SetAugmentStatus(augmentable.Augment != null);
} }