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 nightvision limb score #52409

Merged
merged 3 commits into from Oct 26, 2021
Merged

Conversation

Venera3
Copy link
Contributor

@Venera3 Venera3 commented Oct 23, 2021

Summary

Features "Add dedicated night vision score to limbs"

Purpose of change

Some groundwork in the process of moving mutant limbs (eyes, in this case) to the new limb system. Defining how well an eye sees in the dark separately to how it impacts aiming speed and such (governed by vision_score) allows for differentiating between the different eyes and permits me to remove some hardcodedness around the nightvision mutations.

Describe the solution

Replaced the vision_score multiplier in character::get_vision_threshold with a new nightvision_score and added it to base eyes.

Describe alternatives you've considered

Require a set vision score on a limb for it to contribute to nightvision, but we'll have to do a lot of that kind of limiting anyway when we get to players sprouting extra limbs (the first pass will be restricted to replacing existing limbs, mostly).

Testing

Changed eyes to have a nightvision score of 0 and added a score of 1 bulging eyes and a score of 6 to cephalopod eyes. Could not see in the dark per default, could see as normal with bulging eyes and about 6x the range with ceph eyes,

Additional context

Also updated the documentation with the effect of limb scores.
@KorGgenT

@BrettDong BrettDong added [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Character / Player Character / Player mechanics labels Oct 23, 2021
@PatrikLundell
Copy link
Contributor

Could this system be modified to handle night blindness as well (i.e. night vision worse than with standard eyes)?

@Venera3
Copy link
Contributor Author

Venera3 commented Oct 23, 2021

You'd need a replacement eye (with a score<1) essentially, but that can be handled by the trait. Until armor can deal with the dynamic limbs that would be a problem (see #51294 for the to-do), but when that's sorted out it should be trivial to add.

doc/JSON_INFO.md Outdated Show resolved Hide resolved
doc/JSON_INFO.md Outdated Show resolved Hide resolved
Co-authored-by: NetSysFire <59517351+NetSysFire@users.noreply.github.com>
@kevingranade kevingranade merged commit 03abd4f into CleverRaven:master Oct 26, 2021
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` Mechanics: Character / Player Character / Player mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants