Merge lp:~widelands-dev/widelands/ai_fisher_identification into lp:widelands

Proposed by TiborB
Status: Merged
Merged at revision: 8596
Proposed branch: lp:~widelands-dev/widelands/ai_fisher_identification
Merge into: lp:widelands
Diff against target: 12 lines (+2/-1)
1 file modified
src/ai/defaultai.cc (+2/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/ai_fisher_identification
Reviewer Review Type Date Requested Status
GunChleoc Approve
hessenfarmer Approve
Review via email: mp+337914@code.launchpad.net

Commit message

AI tweak - a productionsite to be considered a fisher must not have any inputs.

Description of the change

AI tweak - a productionsite to be considered a fisher must not have any inputs.

To post a comment you must log in.
Revision history for this message
TiborB (tiborb95) wrote :

I am afraid that in a next tribe the fishers will have an input - worms or something like that and we will be reworking this again :(

Revision history for this message
GunChleoc (gunchleoc) wrote :

How about having a weight instead? If building type has no inputs, prefer it if you can find a suitable spot.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3202. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/342848747.
Appveyor build 3011. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_ai_fisher_identification-3011.

Revision history for this message
TiborB (tiborb95) wrote :

well, I dont like the idea.
But look at this from other angle: Fisher needs near water with fish. Does aquafarm need this as well?

Revision history for this message
GunChleoc (gunchleoc) wrote :

No, aquafarm doesn't. It needs holes in the ground that were dug by a clay burner working at a clay pit

    "findobject attrib:pond_dry radius:8"

Revision history for this message
GunChleoc (gunchleoc) wrote :

It can use normal fish too though

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

Aqua farm does not need any water. It just needs a claypit nearby. As there is still an issue with the supports production of AI hint if there are 2 productionsites delivering the same ware I will try how the AI performs if the ware produced by an aqua_farm in frisians is breeded fish.

However I think the fix won't harm. In contrary it should help to clearly identify fishermens houses as for the hunters in relation to empire piggeries.

review: Approve
Revision history for this message
TiborB (tiborb95) wrote :

You mean that if by chance close to water, a worker will get out to the coast and fish?

It seems that this should not be treated as fisher at all. So this branch should fix it.

Revision history for this message
GunChleoc (gunchleoc) wrote :

OK, let's have it then. We can always rethink this if a new tribe will come up with the situation that you were originally worried about.

@bunnybot merge

review: Approve
Revision history for this message
bunnybot (widelandsofficial) wrote :

Refusing to merge, since Travis is not green. Use @bunnybot merge force for merging anyways.

Travis build 3202. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/342848747.

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

> You mean that if by chance close to water, a worker will get out to the coast
> and fish?
>
No, not at all he just fishes in his Ponds where he has breeded some fish.

> It seems that this should not be treated as fisher at all. So this branch
> should fix it.

Yes. Thank you for the quick fix as soon as we can persuade tarvis to be green and it is merged I'll give it a try.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Merging trunk should do it. I also set a commit message

@bunnybot merge

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3217. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/343707990.
Appveyor build 3026. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_ai_fisher_identification-3026.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ai/defaultai.cc'
2--- src/ai/defaultai.cc 2018-02-19 12:13:17 +0000
3+++ src/ai/defaultai.cc 2018-02-20 06:32:16 +0000
4@@ -723,7 +723,8 @@
5 }
6
7 // and fishers
8- if (bo.outputs.size() == 1 && tribe_->safe_ware_index("fish") == bo.outputs.at(0)) {
9+ if (bo.outputs.size() == 1 && tribe_->safe_ware_index("fish") == bo.outputs.at(0) &&
10+ bo.inputs.empty()) {
11 bo.set_is(BuildingAttribute::kFisher);
12 }
13

Subscribers

People subscribed via source and target branches

to status/vote changes: