some few fixes that don't fix anything
This commit is contained in:
@@ -16,7 +16,7 @@ public class ExplodingSwordBehavior(PackedScene explosion) : IAbilityBehavior
|
||||
return;
|
||||
}
|
||||
|
||||
if (explosion.Instantiate() is not Explosion explosion1)
|
||||
if (explosion.Instantiate() is not Explosion explo)
|
||||
{
|
||||
GD.Print("Cannot instantiate");
|
||||
context.InstanceHandle.End();
|
||||
@@ -31,10 +31,10 @@ public class ExplodingSwordBehavior(PackedScene explosion) : IAbilityBehavior
|
||||
|
||||
GD.Print("EXPLOSION");
|
||||
|
||||
explosion1.Radius = 6f;
|
||||
explo.Radius = 6f;
|
||||
|
||||
owner.GetTree().GetRoot().CallDeferred(Node.MethodName.AddChild, explosion1);
|
||||
explosion1.CallDeferred(Node3D.MethodName.SetGlobalPosition, owner.GlobalPosition);
|
||||
owner.GetTree().GetRoot().CallDeferred(Node.MethodName.AddChild, explo);
|
||||
explo.CallDeferred(Node3D.MethodName.SetGlobalPosition, owner.GlobalPosition);
|
||||
|
||||
context.AbilityHandle.CommitAbility();
|
||||
context.InstanceHandle.End();
|
||||
@@ -45,15 +45,12 @@ public class ExplodingSwordBehavior(PackedScene explosion) : IAbilityBehavior
|
||||
}
|
||||
}
|
||||
|
||||
[Tool]
|
||||
[GlobalClass]
|
||||
public partial class ForgeExplodingSwordBehavior : ForgeAbilityBehavior
|
||||
{
|
||||
[Export] public PackedScene? Explosion { get; set; }
|
||||
[Export] public PackedScene Explosion { get; set; }
|
||||
public override IAbilityBehavior GetBehavior()
|
||||
{
|
||||
if (Explosion == null)
|
||||
throw new System.ArgumentException("Explosion is null");
|
||||
return new ExplodingSwordBehavior(Explosion);
|
||||
}
|
||||
}
|
||||
@@ -20,11 +20,8 @@ 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);
|
||||
@@ -45,7 +42,7 @@ public class RaiseEventTagExecution(TagContainer eventTags) : CustomExecution
|
||||
[GlobalClass]
|
||||
public partial class ForgeRaiseEventTagExecution : ForgeCustomExecution
|
||||
{
|
||||
[Export] ForgeTagContainer EventTags { get; set; } = new();
|
||||
[Export] ForgeTagContainer EventTags { get; set; }
|
||||
|
||||
public override CustomExecution GetExecutionClass()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user