[1.4] Reversible & Geothermal Heat Pumps

Started by pinemach, May 13, 2023, 06:18:09 PM

Previous topic - Next topic

pinemach


On the Steam Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=2975382296

Direct download: https://files.pineapplemachine.com/public/rimworld/mods/HeatPump.2023.05.14.zip

This mod, including its assets and source code, are released under the MIT license.

---

This mod adds two new temperature-related buildings based on modern real-world technology, each of which must be unlocked via newly-added research projects.

Each of these buildings is more expensive to build than a Heater or a Cooler, and each one requires its own research project to unlock. However, they are more versatile, more space-efficient, and generally more power-efficient than a Heater and Cooler combo.


Heat pump: A reversible heat pump. It functions similarly to a Cooler, but it can either cool a room and exhaust hot air, or warm a room and exhaust cold air, whichever is needed to achieve the target temperature. It is more power efficient than either a Heater or Cooler, but it requires more resources to build.

Be aware that, similar to their real-life equivalents, a heat pump will not operate at optimum efficiency when trying to keep a room cooled below 0°C, or when trying to heat a room while the outdoor temperature is below 0°C. The lower the temperature, the more efficiency will suffer. At -50°C, it will not be able to draw heat out of the air at all.


Geothermal heat pump: This more advanced temperature control building is more expensive to research and to build than a normal reversible heat pump. Because it uses an underground heat exchanger instead of an exhaust fan, it is placed within a structure instead of on an exterior wall. And because it draws heat from the ground instead of the exterior air, it remains an efficient source of heat even in the most lethally cold climates.



SuDmit

Hi Pineapple! I've had an idea to implement some support for features of over-wall cooler building from ReplaceStuff mod by Uuugggg. And finally managed to do it in form of some xml defs, xpath xml patches, and c# Harmony code. Everything is at https://github.com/SuDmit/modding-things/tree/main/Rimworld/HeatPump. Merging files with your original ones and recompiling should work.
But sadly it turns Harmony into dependency (I guess it is no good when mod itself does not use it), and all my attempts to only use it conditionally failed. Maybe you or anyone else have some ideas for this?
Or maybe I should condense all that into a standalone patch-like mod that is loaded independently and has Harmony, ReplaceStuff and HeatPump?

pinemach

#2
I think a patch mod sounds like a good idea! I'd definitely prefer that to introducing new dependencies or complexity to the base mod. Let me know when you upload a patch mod, and I'm happy to link to it in the Workshop for the base mod. (Though I'm replying late to this post because I guess I'm not getting any kind of notifications for replies here. To make sure I see your message in a timely manner, try also pinging me on Steam?)