Replicated the weapon flying tick setup using resources
This commit is contained in:
@@ -16,13 +16,19 @@ using Movementtests.systems;
|
||||
namespace Movementtests.tools.calculators;
|
||||
|
||||
|
||||
public class FlyingWeaponExecution(TagContainer eventTags) : CustomExecution
|
||||
public class RaiseEventTagExecution(TagContainer eventTags) : CustomExecution
|
||||
{
|
||||
public override ModifierEvaluatedData[] EvaluateExecution(Effect effect, IForgeEntity target, EffectEvaluatedData? effectEvaluatedData)
|
||||
{
|
||||
GD.Print("Custom execution executed");
|
||||
var owner = effect.Ownership.Owner;
|
||||
if (owner == null) return [];
|
||||
|
||||
GD.Print(eventTags.Tags.Count);
|
||||
foreach (var tag in eventTags.Tags)
|
||||
{
|
||||
GD.Print(tag);
|
||||
}
|
||||
|
||||
owner.Events.Raise(new EventData
|
||||
{
|
||||
@@ -43,6 +49,6 @@ public partial class ForgeRaiseEventTagExecution : ForgeCustomExecution
|
||||
|
||||
public override CustomExecution GetExecutionClass()
|
||||
{
|
||||
return new FlyingWeaponExecution(EventTags.GetTagContainer());
|
||||
return new RaiseEventTagExecution(EventTags.GetTagContainer());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user