Skip to content

Commit 52ecb5a

Browse files
authored
Merge pull request #89819 from KoBeWi/the_eternal_war_of_tabs_vs_spaces
Replace XML codeblock spaces with tabs
2 parents 5dd7696 + 13f642d commit 52ecb5a

File tree

122 files changed

+2407
-2432
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+2407
-2432
lines changed

doc/classes/@GlobalScope.xml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,8 @@
457457
[codeblock]
458458
print(" (x) (fmod(x, 1.5)) (fposmod(x, 1.5))")
459459
for i in 7:
460-
var x = i * 0.5 - 1.5
461-
print("%4.1f %4.1f | %4.1f" % [x, fmod(x, 1.5), fposmod(x, 1.5)])
460+
var x = i * 0.5 - 1.5
461+
print("%4.1f %4.1f | %4.1f" % [x, fmod(x, 1.5), fposmod(x, 1.5)])
462462
[/codeblock]
463463
Prints:
464464
[codeblock lang=text]
@@ -498,21 +498,21 @@
498498
var drink = "water"
499499

500500
func _ready():
501-
var id = get_instance_id()
502-
var instance = instance_from_id(id)
503-
print(instance.foo) # Prints "water"
501+
var id = get_instance_id()
502+
var instance = instance_from_id(id)
503+
print(instance.foo) # Prints "water"
504504
[/gdscript]
505505
[csharp]
506506
public partial class MyNode : Node
507507
{
508-
public string Drink { get; set; } = "water";
508+
public string Drink { get; set; } = "water";
509509

510-
public override void _Ready()
511-
{
512-
ulong id = GetInstanceId();
513-
var instance = (MyNode)InstanceFromId(Id);
514-
GD.Print(instance.Drink); // Prints "water"
515-
}
510+
public override void _Ready()
511+
{
512+
ulong id = GetInstanceId();
513+
var instance = (MyNode)InstanceFromId(Id);
514+
GD.Print(instance.Drink); // Prints "water"
515+
}
516516
}
517517
[/csharp]
518518
[/codeblocks]
@@ -642,10 +642,10 @@
642642
extends Sprite
643643
var elapsed = 0.0
644644
func _process(delta):
645-
var min_angle = deg_to_rad(0.0)
646-
var max_angle = deg_to_rad(90.0)
647-
rotation = lerp_angle(min_angle, max_angle, elapsed)
648-
elapsed += delta
645+
var min_angle = deg_to_rad(0.0)
646+
var max_angle = deg_to_rad(90.0)
647+
rotation = lerp_angle(min_angle, max_angle, elapsed)
648+
elapsed += delta
649649
[/codeblock]
650650
[b]Note:[/b] This function lerps through the shortest path between [param from] and [param to]. However, when these two angles are approximately [code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not obvious which way they lerp due to floating-point precision errors. For example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise.
651651
</description>
@@ -815,7 +815,7 @@
815815
[codeblock]
816816
print("#(i) (i % 3) (posmod(i, 3))")
817817
for i in range(-3, 4):
818-
print("%2d %2d | %2d" % [i, i % 3, posmod(i, 3)])
818+
print("%2d %2d | %2d" % [i, i % 3, posmod(i, 3)])
819819
[/codeblock]
820820
Prints:
821821
[codeblock lang=text]
@@ -1429,9 +1429,9 @@
14291429
json.parse('["a", "b", "c"]')
14301430
var result = json.get_data()
14311431
if result is Array:
1432-
print(result[0]) # Prints "a"
1432+
print(result[0]) # Prints "a"
14331433
else:
1434-
print("Unexpected result!")
1434+
print("Unexpected result!")
14351435
[/codeblock]
14361436
See also [method type_string].
14371437
</description>
@@ -1471,8 +1471,8 @@
14711471
Prints:
14721472
[codeblock lang=text]
14731473
{
1474-
"a": 1,
1475-
"b": 2
1474+
"a": 1,
1475+
"b": 2
14761476
}
14771477
[/codeblock]
14781478
[b]Note:[/b] Converting [Signal] or [Callable] is not supported and will result in an empty value for these types, regardless of their data.
@@ -2613,11 +2613,11 @@
26132613
[codeblock]
26142614
var error = method_that_returns_error()
26152615
if error != OK:
2616-
printerr("Failure!")
2616+
printerr("Failure!")
26172617

26182618
# Or, alternatively:
26192619
if error:
2620-
printerr("Still failing!")
2620+
printerr("Still failing!")
26212621
[/codeblock]
26222622
[b]Note:[/b] Many functions do not return an error code, but will print error messages to standard output.
26232623
</constant>

doc/classes/AESContext.xml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -12,66 +12,66 @@
1212
var aes = AESContext.new()
1313

1414
func _ready():
15-
var key = "My secret key!!!" # Key must be either 16 or 32 bytes.
16-
var data = "My secret text!!" # Data size must be multiple of 16 bytes, apply padding if needed.
17-
# Encrypt ECB
18-
aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8_buffer())
19-
var encrypted = aes.update(data.to_utf8_buffer())
20-
aes.finish()
21-
# Decrypt ECB
22-
aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8_buffer())
23-
var decrypted = aes.update(encrypted)
24-
aes.finish()
25-
# Check ECB
26-
assert(decrypted == data.to_utf8_buffer())
15+
var key = "My secret key!!!" # Key must be either 16 or 32 bytes.
16+
var data = "My secret text!!" # Data size must be multiple of 16 bytes, apply padding if needed.
17+
# Encrypt ECB
18+
aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8_buffer())
19+
var encrypted = aes.update(data.to_utf8_buffer())
20+
aes.finish()
21+
# Decrypt ECB
22+
aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8_buffer())
23+
var decrypted = aes.update(encrypted)
24+
aes.finish()
25+
# Check ECB
26+
assert(decrypted == data.to_utf8_buffer())
2727

28-
var iv = "My secret iv!!!!" # IV must be of exactly 16 bytes.
29-
# Encrypt CBC
30-
aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer())
31-
encrypted = aes.update(data.to_utf8_buffer())
32-
aes.finish()
33-
# Decrypt CBC
34-
aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer())
35-
decrypted = aes.update(encrypted)
36-
aes.finish()
37-
# Check CBC
38-
assert(decrypted == data.to_utf8_buffer())
28+
var iv = "My secret iv!!!!" # IV must be of exactly 16 bytes.
29+
# Encrypt CBC
30+
aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer())
31+
encrypted = aes.update(data.to_utf8_buffer())
32+
aes.finish()
33+
# Decrypt CBC
34+
aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer())
35+
decrypted = aes.update(encrypted)
36+
aes.finish()
37+
# Check CBC
38+
assert(decrypted == data.to_utf8_buffer())
3939
[/gdscript]
4040
[csharp]
4141
using Godot;
4242
using System.Diagnostics;
4343

4444
public partial class MyNode : Node
4545
{
46-
private AesContext _aes = new AesContext();
46+
private AesContext _aes = new AesContext();
4747

48-
public override void _Ready()
49-
{
50-
string key = "My secret key!!!"; // Key must be either 16 or 32 bytes.
51-
string data = "My secret text!!"; // Data size must be multiple of 16 bytes, apply padding if needed.
52-
// Encrypt ECB
53-
_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer());
54-
byte[] encrypted = _aes.Update(data.ToUtf8Buffer());
55-
_aes.Finish();
56-
// Decrypt ECB
57-
_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer());
58-
byte[] decrypted = _aes.Update(encrypted);
59-
_aes.Finish();
60-
// Check ECB
61-
Debug.Assert(decrypted == data.ToUtf8Buffer());
48+
public override void _Ready()
49+
{
50+
string key = "My secret key!!!"; // Key must be either 16 or 32 bytes.
51+
string data = "My secret text!!"; // Data size must be multiple of 16 bytes, apply padding if needed.
52+
// Encrypt ECB
53+
_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer());
54+
byte[] encrypted = _aes.Update(data.ToUtf8Buffer());
55+
_aes.Finish();
56+
// Decrypt ECB
57+
_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer());
58+
byte[] decrypted = _aes.Update(encrypted);
59+
_aes.Finish();
60+
// Check ECB
61+
Debug.Assert(decrypted == data.ToUtf8Buffer());
6262

63-
string iv = "My secret iv!!!!"; // IV must be of exactly 16 bytes.
64-
// Encrypt CBC
65-
_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer());
66-
encrypted = _aes.Update(data.ToUtf8Buffer());
67-
_aes.Finish();
68-
// Decrypt CBC
69-
_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer());
70-
decrypted = _aes.Update(encrypted);
71-
_aes.Finish();
72-
// Check CBC
73-
Debug.Assert(decrypted == data.ToUtf8Buffer());
74-
}
63+
string iv = "My secret iv!!!!"; // IV must be of exactly 16 bytes.
64+
// Encrypt CBC
65+
_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer());
66+
encrypted = _aes.Update(data.ToUtf8Buffer());
67+
_aes.Finish();
68+
// Decrypt CBC
69+
_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer());
70+
decrypted = _aes.Update(encrypted);
71+
_aes.Finish();
72+
// Check CBC
73+
Debug.Assert(decrypted == data.ToUtf8Buffer());
74+
}
7575
}
7676
[/csharp]
7777
[/codeblocks]

doc/classes/AStar3D.xml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,35 @@
1414
extends AStar3D
1515

1616
func _compute_cost(u, v):
17-
var u_pos = get_point_position(u)
18-
var v_pos = get_point_position(v)
19-
return abs(u_pos.x - v_pos.x) + abs(u_pos.y - v_pos.y) + abs(u_pos.z - v_pos.z)
17+
var u_pos = get_point_position(u)
18+
var v_pos = get_point_position(v)
19+
return abs(u_pos.x - v_pos.x) + abs(u_pos.y - v_pos.y) + abs(u_pos.z - v_pos.z)
2020

2121
func _estimate_cost(u, v):
22-
var u_pos = get_point_position(u)
23-
var v_pos = get_point_position(v)
24-
return abs(u_pos.x - v_pos.x) + abs(u_pos.y - v_pos.y) + abs(u_pos.z - v_pos.z)
22+
var u_pos = get_point_position(u)
23+
var v_pos = get_point_position(v)
24+
return abs(u_pos.x - v_pos.x) + abs(u_pos.y - v_pos.y) + abs(u_pos.z - v_pos.z)
2525
[/gdscript]
2626
[csharp]
2727
using Godot;
2828

2929
[GlobalClass]
3030
public partial class MyAStar3D : AStar3D
3131
{
32-
public override float _ComputeCost(long fromId, long toId)
33-
{
34-
Vector3 fromPoint = GetPointPosition(fromId);
35-
Vector3 toPoint = GetPointPosition(toId);
32+
public override float _ComputeCost(long fromId, long toId)
33+
{
34+
Vector3 fromPoint = GetPointPosition(fromId);
35+
Vector3 toPoint = GetPointPosition(toId);
3636

37-
return Mathf.Abs(fromPoint.X - toPoint.X) + Mathf.Abs(fromPoint.Y - toPoint.Y) + Mathf.Abs(fromPoint.Z - toPoint.Z);
38-
}
37+
return Mathf.Abs(fromPoint.X - toPoint.X) + Mathf.Abs(fromPoint.Y - toPoint.Y) + Mathf.Abs(fromPoint.Z - toPoint.Z);
38+
}
3939

40-
public override float _EstimateCost(long fromId, long toId)
41-
{
42-
Vector3 fromPoint = GetPointPosition(fromId);
43-
Vector3 toPoint = GetPointPosition(toId);
44-
return Mathf.Abs(fromPoint.X - toPoint.X) + Mathf.Abs(fromPoint.Y - toPoint.Y) + Mathf.Abs(fromPoint.Z - toPoint.Z);
45-
}
40+
public override float _EstimateCost(long fromId, long toId)
41+
{
42+
Vector3 fromPoint = GetPointPosition(fromId);
43+
Vector3 toPoint = GetPointPosition(toId);
44+
return Mathf.Abs(fromPoint.X - toPoint.X) + Mathf.Abs(fromPoint.Y - toPoint.Y) + Mathf.Abs(fromPoint.Z - toPoint.Z);
45+
}
4646
}
4747
[/csharp]
4848
[/codeblocks]

0 commit comments

Comments
 (0)