Skip to content

Commit 646643e

Browse files
committed
game_logic: Remove slider hack for coins_to_win
The bug this was taking advantage of was fixed in Godot 4.4. The property is displayed with a spin control despite this hack. Godot 4.6 will add a new "prefer_slider" hint <https://github.com/godotengine/godot/pull/1104599>. Remove the weird 0.9-coin step, and replace the HACK comment with a TODO for when we update to Godot 4.6.
1 parent 3db100e commit 646643e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/rules_goals/game_logic.gd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ extends Node
77
## Should you win the game by collecting coins?
88
@export var win_by_collecting_coins: bool = false
99

10-
# HACK: the step needs to be 0.9 for displaying a slider.
10+
# TODO: When the game is updated to Godot 4.6, add prefer_slider hint
1111
## How many coins to collect for winning?
1212
## If zero, all the coins must be collected.[br]
1313
## [b]Note:[/b] if you set this to a number bigger than the actual coins,
1414
## the game won't be winnable.
15-
@export_range(0, 100, 0.9, "or_greater") var coins_to_win: int = 0
15+
@export_range(0, 100, 1, "or_greater") var coins_to_win: int = 0
1616

1717
## Should you win the game by reaching a flag?[br]
1818
## If the option to win by collecting coins is also set, then it will only be

0 commit comments

Comments
 (0)