Fixing UI actions bug where "You gained $0 was repeatedly shown."

logins
Thomas Hintz 5 years ago
parent ab7a0991b3
commit 092e16e042

@ -726,6 +726,9 @@
(do-action action player) (do-action action player)
(set! (game-actions game) (set! (game-actions game)
(cdr (game-actions game))) (cdr (game-actions game)))
(if (= (- (player-cash player) previous-cash) 0)
(loop)
(begin
(set-ui-action! `((action . "money") (set-ui-action! `((action . "money")
(value . ,(- (player-cash player) (value . ,(- (player-cash player)
previous-cash))) previous-cash)))
@ -733,7 +736,7 @@
(create-ws-response player "action" (create-ws-response player "action"
`((action . "money") `((action . "money")
(value . ,(- (player-cash player) (value . ,(- (player-cash player)
previous-cash)))))) previous-cash))))))))
((or (eq? name 'harvest-mult) ((or (eq? name 'harvest-mult)
(eq? name 'player-action-post-harvest)) (eq? name 'player-action-post-harvest))
(set! (game-actions game) (cdr (game-actions game))) (set! (game-actions game) (cdr (game-actions game)))
@ -1690,9 +1693,4 @@
;; make sure two players can't have the same name ;; make sure two players can't have the same name
;; bug: harvest action multiplayer doesn't flow right for other players ;; bug: harvest action multiplayer doesn't flow right for other players
;; info actions should look better ;; info actions should look better
;; bug: notify when need to raise money because less than 0
;; bug: loans is buggy when negative cash
;; bug: dice shows no value when landing on christmas vacation ;; bug: dice shows no value when landing on christmas vacation
;; hide Join Game when no games to join
;; livestock bonus card (or anytime holding a card?) causes "you
;; gained $0" to show every turn

Loading…
Cancel
Save