← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/ai_persistent_data into lp:widelands

 

@GunChleoc - I incorporated you comments (most of them). Also see one comment in the diff.

Diff comments:

> 
> === modified file 'src/ai/defaultai.cc'
> --- src/ai/defaultai.cc	2015-08-28 19:09:59 +0000
> +++ src/ai/defaultai.cc	2015-10-19 18:41:12 +0000
> @@ -3624,6 +3687,9 @@
>  		target = std::max<uint16_t>(target, 1);
>  
>  		uint16_t preciousness = wares.at(bo.outputs_.at(m)).preciousness_;
> +		if (preciousness < 1) { // it seems there are wares with 0 preciousness
> +			preciousness = 1; // (no entry in conf files?). But we need positive value here
> +		}

This is not a good place for log, because this would flood console output. Right place could be in late_initialization()

>  
>  		if (get_warehoused_stock(wt) < target) {
>  			if (bo.max_needed_preciousness_ < preciousness) {


-- 
https://code.launchpad.net/~widelands-dev/widelands/ai_persistent_data/+merge/271853
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ai_persistent_data.


References