actually calling update effects
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 30s
Create tag and build when new code gets to main / Export (push) Successful in 6m46s

This commit is contained in:
2026-04-14 19:29:43 +02:00
parent 7ab78aa57f
commit 585c2302d6
11 changed files with 58 additions and 40 deletions

View File

@@ -43,6 +43,7 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
public ForgeTagContainer BaseTags { get; set; }
[Export] public ForgeAbilityData[] WeaponAbilities { get; set; } = Array.Empty<ForgeAbilityData>();
[Export] public ForgeAbilityData FlyingTickAbility { get; set; }
[Export] public ForgeEffectData[] PermanentEffects { get; set; } = Array.Empty<ForgeEffectData>();
[Export]
public RDamage RDamage { get; set; }
@@ -186,6 +187,11 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
EffectsManager.ApplyEffect(new Effect(leftGrantEffect, new EffectOwnership(this, this)));
}
foreach (var effect in PermanentEffects)
{
EffectsManager.ApplyEffect(new Effect(effect.GetEffectData(), new EffectOwnership(this, this)));
}
BodyEntered += OnThrownWeaponReachesGround;
InHandState.StateExited += WeaponLeft;
@@ -382,9 +388,12 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
public override void _Process(double delta)
{
EffectsManager.UpdateEffects(delta);
if (!FlyingState.Active) return;
WeaponMesh.Rotation = new Vector3(WeaponMesh.Rotation.X, WeaponMesh.Rotation.Y + (float) delta * 100, WeaponMesh.Rotation.Z);
//GD.Print(Attributes["WeaponAttributeSet.Level"].CurrentValue);
//LookAt(GlobalTransform.Origin + LinearVelocity.Normalized(), Vector3.Up, false);
}