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

Allowed Snowstorms to happen - added snow wet and glare effects ( and fixed test_weather ) #27870

Merged
merged 8 commits into from Feb 4, 2019

Conversation

ghost
Copy link

@ghost ghost commented Jan 25, 2019

Summary

SUMMARY: Features "Enabled snowstorms - wet and glare effects for snow"

Purpose of change

Snowstorms were coded but never happened due to the condition for them to appear.
Snow had no weather effects.
Test_weather was outputting numbers seperated by a comma, to a csv file, messing up the separation, it also didnt output all weather types, it also used a random seed each call to get_weather.

Describe the solution

I've enabled a rare-ish condition for snowstorms to appear.
Snow and Snowstorms add wet effects ( less than rain )
Snow and snowstorms add snow_glare effect.
Gave a constant seed to test_weather, made the separators a semi-colon.
Added weather_type ( cloudy, sunny ) and wind speed and direction to the weather test output.

Describe alternatives you've considered

N/A

Additional context

N/A

@KITbutler
Copy link

I'm not familiar with the weather code but to me it looks like you are applying the snow_glare while the snow(storm) is occurring. I hope that statement in itself illustrates the mistake.

@ghost
Copy link
Author

ghost commented Jan 25, 2019

Suggesting that during a snow storm, there would be so little light there would be little glare...
Yes.
Unfortunately the game has no way to track how much snow is on the ground...
I will remove from snow storm and keep on snowing, snow storm has reduced visibility as it is.

@KITbutler
Copy link

If it isn't a thing already try adding glare to winter sunrise+sunset (or just all sunny periods) since this is what I would call "decent" visibility when facing the winter sun.

@ghost
Copy link
Author

ghost commented Jan 25, 2019

Glare is present on all days when weather_type is "Sunny" already.
Direction of sun to causing glare ( sunset, sunrise ) is something I'm thinking of.

src/weather.cpp Outdated Show resolved Hide resolved
@ghost
Copy link
Author

ghost commented Jan 26, 2019

Sorry to add feature while being reviewed, but it's little.
Just added a windspeed condition before snowstorm is created.
and added a snowstorm trigger to the soundpack environments, if a soundpack wishes to make use of it.

@ZhilkinSerg ZhilkinSerg added <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Weather Rain, snow, portal storms and non-temperature environment labels Jan 27, 2019
@kevingranade kevingranade merged commit 4b99824 into CleverRaven:master Feb 4, 2019
@@ -606,6 +607,8 @@ void sfx::do_ambient()
case WEATHER_SUNNY:
case WEATHER_CLOUDY:
case WEATHER_SNOWSTORM:
play_ambient_variant_sound( "environment", "WEATHER_SNOWSTORM", heard_volume, 20,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe WEATHER_SNOWSTORM would now play for sunny,cloudy and snowstorm weather. That's not your totally your fault though - previously WEATHER_SNOW would now play for sunny, cloudy and snow weather.

ZhilkinSerg added a commit that referenced this pull request Feb 6, 2019
* upstream/pr/28084: (88 commits)
  Fix wet morale cycling
  clear player morale effects in clear_player (#28045)
  Adds some money types. (#27963)
  You lived your life, like a candle in the wind... (#27935)
  [CR] Joint torsion ratchet CBM increases stamina drain (toggleable) (#27882)
  Allowed Snowstorms to happen - added snow wet and glare effects ( and fixed test_weather ) (#27870)
  I didn't make this mod! (#28033)
  Replaced popup with a message in a sidebar
  Added a popup after the start describing scenario
  Added Color manager mention to COLOR.md (#27991)
  Fix some more mission completion dialog bugs
  Fix NPC dialog around lying and succeeding mission
  Update MSX++DeadPeopleEdition 2019-01-31
  Update RetroDays - Mouse mutants, mailboxes
  Update lab_1.json
  Clear traps in test clear_map helper
  Fixed cyan color in COLOR.md (#27969)
  Update gfx/RetroASCIITileset/tile_config.json
  RetroAscii tileset - cleanup, update, lint
  Add lab terrain
  ...
@ghost ghost deleted the snowstorm_fix branch February 8, 2019 11:14
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` <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON Mechanics: Weather Rain, snow, portal storms and non-temperature environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants