[Freeciv-Dev] (PR#9380) new client function city_can_buy
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#9380) new client function city_can_buy |
From: |
"Jason Dorje Short" <jdorje@xxxxxxxxxxx> |
Date: |
Tue, 13 Jul 2004 21:02:24 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9380 >
This patch adds a new function city_can_buy(), and adds capitalization
(B_CAPITAL) support to impr_buy_gold_cost().
city_can_buy() is in citydlg_common, and can be called by any citydlg
code to see if the city can buy right now. Cities can't buy if the
client is an observer, if they've already bought this turn, or if the
production is unbuyable (already complete or capitalization). The
function is used in citydlg code throughout all the clients. This
shortens the amount of code needed, improves the behavior (IMO), and
removes references to B_CAPITAL.
Correspondingly, impr_buy_gold_cost is adjusted to return 0 for
capitalization. Previously it would always return 1998. Thus
city_buy_cost would return 3996 instead of 0.
jason
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#9380) new client function city_can_buy,
Jason Dorje Short <=
|
|