Refactor weapon acquisition system to use named constant for no weapon equipped

This commit is contained in:
2025-10-29 01:27:49 +01:00
parent 6d00b8d6ab
commit 5d86013239
2 changed files with 4 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ namespace GameCore.Player;
public class EquipmentComponent : IComponent
{
private const int NoWeaponIndex = -1;
public List<string> EquippableWeaponItemIds { get; set; } = [];
public int CurrentWeaponIndex { get; set; } = -1; // -1 indicates no weapon equipped
public int CurrentWeaponIndex { get; set; } = NoWeaponIndex;
}