Follow the GDScript style guide in every script

- Types on every parameter, return value and variable, and snake_case names
  (the player name limit is the constant MAX_NAME_LENGTH).
- Spelling fixes: *_triggered, character_selected, separator, caught_errors.
  The server's catched_errors key stays as the server sends it.
- Signals are connected with signal.connect() instead of by name.
- Code is ordered signals, constants, exported vars, vars, @onready vars,
  functions, with @onready on one line and two blank lines between functions.
- Every script starts with a ## description. Template comments, old LOC notes
  and commented-out code are gone, apart from the local play code.
- Lines are at most 100 characters, apart from the local play path.
- The screenshot tour turns off the blinking text cursor so pictures match.
This commit is contained in:
Sansan committed 2026-10-06 11:53:26 +02:00
1 parent 674604425f
commit a0428e3475
45 files changed
+580 -589

No files matched your search

+7 -6
View File
@@ -1,4 +1,5 @@
extends GdUnitTestSuite
## PlayerObject: points, and the first point, match point and winner signals.
var _winning_score: int
var _player: PlayerObject
@@ -20,7 +21,7 @@ func test_first_point_triggers_first_point_signal() -> void:
_player.add_point()
assert_int(_player.player_score).is_equal(1)
await assert_signal(_player).is_emitted("first_point_triggerd")
await assert_signal(_player).is_emitted("first_point_triggered")
await assert_signal(_player).is_emitted("player_point_given")
@@ -30,7 +31,7 @@ func test_one_point_from_winning_triggers_match_point() -> void:
_player.add_point()
await assert_signal(_player).is_emitted("match_point_triggerd")
await assert_signal(_player).is_emitted("match_point_triggered")
func test_reaching_winning_score_triggers_winner() -> void:
@@ -41,7 +42,7 @@ func test_reaching_winning_score_triggers_winner() -> void:
_player.add_point()
assert_int(_player.player_score).is_equal(3)
await assert_signal(_player).is_emitted("winner_triggerd")
await assert_signal(_player).is_emitted("winner_triggered")
func test_score_does_not_go_past_winning_score() -> void:
@@ -91,7 +92,7 @@ func test_dropping_back_to_zero_allows_first_point_again() -> void:
_player.add_point()
await assert_signal(_player).is_emitted("first_point_triggerd")
await assert_signal(_player).is_emitted("first_point_triggered")
func test_reset_points() -> void:
@@ -125,7 +126,7 @@ func test_winning_score_of_one_is_won_with_first_point() -> void:
_player.add_point()
await assert_signal(_player).is_emitted("winner_triggerd")
await assert_signal(_player).is_emitted("winner_triggered")
func test_first_point_is_match_point_when_winning_score_is_two() -> void:
@@ -134,5 +135,5 @@ func test_first_point_is_match_point_when_winning_score_is_two() -> void:
_player.add_point()
await assert_signal(_player).is_emitted("match_point_triggerd")
await assert_signal(_player).is_emitted("match_point_triggered")
assert_bool(_player.is_first_point).is_false()