fixed #196: typo caused the sibling of a card not to be ejected from random pool

This commit is contained in:
betalars 2025-06-08 18:36:20 +02:00
parent 4fc9298dc2
commit f6c4a2ff07
1 changed files with 1 additions and 2 deletions

View File

@ -174,7 +174,7 @@ func pick(id: int):
var i:int = 0 var i:int = 0
for option:StickyNote in options: for option:StickyNote in options:
if option.parent_id == parent_id: if option.parent_id == parent_id:
options.erase(options) options.erase(option)
anim_players[i].play("unshuffle") anim_players[i].play("unshuffle")
anim_players.remove_at(i) anim_players.remove_at(i)
print("Removed StickyNote %s from options pool" % HardCards.get_obscure_name(option.name)) print("Removed StickyNote %s from options pool" % HardCards.get_obscure_name(option.name))
@ -193,7 +193,6 @@ func pick(id: int):
Steam.storeStats() Steam.storeStats()
output.append(options.pop_at(winning_id)) output.append(options.pop_at(winning_id))
# FIXME: this causes a hickup when skippin the first animation
random_player = anim_players[winning_id] random_player = anim_players[winning_id]
anim_players.pop_at(winning_id).play("shuffle") anim_players.pop_at(winning_id).play("shuffle")