A slightly less naïve implementation of #371. Every sampler specified in an EXPRESSION sampler generates two functions: sampler(Point) and samplerSalted(Point, double). The salted version requires an additional, mandatory argument for salt, per Astrash's recommendation.
May require a documentation change to record the existence of this feature and to warn against duplication of function names. Though highly unlikely, this change breaks config packs that result in name duplication.
The previous PR was closed so that the git history can be made cleaner without the need for revert commits.
Again open for any feedback at all.
Closes #371.
Changelog
[x] Add additional salted version of samplers in EXPRESSIONs.
Checklist
Mandatory checks
[x] The base branch of this PR is an unreleased version branch (that has a ver/ prefix)
or is a branch that is intended to be merged into a version branch.
[x] There are no already existing PRs that provide the same changes.
[x] The PR is within the scope of Terra (i.e. is something a configurable terrain generator should be doing).
[x] Changes follow the code style for this project.
[x] I have read the CONTRIBUTING.md
document in the root of the git repository.
Types of changes
[ ] Bug Fix
[ ] Build system
[ ] Documentation
[x] New Feature
[ ] Performance
[ ] Refactoring
[ ] Repository
[ ] Revert
[ ] Style
[ ] Tests
[ ] Translation
Compatibility
[ ] Introduces a breaking change
[x] Introduces new functionality in a backwards compatible way.
[ ] Introduces bug fixes
Documentation
[x] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
Testing
[ ] I have added tests to cover my changes.
[x] All new and existing tests passed.
Licensing
[x] I am the original author of this code, and I am willing to
release it under GPLv3.
[ ] I am not the original author of this code, but it is in public domain or
released under GPLv3 or a compatible license.
Pull Request
A slightly less naïve implementation of #371. Every sampler specified in an
EXPRESSION
sampler generates two functions:sampler(Point)
andsamplerSalted(Point, double)
. The salted version requires an additional, mandatory argument for salt, per Astrash's recommendation.May require a documentation change to record the existence of this feature and to warn against duplication of function names. Though highly unlikely, this change breaks config packs that result in name duplication.
The previous PR was closed so that the git history can be made cleaner without the need for revert commits.
Again open for any feedback at all.
Closes #371.
Changelog
EXPRESSION
s.Checklist
Mandatory checks
ver/
prefix) or is a branch that is intended to be merged into a version branch.CONTRIBUTING.md
document in the root of the git repository.Types of changes
Compatibility
Documentation
Testing
Licensing