mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
add 'thunder_rate' weather property
This commit is contained in:
parent
aed7c1c5b8
commit
0ea842580c
5 changed files with 29 additions and 2 deletions
|
|
@ -23,6 +23,7 @@ dv::value WeatherPreset::serialize() const {
|
|||
root["fog_dencity"] = fogDencity;
|
||||
root["fog_curve"] = fogCurve;
|
||||
root["clouds"] = clouds;
|
||||
root["thunder_rate"] = thunderRate;
|
||||
|
||||
return root;
|
||||
}
|
||||
|
|
@ -49,4 +50,5 @@ void WeatherPreset::deserialize(const dv::value& src) {
|
|||
src.at("fog_dencity").get(fogDencity);
|
||||
src.at("fog_curve").get(fogCurve);
|
||||
src.at("clouds").get(clouds);
|
||||
src.at("thunder_rate").get(thunderRate);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ struct WeatherPreset : Serializable {
|
|||
/// @example if 0.8 then opacity range is 0.8-1.0 for 0.0-1.0 intensity
|
||||
float minOpacity = 0.0f;
|
||||
float maxOpacity = 1.0f;
|
||||
/// @brief Clip texture by alpha channel
|
||||
bool opaque = false;
|
||||
/// @brief Fall splash
|
||||
std::optional<ParticlesPreset> splash;
|
||||
|
|
@ -37,7 +38,9 @@ struct WeatherPreset : Serializable {
|
|||
float fogCurve = 1.0f;
|
||||
|
||||
float clouds = 0.0f;
|
||||
|
||||
|
||||
float thunderRate = 0.0f;
|
||||
|
||||
/// @brief Weather effects intensity
|
||||
float intensity = 1.0f;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue