From b4416783ba76887b68b3443cfbac678763c65ece Mon Sep 17 00:00:00 2001 From: Thomas Hintz Date: Fri, 7 Feb 2020 22:20:53 -0800 Subject: [PATCH] Limiting to 20 cows on farm. --- src/server/farm.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/server/farm.scm b/src/server/farm.scm index 9ff45b4..58779d9 100644 --- a/src/server/farm.scm +++ b/src/server/farm.scm @@ -372,6 +372,12 @@ (push-message player (conc "Could not buy " unnormalized-crop ". Not enough credit.")) #f) + ((and (eq? unnormalized-crop 'cows) + (= (- (player-asset 'cows player) + (fold + 0 (map cdr (player-ridges player)))) + 20)) + (push-message player (conc "Could not buy " unnormalized-crop " because it would exceed maximum allowed on farm.")) + #f) (else (let ((assets (player-assets player))) (set! @@ -1698,9 +1704,6 @@ ;; make sure two players can't have the same name ;; bug: harvest action multiplayer doesn't flow right for other players ;; info actions should look better -;; limit to 20 cows -;; don't give extra money for extra tractors ;; you can get $50 from harvest -;; buy ifs with blank box ;; ran out of otbs ;; bug: new websocket messages should not reset IFS card selection