Files
MovementTests/forge/calculators/FlyingWeaponExecution.cs
Minimata 42ff38f39b
Some checks failed
Create tag and build when new code gets to main / BumpTag (push) Successful in 24s
Create tag and build when new code gets to main / Export (push) Failing after 4m23s
yow it's working or wat
2026-03-29 17:30:14 +02:00

30 lines
998 B
C#

using System.Collections.Generic;
using Gamesmiths.Forge.Attributes;
using Gamesmiths.Forge.Core;
using Gamesmiths.Forge.Effects;
using Gamesmiths.Forge.Effects.Calculator;
using Gamesmiths.Forge.Effects.Magnitudes;
using Gamesmiths.Forge.Effects.Modifiers;
using Gamesmiths.Forge.Events;
using Godot;
using Movementtests.systems;
namespace Movementtests.tools.calculators;
public class FlyingWeaponExecution(WeaponSystem weaponSystem) : CustomExecution
{
public override ModifierEvaluatedData[] EvaluateExecution(Effect effect, IForgeEntity target, EffectEvaluatedData? effectEvaluatedData)
{
GD.Print("Custom execution executed");
weaponSystem.Events.Raise(new EventData<WeaponEventPayload>
{
EventTags = weaponSystem.WeaponFlyingTickEventTag.GetSingleTagContainer()!,
Source = weaponSystem,
EventMagnitude = 12f,
Payload = new WeaponEventPayload(Message: "flying")
});
return [];
}
}