Add GDScript .editorconfig rules

- Uniformize `.gd` unit test files indentation to tabs (where needed)
This commit is contained in:
Adam Scott
2022-12-26 11:24:17 -05:00
parent 91713ced81
commit 44d1d72af1
25 changed files with 232 additions and 222 deletions

View File

@@ -1,4 +1,4 @@
const dictionary := {}
func test():
dictionary.erase(0)
dictionary.erase(0)

View File

@@ -9,7 +9,7 @@ func test():
array_sname.push_back(&"godot")
print("String in Array: ", "godot" in array_sname)
# Not equal because the values are different types.
# Not equal because the values are different types.
print("Arrays not equal: ", array_str != array_sname)
var string_array: Array[String] = []

View File

@@ -13,5 +13,5 @@ func test():
print("String gets StringName: ", stringname_dict.get("abc"))
stringname_dict[&"abc"] = 42
# They compare equal because StringName keys are converted to String.
# They compare equal because StringName keys are converted to String.
print("String Dictionary == StringName Dictionary: ", string_dict == stringname_dict)

View File

@@ -3,23 +3,23 @@
var a: int = 1
func shadow_regular_assignment(a: Variant, b: Variant) -> void:
print(a)
print(self.a)
a = b
print(a)
print(self.a)
print(a)
print(self.a)
a = b
print(a)
print(self.a)
var v := Vector2(0.0, 0.0)
func shadow_subscript_assignment(v: Vector2, x: float) -> void:
print(v)
print(self.v)
v.x += x
print(v)
print(self.v)
print(v)
print(self.v)
v.x += x
print(v)
print(self.v)
func test():
shadow_regular_assignment('a', 'b')
shadow_subscript_assignment(Vector2(1.0, 1.0), 5.0)
shadow_regular_assignment('a', 'b')
shadow_subscript_assignment(Vector2(1.0, 1.0), 5.0)