widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #02096
FindNodeResource - counting fields with fishes
Hi,
this is programming-related question, I can not figure it out (no wonder
with my experiences):
I need to count fields with fishes (currently no such feature in AI), I
somehow came to this:
if (field.water_nearby_ >0){
map.find_fields(Area<FCoords>(field.coords, 6), &resource_list,
FindNodeResource(tribe->safe_ware_index("fish")));
field.fish_nearby_ = resource_list.size();
}
The problem is that it still calculates 0; so first - is the syntax OK?
Or perhaps the problem is with third argument?
I grepped the code but failed to find piece of code that I would copy/paste
and use for my purposes.
Thanks
--
https://code.launchpad.net/~widelands-dev/widelands/one_world/+merge/222708
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/one_world.
Follow ups
References