made the initial inventory loadout into a resource to initialize the injected dependency with
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user