fix numpad edge cases

This commit is contained in:
Graham 2025-10-05 21:46:09 -07:00
parent fcd75659a4
commit df1d8c5015
Signed by: puregarlic
SSH key fingerprint: SHA256:j2sN/ABe7mfw8RwswfUi4owiaZYA2sTKCSkKlqYb35M

View file

@ -33,6 +33,8 @@ func keypad_submit():
var keypad_output: String = "".join(numpad_buffer)
proposed_ask = int(keypad_output) * 1000
if proposed_ask == 0: return
match game_manager.state:
game_manager.bidding_state.READY:
if proposed_ask == game_manager.starting_price:
@ -40,6 +42,7 @@ func keypad_submit():
success_audio_player.play()
ask_proposed.emit(proposed_ask)
print("starting the bidding at $" + str(proposed_ask))
reminder_timer.start(-1)
else:
error_audio_player.play()
game_manager.bidding_state.ASKING:
@ -47,6 +50,7 @@ func keypad_submit():
success_audio_player.play()
ask_proposed.emit(proposed_ask)
print("asking for $" + str(proposed_ask))
reminder_timer.start(-1)
else:
error_audio_player.play()
game_manager.bidding_state.BID:
@ -55,6 +59,7 @@ func keypad_submit():
success_audio_player.play()
ask_proposed.emit(proposed_ask)
print("asking for $" + str(proposed_ask))
reminder_timer.start(-1)
else:
error_audio_player.play()
_:
@ -62,5 +67,4 @@ func keypad_submit():
# need to avoid starting the reminder timer before
# the auction starts
reminder_timer.start(-1)
numpad_buffer.clear()