Commit 70750c1d

Add new UI widget that shows a current value on a range (WiP)

Relates to #60

Hello, this commit adds the ground work for the new UI widget similar to the existing StatusBar. Unilke the StatusBar though it will show how a passed value is doing in relation to a pre-defined range, as well as using configurable colours for that range:

As you can see right now there is no indicator yet, worse even, sometimes due to a race-condition it is rendered black, but I felt it’s a good point as any to make a quick commit. See you next year!

Commit e2fa1fe7

Implement temperature modifiers for non-room tiles (aka”outside”)

Resolves #62

Hello! This commit, unlike what the slightly commit confusing message says, does not actually implement temperature modifiers for the “outside world”, but actually lets the already existing modifiers have an effect on the overall tile temperature information.
The entire bookkeeping aspect was already fully (albeit slightly buggy as it turned out) implemented, the modifiers simply did nothing, that is however different now as can be seen on the screenshot below:

Next up the focus will go on the UI, as a new element will be needed to show the temperature state of the agents, depending on their tile position (temperature of the tile they are on). Stay tuned for that change, byeee. 🙂

Commit 3e49fbda

Move the task of spreading temperature changes from the modifiers to a more generic solution

Relates to #62

Hi! This commit changes the way the per-tile temperature is being calculated, before it was the temperature modifier’s responsibility (e.g. a radiator that generates heat) to, well, radiate heat from its point of origin.
This approach was changed so that the temperature modifier is only changing the temperature of the tile it is being placed on, the propagation (and subsequent drop-off) of that is being done by doing a weighted averaging of the surrounding temperatures for every tile.
Walls have a very insulating effect, doors and windows less so. Since a picture says more than a thousand words, look at the following picture:

Even though I cleverly choose a bad lighting situation, you can see three distinct heat sources (radiator objects) here, all the rooms (except the one at the top right) are connected by doors, so you can actually see how the heat is spreading through the building “naturally”. 🙂
Next up is doing something similar for the outside world and trying to figure out how to implement heat pumps the best way, but hopefully that should not take too long. 🙂

Commit 4ffc5f9e

Partially implement per-room temperature calculation

Relates to #62

Hello! Finally there are some visual changes as well:

What can be seen here is the temperature modifiers working as intended, the heat is then spread out by calculating the average around individual tiles. What this is still not doing this is:

  • Take a time aspect into consideration, the effect is immediate
  • Differentiate between “air” and “walls”, so there is no insulating effect yet
  • Support heat pumps properly

So the ticket is still far from done, however finally useful progress can be seen. 🙂

Commit 568295a3

Automatically re-assign temperature modifiers when the room topology changes. Refactor the object-to-modifier mapping code on the game state.

Resolves #64

Hi! This commit came a fair bit quicker than the previous one 🙂 This finishes the legwork of having all the different modifier information in the right place, so next up is actually using all this data and calculating per-tile temperature values, then finally one should be able to see visual differences when activating the temperature view. Stay tuned!

Commit 3ac845f1

– add another temperature related configuration option
– change internal implementation of the configuration getter functions to a generic template for all data types
– flesh out format for temperature modifier JSON configurations
– properly validate object type configurations upon start-up
– extend the python API to allow adding and removing of temperature modifiers
– change code formatting style in relation to functions with long parameters whenever coming across it
– change some defines into const expressions
– add logic for temperature modifier similar to the light source logic to the room manager
– further extend the actual temperature modifier definition to handle all use cases (i can currently think of)
– refactor some light source utility code in the room manager so that it can reused for temperature modifiers
– add logic for mapping temperature modifying objects to actual temperature modifiers (and create/move/delete the modifiers as needed)
– add additional code in the object manager that triggers the mapping creation/update/deletion when objects marked as temperture modifiers get changed (WiP, it is currently still inlined in places it does not belong and needs to be moved elsewhere)

Relates to #64

Hello! It’s been a pretty long time, but unfortunately some good old scope creep made this commit grow bigger and bigger. Be that as it may, most of these items should be more or less self-descriptive and it would be frankly a bit tedious to take this apart item by item.
To sum things up, it got the entire temperature modifier concept a bit closer to a practical application. Unfortunately I cannot show a screenshot here, as all the changes (even though there were plenty) have no visual effect yet whatsoever, but that should change soon.
I already made up my mind concerning the scope for the next ticket, which will be a very small fraction of the above, so stay tuned. Byeee.