[Freeciv-Dev] patch: small fixes in eval_buildings() (PR#116)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I recently added a few FIXME comments in citytools.c:
eval_buildings() for some things which looked wrong.
This patch fixes them.
For the first one, existing indentation and similarity to
previous clause suggests these should be in the same 'if' block.
For the second one, this used to be (gov > G_COMMUNISM), which
now happens to correspond to G_IS_NICE flag, but I think more
relevant here is that this corresponds to g->trade_bonus.
Regards,
-- David
diff -u -r --exclude-from exclude freeciv-mod/server/citytools.c
fc-adv/server/citytools.c
--- freeciv-mod/server/citytools.c Mon Aug 23 13:07:34 1999
+++ fc-adv/server/citytools.c Sat Aug 28 13:58:06 1999
@@ -326,20 +326,17 @@
if (can_build_improvement(pcity, B_MARKETPLACE))
values[B_MARKETPLACE]=pcity->trade_prod*200;
- if (pcity->trade_prod > 15)
+ if (pcity->trade_prod > 15) {
if (can_build_improvement(pcity, B_BANK))
values[B_BANK]=pcity->tax_total*100;
- /* FIXME: I'm guessing this should really be included
- in the above if(), like indentation/logic suggests? --dwp */
if (can_build_improvement(pcity, B_STOCK))
values[B_STOCK]=pcity->tax_total*100;
+ }
- /* FIXME: I think this should trigger on g->trade_bonus,
- not G_IS_NICE --dwp */
- if (government_has_flag(g, G_IS_NICE))
- if (can_build_improvement(pcity, B_SUPERHIGHWAYS))
- values[B_SUPERHIGHWAYS]=pcity->trade_prod*60;
+ if (g->trade_bonus > 0 && can_build_improvement(pcity, B_SUPERHIGHWAYS))
+ values[B_SUPERHIGHWAYS]=pcity->trade_prod*60;
+
if (can_build_improvement(pcity, B_COURTHOUSE)) {
if (g->corruption_level)
values[B_COURTHOUSE]=pcity->corruption*100;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] patch: small fixes in eval_buildings() (PR#116),
David Pfitzner <=
|
|