← Back to team overview

widelands-dev team mailing list archive

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

 

Found a typo in a comment.

The Lua code does not need reviewing because it will be removed anyway, but we should do a bit of testing.

Diff comments:

> 
> === modified file 'src/ai/defaultai.cc'
> --- src/ai/defaultai.cc	2019-04-20 05:44:37 +0000
> +++ src/ai/defaultai.cc	2019-05-11 21:13:40 +0000
> @@ -2454,6 +2458,12 @@
>  
>  		if (!bo.buildable(*player_)) {
>  			bo.new_building = BuildingNecessity::kNotNeeded;
> +			// TODO Hessenfarmer: Add the buildings if they are allowed again
> +			// This line removes buildings from basic econmy if they are not allowed for the player

econmy -> economy

> +			// this should only happen by scripting. 
> +			if (bo.basic_amount) {
> +				persistent_data->remaining_basic_buildings.erase(bo.id);
> +			}
>  		} else if (bo.type == BuildingObserver::Type::kProductionsite ||
>  		           bo.type == BuildingObserver::Type::kMine) {
>  


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


References