← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/bug-1574379-forester-wit into lp:widelands

 

This is basicaly a good idea, but it will change game balance.
e.g. before the change one had to place roads or buildings on the infertile
spots to avoid that waste. 

Will there we a warning from foresters now, too?
e.g. when productivity is below 25% meaning there 
is no place to plant a tree at all?
Code does not indicate that.

only tribes on the same computer will share the cache, 
but the shared random geneartor will make it update on all
games, ok.

Code LGTM expect for the forester_cache_, see inline comments.

I want to check soemthing else before I can testplay this.
I still think what the differences in saplingsearches for the tribes 
will mean in the end. I think I must do some lengthy testgames with 
all of them and on deserts maps and very tree friendly maps.

Diff comments:

> 
> === modified file 'src/logic/game.h'
> --- src/logic/game.h	2017-12-19 07:12:18 +0000
> +++ src/logic/game.h	2018-01-13 09:57:39 +0000
> @@ -251,6 +251,10 @@
>  	void accept_trade(int trade_id);
>  	void cancel_trade(int trade_id);
>  
> +	// TODO(kxq): The lifetime of game-instance is okay for this, but is this the right spot?
> +	// TODO(kxq): I should find the place where LUA changes map, and clear this whenever that happens.
> +	std::vector<int16_t> forester_cache_;

shoud be extern and be deplaced in game.cc.
Qualitity of terrain for tree planting normalized to int16,
indexed by MapIndex
-1 meaning invalid, this should be const
shared between all tribes (on the same server)
will be cleared when diffrences are detected (which happes only some times).

> +
>  private:
>  	void sync_reset();
>  


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1574379-forester-wit/+merge/336068
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1574379-forester-wit into lp:widelands.


References