"This week I'll be laying the groundwork for the happiness mechanic"

I tried a wee experiment over the weekend - made a twitter poll for what I should work on this week.  The poll isn't finished yet, but it's fairly clear what the result is going to be, so this week I'll be laying the groundwork for the happiness mechanic.  Importantly, I won't be adding the actual in-game mechanic itself, as that will require adding a whole bunch of buildings (like taverns and meeting places and buildings to make beer and so on), but I'll hopefully be able to do all the plumbing necessary to make the buildings work when I do add them.

The main things that need to be added are:

  • Allow workers to fulfill a requirement with more than one option.  At the moment, any building has a simple equation - I take in resources X and Y, and produce resource Z.  Accommodation buildings subvert that a little - they don't produce a resource, they allow a worker to go work for a 'day' - but the equation is still rigid.  So it needs to change to something like 'take in resource (A or B or C) and (I or J or K) and produce resource Z'  
  • Allow certain resources to have particular effects within that equation.  So if you use the resource 'Coffee' you get a happiness boost, for example  
  • Actually track the happiness of each worker, display it in the UI when they're clicked on, have them refuse to work when it's too low (or work more slowly), add alerts so that it's obvious when that's happening etc  
  • Add code to the workers AI so that they know about visiting happiness buildings when needed  
  • Probably a whole bunch of other stuff I haven't thought of yet :)

The other focus (and what I'll be doing first) is of course to tidy up the mess I left at the end of last week.  I've already fixed up part of it, but there's more to go.

See you all on Friday!