fix numpad edge cases
This commit is contained in:
parent
fcd75659a4
commit
df1d8c5015
1 changed files with 5 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue