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

warn player before drinking water not known to be clean #36065

Merged
merged 8 commits into from
Dec 22, 2019

Conversation

misterprimus
Copy link
Contributor

Drink regular old "water"

Summary

SUMMARY: Interface "Adds warning when player tries to drink water that has not been purified."

Purpose of change

I always accidentally drink unclean water, but 99.9% of the time it makes no sense to do so since clean water is so easy to make. So I added this feature to save some folks the aggravation of having to deal with parasites for a week because they picked the wrong water.

Describe the solution

Creates prompt warning a player when he tries to drink water, kind of like drinking bleach, but less severe of a warning (different text) since "water" is not quite as bad as "bleach" for drinking.

Describe alternatives you've considered

Testing

Tried to drink water and clean water.

Additional context

I think I did the string_format right this time to make it translatable. Can someone confirm?

src/iuse.cpp Outdated Show resolved Hide resolved
src/iuse.cpp Outdated Show resolved Hide resolved
src/iuse.cpp Outdated Show resolved Hide resolved
misterprimus and others added 3 commits December 13, 2019 13:17
Co-Authored-By: Anton Burmistrov <[email protected]>
Co-Authored-By: Anton Burmistrov <[email protected]>
@curstwist curstwist added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Info / User Interface Game - player communication, menus, etc. labels Dec 14, 2019
@kevingranade
Copy link
Member

This causes an NPC AI test to fail of all things, but it might be indicative of a problem, can NPCs drink not-clean water after this change?

@misterprimus
Copy link
Contributor Author

misterprimus commented Dec 17, 2019

This causes an NPC AI test to fail of all things, but it might be indicative of a problem, can NPCs drink not-clean water after this change?

I'm going to try to insert this as its own function instead of calling BLECH and bypassing individual BLECH sections. That might solve the problem if my changes caused it to begin with.

@misterprimus
Copy link
Contributor Author

This causes an NPC AI test to fail of all things, but it might be indicative of a problem, can NPCs drink not-clean water after this change?

I think I fixed it. Now it only triggers if used by the player, not by NPCs (who do not really need warnings anyway).

@kevingranade kevingranade merged commit 78e1ce6 into CleverRaven:master Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants