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

Replace hardcoded water terrain checks with flags #40304

Merged
merged 1 commit into from
May 8, 2020

Conversation

anothersimulacrum
Copy link
Member

Summary

SUMMARY: None

Purpose of change

This should expand coverage and make sure that all shallow and deep water types are appropriately used.
Besides, hardcoding specific terrains is bad.

Describe the solution

Replace checks for specific water terrains with check for terrain flags.
Added shallow water terrain flag.
Documented terrain flag, and added it to all appropriate terrains.

Describe alternatives you've considered

Leaving hardcoded terrain checks in?

Testing

Teleport under a river and attempt to mine a stair up. Receive a message about there being water above.
Open advanced inventory, and set one of the panes to be over water. See that it shows WATER in the pane.
I am not set up to test sounds, but to do so, enable a soundpack and walk through water.

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. labels May 7, 2020
doc/JSON_FLAGS.md Outdated Show resolved Hide resolved
This should expand coverage and make sure that all shallow and deep
water types are appropriately used.
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` Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants