made the initial inventory loadout into a resource to initialize the injected dependency with

This commit is contained in:
2026-04-26 17:38:25 +02:00
parent 319cbf722e
commit cd7a230615
11 changed files with 331 additions and 247 deletions

View File

@@ -66,18 +66,14 @@ public partial class InventoryUi : Control
public void OnWeaponEventInventoryAdded(WeaponEventAbilityData data)
{
if (data.Ability is not ForgeAbilityBehavior abilityBehavior) return;
var selection = GetAbilitySelection(data.ForEvent);
selection.AddSelectedAbility(abilityBehavior);
selection.AddSelectedAbility(data.Ability);
}
public void OnWeaponEventInventoryRemoved(WeaponEventAbilityData data)
{
if (data.Ability is not ForgeAbilityBehavior abilityBehavior) return;
var selection = GetAbilitySelection(data.ForEvent);
selection.RemoveSelectedAbility(abilityBehavior);
selection.RemoveSelectedAbility(data.Ability);
}
public AbilitySelection GetAbilitySelection(WeaponSystem.WeaponEvent forEvent)