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

@@ -78,6 +78,28 @@ internal sealed partial class VariableResolverEditor : NodeEditorProperty
};
}
/// <inheritdoc/>
public override bool TryGetInlineSummary(out string summary)
{
summary = string.IsNullOrWhiteSpace(_selectedVariableName)
? "(None)"
: _selectedVariableName;
return true;
}
/// <inheritdoc/>
public override InlineSummaryBadgeKind GetInlineSummaryBadgeKind()
{
return InlineSummaryBadgeKind.Variable;
}
/// <inheritdoc/>
public override bool TryGetHighlightedVariableName(out string variableName)
{
variableName = _selectedVariableName;
return !string.IsNullOrWhiteSpace(variableName);
}
/// <inheritdoc/>
public override void ClearCallbacks()
{
@@ -85,6 +107,24 @@ internal sealed partial class VariableResolverEditor : NodeEditorProperty
_onChanged = null;
}
private static bool IsCompatibleType(Type expectedType, StatescriptVariableType variableType)
{
return StatescriptVariableTypeConverter.IsCompatible(expectedType, variableType);
}
private static bool IsCompatibleType(Type[] expectedTypes, StatescriptVariableType variableType)
{
for (int i = 0; i < expectedTypes.Length; i++)
{
if (IsCompatibleType(expectedTypes[i], variableType))
{
return true;
}
}
return false;
}
private void OnDropdownItemSelected(long index)
{
if (_dropdown is null)
@@ -92,7 +132,7 @@ internal sealed partial class VariableResolverEditor : NodeEditorProperty
return;
}
var idx = _dropdown.Selected;
int idx = _dropdown.Selected;
_selectedVariableName = idx >= 0 && idx < _variableNames.Count ? _variableNames[idx] : string.Empty;
_onChanged?.Invoke();
}
@@ -104,6 +144,8 @@ internal sealed partial class VariableResolverEditor : NodeEditorProperty
return;
}
Type[] allowedExpectedTypes = GetAllowedExpectedTypes(expectedType);
_dropdown.Clear();
_variableNames.Clear();
@@ -117,7 +159,7 @@ internal sealed partial class VariableResolverEditor : NodeEditorProperty
continue;
}
if (!StatescriptVariableTypeConverter.IsCompatible(expectedType, variable.VariableType))
if (!IsCompatibleType(allowedExpectedTypes, variable.VariableType))
{
continue;
}
@@ -134,7 +176,7 @@ internal sealed partial class VariableResolverEditor : NodeEditorProperty
return;
}
for (var i = 0; i < _variableNames.Count; i++)
for (int i = 0; i < _variableNames.Count; i++)
{
if (_variableNames[i] == name)
{