Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up[CR]Regional weather settings #17500
Conversation
Coolthulhu
force-pushed the
cataclysmbnteam:weather-gen
branch
Jul 25, 2016
This comment has been minimized.
This comment has been minimized.
|
Rebased |
Coolthulhu
force-pushed the
cataclysmbnteam:weather-gen
branch
Aug 9, 2016
This comment has been minimized.
This comment has been minimized.
|
Rebased |
This comment has been minimized.
This comment has been minimized.
|
Sorry I haven't given this much prior attention. I'm not completely certain what it does. Could you explain a little and I'll take a look? |
This comment has been minimized.
This comment has been minimized.
|
. <-- |
This comment has been minimized.
This comment has been minimized.
Moves the responsibility to provide weather data from |
mugling
self-assigned this
Sep 11, 2016
This comment has been minimized.
This comment has been minimized.
|
I'm struggling to rebase, in particular |
This comment has been minimized.
This comment has been minimized.
|
Rebased on my side just fine. Could be different mergetools or git settings. Will push if it compiles and works. |
Coolthulhu
added some commits
Sep 11, 2016
Coolthulhu
force-pushed the
cataclysmbnteam:weather-gen
branch
to
928dc84
Sep 11, 2016
This comment has been minimized.
This comment has been minimized.
|
OK, I think I got it working. |
This comment has been minimized.
This comment has been minimized.
|
How do I generate deserts? |
This comment has been minimized.
This comment has been minimized.
|
When generating a world, there is a terrain type option defaulting to "default". It should allow switching it to desert_test (or test_desert). |
This comment has been minimized.
This comment has been minimized.
|
Still fails to compile at |
This comment has been minimized.
This comment has been minimized.
|
What error? |
codemime
reviewed
Sep 11, 2016
| constexpr double base_h = 66.0; // Average humidity | ||
| constexpr double base_p = 1015.0; // Average atmospheric pressure | ||
| // GCC doesn't like M_PI here for some reason | ||
| constexpr double PI = 3.141592653589793238463; |
This comment has been minimized.
This comment has been minimized.
codemime
reviewed
Sep 11, 2016
| double base_temperature = 6.5; // Average temperature of New England | ||
| double base_humidity = 66.0; // Average humidity | ||
| double base_pressure = 1015.0; // Average atmospheric pressure | ||
| double base_acid = 0.0; |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
BevapDin
reviewed
Sep 13, 2016
| @@ -208,6 +209,7 @@ void DynamicDataLoader::initialize() | |||
| add( "gate", &gates::load_gates ); | |||
| add( "overlay_order", &load_overlay_ordering ); | |||
| add( "mission_definition", []( JsonObject &jo ) { mission_type::load_mission_type( jo ); } ); | |||
| add( "weather_settings", &weather_generator::load ); | |||
This comment has been minimized.
This comment has been minimized.
BevapDin
Sep 13, 2016
Contributor
The static load function loads and returns the object, but it's not stored anywhere. And there is no object with "type": "weather_settings" in any JSON file, so this will (currently) not be triggered anyway. The code for the regional settings loads the generator explicitly, without using the DynamicDataLoader.
This comment has been minimized.
This comment has been minimized.
|
So we can just drop the offending line entirely? |
This comment has been minimized.
This comment has been minimized.
|
Now compiles ok |
Coolthulhu commentedJul 3, 2016
Per-regional-setting temperature, humidity, pressure and acidity.
As an example I changed the desert region settings to be very dry and slightly warmer than default ones.
The acid setting isn't used anywhere, but someone might want to turn it on and it was trivial to add.
[CR] because I moved randomness seed from weather generator to game and weather generator out of game and into regional settings (which in turn are an overmap field). And because some of the code looks rather unelegant because of that.