* Update the rate of growth at position \a pos by \a amount. * @param pos Position to modify. * @param amount Amount of change (can both be positive and negative). */
| 335 | * @param amount Amount of change (can both be positive and negative). |
| 336 | */ |
| 337 | void Micropolis::incRateOfGrowth(const Position &pos, int amount) |
| 338 | { |
| 339 | int value = rateOfGrowthMap.worldGet(pos.posX, pos.posY); |
| 340 | |
| 341 | value = clamp(value + amount * 4, -200, 200); |
| 342 | rateOfGrowthMap.worldSet(pos.posX, pos.posY, value); |
| 343 | } |
| 344 | |
| 345 | |
| 346 | /** |