-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Move weather into JSON #41617
Merged
Merged
Move weather into JSON #41617
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Great job! |
Damn :) Can you please make |
BevapDin
reviewed
Jun 27, 2020
BevapDin
reviewed
Jun 27, 2020
BevapDin
reviewed
Jun 27, 2020
BevapDin
reviewed
Jun 27, 2020
BevapDin
reviewed
Jun 27, 2020
BevapDin
reviewed
Jun 27, 2020
BevapDin
reviewed
Jun 27, 2020
BevapDin
reviewed
Jun 27, 2020
BevapDin
reviewed
Jun 27, 2020
BevapDin
reviewed
Jun 27, 2020
BevapDin
reviewed
Jun 27, 2020
BevapDin
reviewed
Jun 28, 2020
BevapDin
reviewed
Jun 28, 2020
BevapDin
reviewed
Jun 28, 2020
BevapDin
reviewed
Jun 28, 2020
BevapDin
reviewed
Jun 28, 2020
BevapDin
reviewed
Jun 28, 2020
BevapDin
reviewed
Jun 28, 2020
Co-authored-by: anothersimulacrum <anothersimulacrum@gmail.com>
kevingranade
approved these changes
Jul 8, 2020
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`
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
[JSON]
Changes (can be) made in JSON
Mechanics: Weather
Rain, snow, portal storms and non-temperature environment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Infrastructure "Move weather from being hardcoded into json."
Purpose of change
Part of setup for #41067
Hardcoded = bad
Allow ability via json to add. delete, or change all weather.
Describe the solution
Added weather_types and weather_types.json. Weather_type defines the behavior and types of weather. All references to specific weather in code have been replaced by references to weather properties and the weather enum has been replaced with a vector. Regional_map.json now contains a list of weather ids allowed. No functional changes other than one minor change to some weathers rate of extinguishing torches.
When deciding the weather this array is iterated over and each elements requirements are tested, the last entry with valid requirements is chosen. At the moment requirements are what the existing weather used, such as humidity, temperature, pressure, or another weather being true already.
Updated documentation
Describe alternatives you've considered
Testing
Used debug conmmands to generate weather test data, set various weathers and observe results.
Additional context
Future PRs are planned to expand both requirements and weather effects. Providing freedom to make weather depend on random events or time intervals and cause all effects and or monster spawns, injury, radiation.