[Freeciv-Dev] Re: (PR#2521) general effects framework
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=2521 >
I believe your cities patch reverses the Add and Inc effects. These are
documented in README.effects:
"Food_Inc_Tile" - each worked tile that is already producing some
food produces AMOUNT additional food
"Food_Add_Tile" - each worked tile produces AMOUNT additional food
whereas your code has
+ /* add tile modifiers from effects */
+ t += pcity->tile_bonus[city_x][city_y].trade;
+ if (t > 0) {
+ t += pcity->tile_add[city_x][city_y].trade;
}
+ case EFT_FOOD_ADD_TILE:
+ pcity->tile_add[x][y].food += amount;
+ break;
+ case EFT_FOOD_INC_TILE:
+ pcity->tile_bonus[x][y].food += amount;
+ break;
I suggest you rename tile_bonus to tile_inc to correspond to the effect
names, and of course switch them:
t += pcity->tile_add[cx][cy].trade;
if (t > 0) t += pcity->tile_inc[cx][cy].trade;
That said I think some of the buildings in the ruleset may have the
wrong effects. It's really hard to remember which is which...
jason
|
|