vcmi/vcmi — pull request #33 by rhn (2014-07-29 07:58:20+00:00)
Title: Fixed wrong message when building a structure

The message "already built today" takes precedence over "requirements not met", hiding the unmet requirements after buying something else.
In HOMM3, "requirements not met" is displayed even if user can't build due to already building today.

It's possible to show both messages, but that would require either adding more flags, e.g. EBuildingState::PREREQUIRES_CANT_BUILD, or turning town state into a bitmap, e.g.
EBuildingState::PREREQUIRES = 0x1,
EBuildingState::CANT_BUILD_TODAY = 0x2,
EBuildingState::RESOURCES = 0x4,
etc.
This might be helpful in AI development - the mental model in my mind is definitely closer to this than a single flag.

This change might break AI's way of choosing things to build.