Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop player from getting frozen water from map water sources #28979

Merged
merged 1 commit into from Mar 25, 2019

Conversation

Projects
None yet
7 participants
@Hirmuolio
Copy link
Contributor

commented Mar 25, 2019

Summary

SUMMARY: Bugfixes "Stop player from getting frozen water from map sources"

Purpose of change

Filling containers from lakes/rivers/water pumps during winter would give you frozen water. No more.

It is mentioned in #28882 but I believe the original bug (about toilet) there to be something else.

Describe the solution

When player gets water from these sources the liquid is created on the fly. Since the liquid has no defined temperature yet it is set to the enviroment temperature.

When enviroment was below 0 C this would cause the liquid to be frozen. But it doesn't make much sense to pour frozen water into your 60l metal tank

Now the temperature is set to be max( enviroment, 4 C).

Describe alternatives you've considered

Water tiles should track their own temperature so that lakes would freeze during winter. But this quick fix will work too.

Additional context

@Photoloss

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

For a less obviously unrealistic fix is there a way to add conditional tool requirements to liquid retrieval? Bodies of water not freezing solid is crucial to the survival of many freshwater fish but you'd need a drill, hammer and/or a chiselling tool to break the surface ice.

Capping it to 4°C is not fully accurate either, while the bulk of a lake can indeed maintain that temperature the layer immediately below the ice will be close to freezing and may in fact begin freezing almost instantly once deprived of the insulating ice layer and poured into a metal tank. A proper implementation of the enthalpy of fusion in addition to the very high heat capacity and poor thermal conductivity of water should prevent most freezing issues in the long run without hardcoding a cap.

@Hirmuolio

This comment has been minimized.

Copy link
Contributor Author

commented Mar 25, 2019

I thought about setting the lower limit to 0 C too. But in the current state the code doesn't differentiate between different water sources so the same code is being used for both water tiles and water pumps. I don't think rewriting the system to work differently on different water sources just for this one thing would be good use of time.

The exact temperature of items is hidden from the player anyways so I just picked a good enough value.

(enthalpy of fusion and heat capacity are already implemented for items)

@Zireael07

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

Pouring frozen water should just be blocked. It makes sense for the water to be frozen in winter in a variety of places (rivers, small ponds). For lakes, for simplicity's sake, we can agree on the 4C rule.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Mar 25, 2019

Until we have support for the terrain itself acting like it's frozen, this should be Good Enough™️
We also need a way to e.g. harvest chunks of ice before we handle larger bodies of water freezing over.

@int-ua

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

How about adding ability to get chunks of ice with hammering 1 and/or bashing? Possibly better with chainsaw/pickaxe. Also water breaks glass containers when freezing because it expands slightly.

Edit: I typed it before seeing Kevins' comment.

@Hirmuolio

This comment has been minimized.

Copy link
Contributor Author

commented Mar 25, 2019

There is currently no information on t he state of water in water tile.
You can't say for certain its properties from current temperature. It takes several days for ice to form/melt and we only know the temperature right now.

Water freezing in water tight glass containers breaking the container would be quite easy to implement.

@Inglonias

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

Larger bodies of water typically do not freeze solid in the winter. We can justify this for now by saying that you can punch through the top layer of ice to get the water you need.

@ZhilkinSerg ZhilkinSerg merged commit 71fd5f2 into CleverRaven:master Mar 25, 2019

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
gorgon-ghprb Build finished.
Details
@kevingranade

This comment has been minimized.

Copy link
Member

commented Mar 29, 2019

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/water-drawn-from-ponds-may-be-frozen-in-summer/19432/6

@Hirmuolio Hirmuolio deleted the Hirmuolio:Hirmuolio-watertemp branch Apr 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.