Comment 21 for bug 1772845

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

Ok with the code in your branch I got your concept.

First my general opinion on this. I would be happy to have this in the ai_hints. Reason is that someone could better adopt AI behaviour to the tribes special features. For example the frisians don't have refined log but they use this AI-hint for the brickmaker as the brickmaker provides refined building material as well and should be equally treated by the AI.
Furthermore this solution would avoid ambiguities with other buildings producing the same ware but not collecting it from the map (e.g. Piggeries, aqua farms, etc.)

Some nits about the code:
bo.outputs.at(0)is only used in 9 occurrences where 8 of them are in special functions dealing with the identified buildings (1 time each in well and quarry to separate them from other buildings of the same type, 2 times each in hunter, fisher and lumberjack to separate same type of buildings from each other and search for nearby supporters). As this is already special code for this kind of buildings the relevant ware for this case could be hardcoded in my opinion instead to remove the fragile assertions.

If we don't get this to work we could instead remove the fur from the hunter, but as Tibor already had a working branch with just the small change the deeper reason for the failures should not be in the output definition of the Frisian hunter.