Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1728006 into lp:widelands

2017-11-03 Thread GunChleoc
Review: Approve

I have done some testing now.

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1728006/+merge/333094
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1728006.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1728006 into lp:widelands

2017-11-02 Thread TiborB
Good catch:) Removed...
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1728006/+merge/333094
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1728006 into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1728006 into lp:widelands

2017-11-02 Thread GunChleoc
You should get rid of kPureProducer. Looks good to me otherwise. Not tested yet.

Diff comments:

> === modified file 'src/ai/ai_help_structs.h'
> --- src/ai/ai_help_structs.h  2017-09-29 16:10:25 +
> +++ src/ai/ai_help_structs.h  2017-11-01 20:33:48 +
> @@ -78,6 +78,8 @@
>   kUpgradeExtends,
>   kLogRefiner,
>   kIronMine,
> + kPureProducer,

kPureProducer is not used anywhere, you can delete it.

> + kSupportingProducer,
>  };
>  
>  enum class AiType : uint8_t { kVeryWeak, kWeak, kNormal };
> 
> === modified file 'src/ai/defaultai.cc'
> --- src/ai/defaultai.cc   2017-09-29 16:10:25 +
> +++ src/ai/defaultai.cc   2017-11-01 20:33:48 +
> @@ -698,6 +698,15 @@
>   bo.positions.push_back(temp_position.first);
>   }
>  
> + // If this is a producer, does it act also as supporter?
> + if (!bo.outputs.empty()) {
> + if (bo.production_hints.empty()) {
> + 
> bo.set_is(BuildingAttribute::kPureProducer);
> + } else {
> + 
> bo.set_is(BuildingAttribute::kSupportingProducer);
> + }
> + }
> +

if (!bo.outputs.empty() && !bo.production_hints.empty()) {
bo.set_is(BuildingAttribute::kSupportingProducer);
}

Then get rid of the pure producer - you're not using it anywhere.

>   iron_ore_id = tribe_->ironore();
>  
>   if (bo.type == BuildingObserver::Type::kMine) {


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

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp