-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
water rework part 1 #72252
water rework part 1 #72252
Conversation
You mentioned flowing sources and clearly stagnant ones - what about ponds and lakes? Those were not mentioned (unless I am VERY bad at reading). Any changes there? |
did you consider the approach of #72224, aka having parasites, toxic, dirt, chemicals etc being vitamins? |
I think that would be somewhat pointless in this case, as all the recipes would have to be using NUTRIENT_OVERRIDE to get rid of them. That would be more likely to accidentally allow inheritance than anything else. |
These still give
I didn't consider this. @RenechCDDA's point about accidental inheritance is a reasonable one, though I'd also like to allow non-accidental inheritance (i.e. cooking something with That said, I think we could take it in that direction in future if it makes sense. I still think we should split murky water out from regular "clear, somewhat unsafe" water in either case :) |
This is draft and the first commit is part 1, so I guess the potentially huge task of adding the new type of water to all relevant recipe is intended to be tackled in future parts. I would suggest the definition of a few different water groups recipes would draw from, rather than directly adding the new water variant to each applicable recipe (introduction of groups would still touch almost every water containing recipe, but at least make future recipes easier to define and make maintenance (and possible future further expansion) easier). |
Out of the scope of this PR, but we can probably change the crafting system to make some cooking methods reduce the nutrient/vitamin of the resulting item, so boiled water has no pathogen (and boiled vegetable losses vitamins). |
For what I know, "still" water is a much higher risk regarding its safety for consumption when compared to any "flowing" source of water.
Why stagnant water is considered worse than flowing water can be divided into at least three factors. One is that still water has a relatively lower level of dissolved oxygen (DO), which is a direct parameter for the quality of water (tl;dr water microbiota use oxygen to degrade organic matter, so they will consume most stuff that falls into the water with enough dissolved oxygen (and enough time). The alternative is that organic matter is not degraded and persists for much longer). Abnormal levels of organic matter in the water are (almost always) caused by human activity, therefore DO is a direct parameter for the quality of water and an indirect parameter for human pollution. DO levels do not affect Giardia viability and have a negative correlation for Cryptosporidium. I did not mention examples of anaerobic bacteria and DO tolerance, but their survival is also inversely proportional. Another factor is temperature. You can imagine that low temperatures allow stuff to persist for longer, whereas high temperatures (relative to the environment) proportionally reduce viability according to the temperature reached and time. For Giardia's viability, it is "significantly affected by temperature; as the temperature increases, survivability decreases". There's this very old study that tested the same thing over different seasons, with the same conclusion. For Cryptosporidium, freezing and high temperatures are able to reduce its viability. (which is interesting because freezing is not considered a safe way to decontaminate food) A third factor is that still water allows the formation of bacterial biofilm (in depth review article and a summary by EPA although it's for pipelines and not environmental water), which is bad by itself, and serves as a substrate for other organisms to grow and survive. For human pipelines, the worst case scenario is when the biofilm is produced by pathogenic bacteria (Legionella, E. coli, Pseudomonas, etc), cannot be cleared and serves as a "seed" for further contamination; biofilm itself is very difficult to clean once is stablished. You can imagine it's worse for environmental sources of water. At the same time, it's somewhat balanced by the fact environmental water does not have just pathogens living in it. Something up to debate is given water is virtually never sterile, why people are not sick all the time. The short answer is there's a tolerance threshold thanks to pathogenic load in the volume of consumption and each individual's immune system. Disease happens when this balance is compromised. It also explains asymptomatic humans as carriers for certain pathogens, i.e. cholera outbreaks.
IMO the best approach. The probability of not getting sick by drinking random, untreated water is modeled by two different types of water out there, with the survivor tolerating some amount of pathogens for the cleanest kind, most of the time. Additional references: This article contains the most common organisms monitored for contamination. |
On the suggestion of using vitamins to model disease agents. I think that vitamins is a bad way to model biological diseases. The reason is that these are organisms that can reproduce on their own so even a little bit of exposure has a chance to make you sick. The chances of getting sick increase the higher dose (drinking more) you are exposed to but it is still a chance not a certainty. It would be better to just have a flat chance of getting sick for every unit of unsafe water you consume. Vitamines would be a good model for more chemical polutins and toxins. It takes a set amount of polutins and toxins to get you sick. As long as you don´t go over this it should be fine (besides the health impact). So using vitamins to model the amount of a polutents or toxins in your systeem and how fast you eliminate them is a good idea. |
For most recipes
Agreed, groups are the right tool here.
Thanks for the detailed research @RedMisao, this seems to confirm that the current approach in the PR lines up more or less well with reality. We could potentially get more detailed here in future. |
Bringing this out of draft as I think this is ready for wider review. |
To add some context for why this is labeled "part 1", here are some things I'd like to address in followups:
|
shouldn't water purification tablets purify murky water directly into clean water? |
This is getting reworked in #71971, the idea with the single-tab recipe is that it takes twice as many tabs to take a given volume from murky to clean, and since the recipes are about to get reworked anyway I went with this mid-way solution. |
1 is an easy add. 2 may be more of a future addition |
@RanikOrtega Yeah, now that my 5gal bucket PR has been merged I can update this to use those instead of jerrycans. Jerrycans was a temp fix until the 5gal buckets were in, can update now :) |
Co-authored-by: osuphobia <78858975+osuphobia@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @osuphobia
IMO it's a hard sell to claim there are ENOUGH corpses upstream of or in water sources to meaningfully change this. It could certainly be the case if a particular source was contaminated though (as established by mapgen).
The one area where I think this would be meaningful would be "industrial type" contamination like heavy metals or other toxic substances instead of biological pathogens, since they have a different set of purification criteria. As for a bunch of types, probably just one type of "chemically tainted water" would be sufficient, along with places for it to spawn. |
Co-authored-by: osuphobia <78858975+osuphobia@users.noreply.github.com>
Co-authored-by: osuphobia <78858975+osuphobia@users.noreply.github.com>
Co-authored-by: osuphobia <78858975+osuphobia@users.noreply.github.com>
Do I remember correctly you need it to be in a transparent container and the sun needs to be shining fairly brightly on it for six hours? I don't think there's anything wrong with it I just wonder if the problem wouldn't be our ability to use solar radiance to track if it received enough sun, but more so that the PC is unerringly able to intuit which water has received the full six hours needed to be safe versus water that had not received that safe amount of sun. |
If I think about how I might personally judge this, I'd go something like "a whole day's worth of sun on a sunny day". So fudge the sun-hours up to 8 to account for the PC's caution and fallibility, mix in some "it says 6 hours but 5½ hours is probably still mostly fine" and call it good :) I think SODIS should probably be a recipe..? i.e. turn container + water into a new "water_disinfecting" item, and have the description mention leaving it in the sun. The item can acquire sun-hours over time and when it gets to 8 it turns into container + water_clean. The annoying thing would be allowing the recipe to use any of the various different transparent containers...
each with different amounts of water. The alternative would be to check solar irradiance for all water in bottles anywhere, which might be a bit expensive, but would get around the recipe explosion problem. |
oof yeah recipe explosion indeed. At least we have the transparent flag already for containers you can see through. I really don't know the best way to go forward on this idea though. |
What about using something like the funnel rain catcher, or failing that, something like a stooking spot? I believe funnels are technically a trap, and stooking spots are hardcoded but it's a simple method to copy. |
Given that it seems to be foggy a third of the time each day and not sunny at other times I think it will be rather tricky to determine when enough sunlight has been absorbed. However, it seems this problem is similar to that of determining the radiation received by solar panels. |
After this change I cant use swamp not salty water for crafting clay items. Is it a bug or feature? |
@KHeket that's a known piece of remaining work, see #72252 (comment) |
Summary
Content "Add murky water, make regular water safer"
Purpose of change
Ref #72. The goal is to make water purification more accurate and interesting,
exposing more of the simulation to the player (while also simplifying the
simulation in some dimensions).
Describe the solution
Water from moderately-clean sources like flowing rivers and from rain is now
mostly safe to drink. It has no parasites, and carries a small chance of
contracting a waterborne disease (roughly, giardiosis or cryptosporidiosis).
Water from murky sources like puddles and swamps now gives a new item, "murky
water", which must be filtered using either purification tablets or a gravel/sand
filter to become regular water. Murky water is still technically drinkable, but
has a 20% chance of parasites and will guaranteed make you sick.
I've added a new type of water filter, an improvised slow sand filter, which can be used to filter murky water into water. Arguably this sort of filter could even produce clean water, but given the improvised nature and the fact that I haven't modeled any time for biofilm creation or maintenance, I think this is a reasonable compromise for simplicity.
Changes
water_murky
.water_spring
.water
from rain, toilets, rivers and ponds is no longer poisoned, but instead has a small chance to inflictbad_food
orhighly_contaminated_food
.SPAWN_WITH_LIQUID
andFRESH_WATER
intoSPAWN_WITH_WATER
.water_filter_sand
, a slow-sand biofilter.water
fromwater_murky
using a slow-sand filter.water
fromwater_murky
using a water purification tabletSPAWN_WITH_WATER
+MURKY
on terrain now spawnswater_murky
."examine_action": "water_source"
now givewater_murky
if it has theMURKY
flag.References
Describe alternatives you've considered
Testing
Additional context