update forge
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 27s
Create tag and build when new code gets to main / Export (push) Successful in 7m25s

This commit is contained in:
2026-05-17 00:06:44 +02:00
parent 8b54f00814
commit e09714cf83
473 changed files with 13577 additions and 767 deletions

View File

@@ -0,0 +1,40 @@
// Copyright © Gamesmiths Guild.
using Gamesmiths.Forge.Core;
using Gamesmiths.Forge.Statescript;
using Gamesmiths.Forge.Statescript.Properties;
using Godot;
using ForgeNode = Gamesmiths.Forge.Statescript.Node;
namespace Gamesmiths.Forge.Godot.Resources.Statescript.Resolvers.Bases;
public abstract partial class UnaryNestedResolverResourceBase : StatescriptResolverResource
{
protected abstract string PropertyNamePrefix { get; }
protected abstract IPropertyResolver CreateResolver(IPropertyResolver operandResolver, Graph graph);
[Export]
public StatescriptResolverResource? Operand { get; set; }
[Export]
public bool OperandFolded { get; set; }
public override void BindInput(Graph graph, ForgeNode runtimeNode, string nodeId, byte index)
{
IPropertyResolver resolver = BuildResolver(graph);
DefineAndBindInputProperty(graph, runtimeNode, $"{PropertyNamePrefix}_{nodeId}_{index}", index, resolver);
}
public override IPropertyResolver BuildResolver(Graph graph)
{
IPropertyResolver operandResolver = Operand?.BuildResolver(graph) ?? CreateDefaultOperandResolver();
return CreateResolver(operandResolver, graph);
}
protected virtual IPropertyResolver CreateDefaultOperandResolver()
{
return new VariantResolver(default, typeof(int));
}
}