Commit b074b930

Implement heat pump mechanics for inside and outside temperature modifiers

Resolves #67

Hi! This commit adds the last big building block of the temperature milestone (in GitLab parlance). While at first heat pumps are a fairly technical concept, in the concept of temperature in OLives they also make a lot of sense, if you put an aircon unit somewhere, that exhaust heat has to go somewhere:

What made this tricky is that so far, the temperature modifiers operated under the assumption that there is an absolute target temperature. The exhaust temperature modifiers however need to work with a relative value.
With every object that is marked as heat pump, not only one, but two temperature modifiers are being created.
The first (primary) is created for every temperature modifying object (like the radiator), the second (exhaust) is marked as inactive as long as the first is not responsible for any actual temperature changes and its value gets updated as soon as the primary modifier is causing a different effect on its own tile.
This fit rather neatly into the existing concept, so even cases like the one below look weirdly nice:

I’m pretty happy to have this task behind me and I’m fairly happy with the result, next on the agenda is, probably, fleshing out the height map concept, which kind of exists in OLives, but hasn’t been touched in two years and is not exposed to the user at all right now. Stay tuned for more, bye. 🙂

Leave a Reply

Your email address will not be published.