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

logins
Thomas Hintz 5 years ago
parent ab7a0991b3
commit 092e16e042

@ -726,14 +726,17 @@
(do-action action player) (do-action action player)
(set! (game-actions game) (set! (game-actions game)
(cdr (game-actions game))) (cdr (game-actions game)))
(set-ui-action! `((action . "money") (if (= (- (player-cash player) previous-cash) 0)
(value . ,(- (player-cash player) (loop)
previous-cash))) (begin
game) (set-ui-action! `((action . "money")
(create-ws-response player "action" (value . ,(- (player-cash player)
`((action . "money") previous-cash)))
(value . ,(- (player-cash player) game)
previous-cash)))))) (create-ws-response player "action"
`((action . "money")
(value . ,(- (player-cash player)
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