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

Add TRANSLUCENT terrain flag which blocks vision but not light #76290

Merged
merged 10 commits into from
Sep 10, 2024

Conversation

GuardianDll
Copy link
Member

@GuardianDll GuardianDll commented Sep 8, 2024

Summary

None

Purpose of change

Reopen #61872

Describe the solution

Fix conflicts mostly

Testing

image
with flashlight inside at night
image

Additional context

Previous PR was drafted because it was pointed terrain should not require TRANSPARENT flag, i fixed it

RAldrich and others added 6 commits October 22, 2022 16:51
TRANSLUCENT can be used in combination with TRANSPARENT to create tiles which admit light but block vision,
such as fosted glass, stained glass, or to simulate tall walls with small windows placed high up.

This is a binary implementation, which does not leverage the transluceny and lighting falloff system used by (e.g.) fields.
This approach was taken in order to simplify the developer experience: you can simply add a flag to the terrain without having
to know precisely what transluceny value would be requried to block all vision through the tile. Future work could leverage the
transluceny and lighting falloff system to enable (e.g.) semi-translucent windows that let you see just a few tiles out.
@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Code: Tests Measurement, self-control, statistics, balancing. [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-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Sep 8, 2024
@GuardianDll GuardianDll marked this pull request as ready for review September 8, 2024 18:17
@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [Markdown] Markdown issues and PRs labels Sep 8, 2024
@ashGlaw
Copy link
Contributor

ashGlaw commented Sep 8, 2024

Excellent idea! I've wanted this functionality for a while

Vgoloshivskiy pushed a commit to Vgoloshivskiy/Cataclysm-DDA that referenced this pull request Sep 8, 2024
tests/vision_test.cpp Outdated Show resolved Hide resolved
src/lightmap.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Sep 9, 2024
@Maleclypse Maleclypse merged commit 9dea210 into CleverRaven:master Sep 10, 2024
28 checks passed
@GuardianDll GuardianDll deleted the transluscent branch September 10, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. <Documentation> Design documents, internal info, guides and help. Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants