You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #111570 from PavielKraskouski/fix-static-import-sourcegen
[C#] Fix source generation of statically imported members
This commit is contained in:
@@ -61,6 +61,10 @@ partial class ExportedFields
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public new static readonly global::Godot.StringName @_fieldString = "_fieldString";
|
public new static readonly global::Godot.StringName @_fieldString = "_fieldString";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// Cached name for the '_fieldStaticImport' field.
|
||||||
|
/// </summary>
|
||||||
|
public new static readonly global::Godot.StringName @_fieldStaticImport = "_fieldStaticImport";
|
||||||
|
/// <summary>
|
||||||
/// Cached name for the '_fieldVector2' field.
|
/// Cached name for the '_fieldVector2' field.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public new static readonly global::Godot.StringName @_fieldVector2 = "_fieldVector2";
|
public new static readonly global::Godot.StringName @_fieldVector2 = "_fieldVector2";
|
||||||
@@ -305,6 +309,10 @@ partial class ExportedFields
|
|||||||
this.@_fieldString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
|
this.@_fieldString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (name == PropertyName.@_fieldStaticImport) {
|
||||||
|
this.@_fieldStaticImport = global::Godot.NativeInterop.VariantUtils.ConvertTo<float>(value);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (name == PropertyName.@_fieldVector2) {
|
if (name == PropertyName.@_fieldVector2) {
|
||||||
this.@_fieldVector2 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2>(value);
|
this.@_fieldVector2 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2>(value);
|
||||||
return true;
|
return true;
|
||||||
@@ -551,6 +559,10 @@ partial class ExportedFields
|
|||||||
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.@_fieldString);
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.@_fieldString);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (name == PropertyName.@_fieldStaticImport) {
|
||||||
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float>(this.@_fieldStaticImport);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (name == PropertyName.@_fieldVector2) {
|
if (name == PropertyName.@_fieldVector2) {
|
||||||
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2>(this.@_fieldVector2);
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2>(this.@_fieldVector2);
|
||||||
return true;
|
return true;
|
||||||
@@ -763,6 +775,7 @@ partial class ExportedFields
|
|||||||
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@_fieldSingle, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@_fieldSingle, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@_fieldDouble, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@_fieldDouble, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@_fieldString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@_fieldString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
|
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@_fieldStaticImport, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
properties.Add(new(type: (global::Godot.Variant.Type)5, name: PropertyName.@_fieldVector2, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
properties.Add(new(type: (global::Godot.Variant.Type)5, name: PropertyName.@_fieldVector2, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
properties.Add(new(type: (global::Godot.Variant.Type)6, name: PropertyName.@_fieldVector2I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
properties.Add(new(type: (global::Godot.Variant.Type)6, name: PropertyName.@_fieldVector2I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
properties.Add(new(type: (global::Godot.Variant.Type)7, name: PropertyName.@_fieldRect2, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
properties.Add(new(type: (global::Godot.Variant.Type)7, name: PropertyName.@_fieldRect2, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ partial class ExportedFields
|
|||||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
internal new static global::System.Collections.Generic.Dictionary<global::Godot.StringName, global::Godot.Variant> GetGodotPropertyDefaultValues()
|
internal new static global::System.Collections.Generic.Dictionary<global::Godot.StringName, global::Godot.Variant> GetGodotPropertyDefaultValues()
|
||||||
{
|
{
|
||||||
var values = new global::System.Collections.Generic.Dictionary<global::Godot.StringName, global::Godot.Variant>(60);
|
var values = new global::System.Collections.Generic.Dictionary<global::Godot.StringName, global::Godot.Variant>(61);
|
||||||
bool ___fieldBoolean_default_value = true;
|
bool ___fieldBoolean_default_value = true;
|
||||||
values.Add(PropertyName.@_fieldBoolean, global::Godot.Variant.From<bool>(___fieldBoolean_default_value));
|
values.Add(PropertyName.@_fieldBoolean, global::Godot.Variant.From<bool>(___fieldBoolean_default_value));
|
||||||
char ___fieldChar_default_value = 'f';
|
char ___fieldChar_default_value = 'f';
|
||||||
@@ -38,6 +38,8 @@ partial class ExportedFields
|
|||||||
values.Add(PropertyName.@_fieldDouble, global::Godot.Variant.From<double>(___fieldDouble_default_value));
|
values.Add(PropertyName.@_fieldDouble, global::Godot.Variant.From<double>(___fieldDouble_default_value));
|
||||||
string ___fieldString_default_value = "foo";
|
string ___fieldString_default_value = "foo";
|
||||||
values.Add(PropertyName.@_fieldString, global::Godot.Variant.From<string>(___fieldString_default_value));
|
values.Add(PropertyName.@_fieldString, global::Godot.Variant.From<string>(___fieldString_default_value));
|
||||||
|
float ___fieldStaticImport_default_value = global::Godot.Mathf.RadToDeg(2 * global::Godot.Mathf.Pi);
|
||||||
|
values.Add(PropertyName.@_fieldStaticImport, global::Godot.Variant.From<float>(___fieldStaticImport_default_value));
|
||||||
global::Godot.Vector2 ___fieldVector2_default_value = new(10f, 10f);
|
global::Godot.Vector2 ___fieldVector2_default_value = new(10f, 10f);
|
||||||
values.Add(PropertyName.@_fieldVector2, global::Godot.Variant.From<global::Godot.Vector2>(___fieldVector2_default_value));
|
values.Add(PropertyName.@_fieldVector2, global::Godot.Variant.From<global::Godot.Vector2>(___fieldVector2_default_value));
|
||||||
global::Godot.Vector2I ___fieldVector2I_default_value = global::Godot.Vector2I.Up;
|
global::Godot.Vector2I ___fieldVector2I_default_value = global::Godot.Vector2I.Up;
|
||||||
|
|||||||
@@ -33,10 +33,18 @@ partial class ExportedProperties
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public new static readonly global::Godot.StringName @FullPropertyString_Complex = "FullPropertyString_Complex";
|
public new static readonly global::Godot.StringName @FullPropertyString_Complex = "FullPropertyString_Complex";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// Cached name for the 'FullPropertyStaticImport' property.
|
||||||
|
/// </summary>
|
||||||
|
public new static readonly global::Godot.StringName @FullPropertyStaticImport = "FullPropertyStaticImport";
|
||||||
|
/// <summary>
|
||||||
/// Cached name for the 'LamdaPropertyString' property.
|
/// Cached name for the 'LamdaPropertyString' property.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public new static readonly global::Godot.StringName @LamdaPropertyString = "LamdaPropertyString";
|
public new static readonly global::Godot.StringName @LamdaPropertyString = "LamdaPropertyString";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// Cached name for the 'LambdaPropertyStaticImport' property.
|
||||||
|
/// </summary>
|
||||||
|
public new static readonly global::Godot.StringName @LambdaPropertyStaticImport = "LambdaPropertyStaticImport";
|
||||||
|
/// <summary>
|
||||||
/// Cached name for the 'PrimaryCtorParameter' property.
|
/// Cached name for the 'PrimaryCtorParameter' property.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public new static readonly global::Godot.StringName @PrimaryCtorParameter = "PrimaryCtorParameter";
|
public new static readonly global::Godot.StringName @PrimaryCtorParameter = "PrimaryCtorParameter";
|
||||||
@@ -45,6 +53,10 @@ partial class ExportedProperties
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public new static readonly global::Godot.StringName @ConstantMath = "ConstantMath";
|
public new static readonly global::Godot.StringName @ConstantMath = "ConstantMath";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// Cached name for the 'ConstantMathStaticImport' property.
|
||||||
|
/// </summary>
|
||||||
|
public new static readonly global::Godot.StringName @ConstantMathStaticImport = "ConstantMathStaticImport";
|
||||||
|
/// <summary>
|
||||||
/// Cached name for the 'StaticStringAddition' property.
|
/// Cached name for the 'StaticStringAddition' property.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public new static readonly global::Godot.StringName @StaticStringAddition = "StaticStringAddition";
|
public new static readonly global::Godot.StringName @StaticStringAddition = "StaticStringAddition";
|
||||||
@@ -293,9 +305,17 @@ partial class ExportedProperties
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public new static readonly global::Godot.StringName @_fullPropertyStringComplex = "_fullPropertyStringComplex";
|
public new static readonly global::Godot.StringName @_fullPropertyStringComplex = "_fullPropertyStringComplex";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// Cached name for the '_fullPropertyStaticImport' field.
|
||||||
|
/// </summary>
|
||||||
|
public new static readonly global::Godot.StringName @_fullPropertyStaticImport = "_fullPropertyStaticImport";
|
||||||
|
/// <summary>
|
||||||
/// Cached name for the '_lamdaPropertyString' field.
|
/// Cached name for the '_lamdaPropertyString' field.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public new static readonly global::Godot.StringName @_lamdaPropertyString = "_lamdaPropertyString";
|
public new static readonly global::Godot.StringName @_lamdaPropertyString = "_lamdaPropertyString";
|
||||||
|
/// <summary>
|
||||||
|
/// Cached name for the '_lambdaPropertyStaticImport' field.
|
||||||
|
/// </summary>
|
||||||
|
public new static readonly global::Godot.StringName @_lambdaPropertyStaticImport = "_lambdaPropertyStaticImport";
|
||||||
}
|
}
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
@@ -325,10 +345,18 @@ partial class ExportedProperties
|
|||||||
this.@FullPropertyString_Complex = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
|
this.@FullPropertyString_Complex = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (name == PropertyName.@FullPropertyStaticImport) {
|
||||||
|
this.@FullPropertyStaticImport = global::Godot.NativeInterop.VariantUtils.ConvertTo<float>(value);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (name == PropertyName.@LamdaPropertyString) {
|
if (name == PropertyName.@LamdaPropertyString) {
|
||||||
this.@LamdaPropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
|
this.@LamdaPropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (name == PropertyName.@LambdaPropertyStaticImport) {
|
||||||
|
this.@LambdaPropertyStaticImport = global::Godot.NativeInterop.VariantUtils.ConvertTo<float>(value);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (name == PropertyName.@PrimaryCtorParameter) {
|
if (name == PropertyName.@PrimaryCtorParameter) {
|
||||||
this.@PrimaryCtorParameter = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
|
this.@PrimaryCtorParameter = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
|
||||||
return true;
|
return true;
|
||||||
@@ -337,6 +365,10 @@ partial class ExportedProperties
|
|||||||
this.@ConstantMath = global::Godot.NativeInterop.VariantUtils.ConvertTo<float>(value);
|
this.@ConstantMath = global::Godot.NativeInterop.VariantUtils.ConvertTo<float>(value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (name == PropertyName.@ConstantMathStaticImport) {
|
||||||
|
this.@ConstantMathStaticImport = global::Godot.NativeInterop.VariantUtils.ConvertTo<float>(value);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (name == PropertyName.@StaticStringAddition) {
|
if (name == PropertyName.@StaticStringAddition) {
|
||||||
this.@StaticStringAddition = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
|
this.@StaticStringAddition = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
|
||||||
return true;
|
return true;
|
||||||
@@ -585,10 +617,18 @@ partial class ExportedProperties
|
|||||||
this.@_fullPropertyStringComplex = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
|
this.@_fullPropertyStringComplex = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (name == PropertyName.@_fullPropertyStaticImport) {
|
||||||
|
this.@_fullPropertyStaticImport = global::Godot.NativeInterop.VariantUtils.ConvertTo<float>(value);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (name == PropertyName.@_lamdaPropertyString) {
|
if (name == PropertyName.@_lamdaPropertyString) {
|
||||||
this.@_lamdaPropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
|
this.@_lamdaPropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (name == PropertyName.@_lambdaPropertyStaticImport) {
|
||||||
|
this.@_lambdaPropertyStaticImport = global::Godot.NativeInterop.VariantUtils.ConvertTo<float>(value);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return base.SetGodotClassPropertyValue(name, value);
|
return base.SetGodotClassPropertyValue(name, value);
|
||||||
}
|
}
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
@@ -619,10 +659,18 @@ partial class ExportedProperties
|
|||||||
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.@FullPropertyString_Complex);
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.@FullPropertyString_Complex);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (name == PropertyName.@FullPropertyStaticImport) {
|
||||||
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float>(this.@FullPropertyStaticImport);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (name == PropertyName.@LamdaPropertyString) {
|
if (name == PropertyName.@LamdaPropertyString) {
|
||||||
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.@LamdaPropertyString);
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.@LamdaPropertyString);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (name == PropertyName.@LambdaPropertyStaticImport) {
|
||||||
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float>(this.@LambdaPropertyStaticImport);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (name == PropertyName.@PrimaryCtorParameter) {
|
if (name == PropertyName.@PrimaryCtorParameter) {
|
||||||
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.@PrimaryCtorParameter);
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.@PrimaryCtorParameter);
|
||||||
return true;
|
return true;
|
||||||
@@ -631,6 +679,10 @@ partial class ExportedProperties
|
|||||||
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float>(this.@ConstantMath);
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float>(this.@ConstantMath);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (name == PropertyName.@ConstantMathStaticImport) {
|
||||||
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float>(this.@ConstantMathStaticImport);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (name == PropertyName.@StaticStringAddition) {
|
if (name == PropertyName.@StaticStringAddition) {
|
||||||
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.@StaticStringAddition);
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.@StaticStringAddition);
|
||||||
return true;
|
return true;
|
||||||
@@ -879,10 +931,18 @@ partial class ExportedProperties
|
|||||||
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.@_fullPropertyStringComplex);
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.@_fullPropertyStringComplex);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (name == PropertyName.@_fullPropertyStaticImport) {
|
||||||
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float>(this.@_fullPropertyStaticImport);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (name == PropertyName.@_lamdaPropertyString) {
|
if (name == PropertyName.@_lamdaPropertyString) {
|
||||||
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.@_lamdaPropertyString);
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.@_lamdaPropertyString);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (name == PropertyName.@_lambdaPropertyStaticImport) {
|
||||||
|
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float>(this.@_lambdaPropertyStaticImport);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return base.GetGodotClassPropertyValue(name, out value);
|
return base.GetGodotClassPropertyValue(name, out value);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -904,10 +964,15 @@ partial class ExportedProperties
|
|||||||
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@FullPropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@FullPropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@_fullPropertyStringComplex, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
|
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@_fullPropertyStringComplex, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
|
||||||
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@FullPropertyString_Complex, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@FullPropertyString_Complex, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
|
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@_fullPropertyStaticImport, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
|
||||||
|
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@FullPropertyStaticImport, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@_lamdaPropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
|
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@_lamdaPropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
|
||||||
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@LamdaPropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@LamdaPropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
|
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@_lambdaPropertyStaticImport, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
|
||||||
|
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@LambdaPropertyStaticImport, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@PrimaryCtorParameter, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@PrimaryCtorParameter, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@ConstantMath, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@ConstantMath, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
|
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@ConstantMathStaticImport, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@StaticStringAddition, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@StaticStringAddition, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName.@PropertyBoolean, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName.@PropertyBoolean, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.@PropertyChar, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.@PropertyChar, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ partial class ExportedProperties
|
|||||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
internal new static global::System.Collections.Generic.Dictionary<global::Godot.StringName, global::Godot.Variant> GetGodotPropertyDefaultValues()
|
internal new static global::System.Collections.Generic.Dictionary<global::Godot.StringName, global::Godot.Variant> GetGodotPropertyDefaultValues()
|
||||||
{
|
{
|
||||||
var values = new global::System.Collections.Generic.Dictionary<global::Godot.StringName, global::Godot.Variant>(67);
|
var values = new global::System.Collections.Generic.Dictionary<global::Godot.StringName, global::Godot.Variant>(70);
|
||||||
string __NotGenerateComplexLamdaProperty_default_value = default;
|
string __NotGenerateComplexLamdaProperty_default_value = default;
|
||||||
values.Add(PropertyName.@NotGenerateComplexLamdaProperty, global::Godot.Variant.From<string>(__NotGenerateComplexLamdaProperty_default_value));
|
values.Add(PropertyName.@NotGenerateComplexLamdaProperty, global::Godot.Variant.From<string>(__NotGenerateComplexLamdaProperty_default_value));
|
||||||
string __NotGenerateLamdaNoFieldProperty_default_value = default;
|
string __NotGenerateLamdaNoFieldProperty_default_value = default;
|
||||||
@@ -24,12 +24,18 @@ partial class ExportedProperties
|
|||||||
values.Add(PropertyName.@FullPropertyString, global::Godot.Variant.From<string>(__FullPropertyString_default_value));
|
values.Add(PropertyName.@FullPropertyString, global::Godot.Variant.From<string>(__FullPropertyString_default_value));
|
||||||
string __FullPropertyString_Complex_default_value = new string("FullPropertyString_Complex") + global::System.Convert.ToInt32("1");
|
string __FullPropertyString_Complex_default_value = new string("FullPropertyString_Complex") + global::System.Convert.ToInt32("1");
|
||||||
values.Add(PropertyName.@FullPropertyString_Complex, global::Godot.Variant.From<string>(__FullPropertyString_Complex_default_value));
|
values.Add(PropertyName.@FullPropertyString_Complex, global::Godot.Variant.From<string>(__FullPropertyString_Complex_default_value));
|
||||||
|
float __FullPropertyStaticImport_default_value = global::Godot.Mathf.Pi;
|
||||||
|
values.Add(PropertyName.@FullPropertyStaticImport, global::Godot.Variant.From<float>(__FullPropertyStaticImport_default_value));
|
||||||
string __LamdaPropertyString_default_value = "LamdaPropertyString";
|
string __LamdaPropertyString_default_value = "LamdaPropertyString";
|
||||||
values.Add(PropertyName.@LamdaPropertyString, global::Godot.Variant.From<string>(__LamdaPropertyString_default_value));
|
values.Add(PropertyName.@LamdaPropertyString, global::Godot.Variant.From<string>(__LamdaPropertyString_default_value));
|
||||||
|
float __LambdaPropertyStaticImport_default_value = global::Godot.Mathf.Tau;
|
||||||
|
values.Add(PropertyName.@LambdaPropertyStaticImport, global::Godot.Variant.From<float>(__LambdaPropertyStaticImport_default_value));
|
||||||
string __PrimaryCtorParameter_default_value = default;
|
string __PrimaryCtorParameter_default_value = default;
|
||||||
values.Add(PropertyName.@PrimaryCtorParameter, global::Godot.Variant.From<string>(__PrimaryCtorParameter_default_value));
|
values.Add(PropertyName.@PrimaryCtorParameter, global::Godot.Variant.From<string>(__PrimaryCtorParameter_default_value));
|
||||||
float __ConstantMath_default_value = 2 * global::Godot.Mathf.Pi;
|
float __ConstantMath_default_value = 2 * global::Godot.Mathf.Pi;
|
||||||
values.Add(PropertyName.@ConstantMath, global::Godot.Variant.From<float>(__ConstantMath_default_value));
|
values.Add(PropertyName.@ConstantMath, global::Godot.Variant.From<float>(__ConstantMath_default_value));
|
||||||
|
float __ConstantMathStaticImport_default_value = global::Godot.Mathf.RadToDeg(2 * global::Godot.Mathf.Pi);
|
||||||
|
values.Add(PropertyName.@ConstantMathStaticImport, global::Godot.Variant.From<float>(__ConstantMathStaticImport_default_value));
|
||||||
string __StaticStringAddition_default_value = string.Empty + string.Empty;
|
string __StaticStringAddition_default_value = string.Empty + string.Empty;
|
||||||
values.Add(PropertyName.@StaticStringAddition, global::Godot.Variant.From<string>(__StaticStringAddition_default_value));
|
values.Add(PropertyName.@StaticStringAddition, global::Godot.Variant.From<string>(__StaticStringAddition_default_value));
|
||||||
bool __PropertyBoolean_default_value = true;
|
bool __PropertyBoolean_default_value = true;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using static Godot.Mathf;
|
||||||
|
|
||||||
public partial class ExportedFields : GodotObject
|
public partial class ExportedFields : GodotObject
|
||||||
{
|
{
|
||||||
@@ -18,6 +19,9 @@ public partial class ExportedFields : GodotObject
|
|||||||
[Export] private Double _fieldDouble = 10;
|
[Export] private Double _fieldDouble = 10;
|
||||||
[Export] private String _fieldString = "foo";
|
[Export] private String _fieldString = "foo";
|
||||||
|
|
||||||
|
// Static import
|
||||||
|
[Export] private Single _fieldStaticImport = RadToDeg(2 * Pi);
|
||||||
|
|
||||||
// Godot structs
|
// Godot structs
|
||||||
[Export] private Vector2 _fieldVector2 = new(10f, 10f);
|
[Export] private Vector2 _fieldVector2 = new(10f, 10f);
|
||||||
[Export] private Vector2I _fieldVector2I = Vector2I.Up;
|
[Export] private Vector2I _fieldVector2I = Vector2I.Up;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
using System;
|
||||||
|
using static Godot.Mathf;
|
||||||
|
|
||||||
public partial class ExportedProperties(string primaryCtorParameter) : GodotObject
|
public partial class ExportedProperties(string primaryCtorParameter) : GodotObject
|
||||||
{
|
{
|
||||||
@@ -82,6 +83,20 @@ public partial class ExportedProperties(string primaryCtorParameter) : GodotObje
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Single _fullPropertyStaticImport = Pi;
|
||||||
|
[Export]
|
||||||
|
public Single FullPropertyStaticImport
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _fullPropertyStaticImport;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_fullPropertyStaticImport = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Lambda Property
|
// Lambda Property
|
||||||
private String _lamdaPropertyString = "LamdaPropertyString";
|
private String _lamdaPropertyString = "LamdaPropertyString";
|
||||||
[Export]
|
[Export]
|
||||||
@@ -91,6 +106,14 @@ public partial class ExportedProperties(string primaryCtorParameter) : GodotObje
|
|||||||
set => _lamdaPropertyString = value;
|
set => _lamdaPropertyString = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Single _lambdaPropertyStaticImport = Tau;
|
||||||
|
[Export]
|
||||||
|
public Single LambdaPropertyStaticImport
|
||||||
|
{
|
||||||
|
get => _lambdaPropertyStaticImport;
|
||||||
|
set => _lambdaPropertyStaticImport = value;
|
||||||
|
}
|
||||||
|
|
||||||
// Primary Constructor Parameter
|
// Primary Constructor Parameter
|
||||||
[Export]
|
[Export]
|
||||||
public String PrimaryCtorParameter { get; set; } = primaryCtorParameter;
|
public String PrimaryCtorParameter { get; set; } = primaryCtorParameter;
|
||||||
@@ -99,6 +122,10 @@ public partial class ExportedProperties(string primaryCtorParameter) : GodotObje
|
|||||||
[Export]
|
[Export]
|
||||||
public Single ConstantMath { get; set; } = 2 * Mathf.Pi;
|
public Single ConstantMath { get; set; } = 2 * Mathf.Pi;
|
||||||
|
|
||||||
|
//Constant Math Expression With Static Import
|
||||||
|
[Export]
|
||||||
|
public Single ConstantMathStaticImport { get; set; } = RadToDeg(2 * Pi);
|
||||||
|
|
||||||
// Static Strings Addition
|
// Static Strings Addition
|
||||||
[Export]
|
[Export]
|
||||||
public string StaticStringAddition { get; set; } = string.Empty + string.Empty;
|
public string StaticStringAddition { get; set; } = string.Empty + string.Empty;
|
||||||
|
|||||||
@@ -183,11 +183,13 @@ namespace Godot.SourceGenerators
|
|||||||
|
|
||||||
private static SymbolDisplayFormat FullyQualifiedFormatOmitGlobal { get; } =
|
private static SymbolDisplayFormat FullyQualifiedFormatOmitGlobal { get; } =
|
||||||
SymbolDisplayFormat.FullyQualifiedFormat
|
SymbolDisplayFormat.FullyQualifiedFormat
|
||||||
.WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Omitted);
|
.WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Omitted)
|
||||||
|
.WithMemberOptions(SymbolDisplayMemberOptions.IncludeContainingType);
|
||||||
|
|
||||||
private static SymbolDisplayFormat FullyQualifiedFormatIncludeGlobal { get; } =
|
private static SymbolDisplayFormat FullyQualifiedFormatIncludeGlobal { get; } =
|
||||||
SymbolDisplayFormat.FullyQualifiedFormat
|
SymbolDisplayFormat.FullyQualifiedFormat
|
||||||
.WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Included);
|
.WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Included)
|
||||||
|
.WithMemberOptions(SymbolDisplayMemberOptions.IncludeContainingType);
|
||||||
|
|
||||||
public static string FullQualifiedNameOmitGlobal(this ITypeSymbol symbol)
|
public static string FullQualifiedNameOmitGlobal(this ITypeSymbol symbol)
|
||||||
=> symbol.ToDisplayString(NullableFlowState.NotNull, FullyQualifiedFormatOmitGlobal);
|
=> symbol.ToDisplayString(NullableFlowState.NotNull, FullyQualifiedFormatOmitGlobal);
|
||||||
@@ -210,7 +212,7 @@ namespace Godot.SourceGenerators
|
|||||||
|
|
||||||
private static void FullQualifiedSyntax(SyntaxNode node, SemanticModel sm, StringBuilder sb, bool isFirstNode)
|
private static void FullQualifiedSyntax(SyntaxNode node, SemanticModel sm, StringBuilder sb, bool isFirstNode)
|
||||||
{
|
{
|
||||||
if (node is NameSyntax ns && isFirstNode)
|
if (node is NameSyntax ns && (isFirstNode || node.Parent is not MemberAccessExpressionSyntax))
|
||||||
{
|
{
|
||||||
SymbolInfo nameInfo = sm.GetSymbolInfo(ns);
|
SymbolInfo nameInfo = sm.GetSymbolInfo(ns);
|
||||||
sb.Append(nameInfo.Symbol?.ToDisplayString(FullyQualifiedFormatIncludeGlobal) ?? ns.ToString());
|
sb.Append(nameInfo.Symbol?.ToDisplayString(FullyQualifiedFormatIncludeGlobal) ?? ns.ToString());
|
||||||
|
|||||||
Reference in New Issue
Block a user