add fall.max_opacity, fall.opaque properties & update snow texture & weather mix test

This commit is contained in:
MihailRis
2025-02-26 06:24:05 +03:00
parent 18773b3230
commit 589518fb25
9 changed files with 57 additions and 21 deletions
+6
View File
@@ -11,6 +11,9 @@ dv::value WeatherPreset::serialize() const {
froot["hspeed"] = fall.hspeed;
froot["scale"] = fall.scale;
froot["noise"] = fall.noise;
froot["min_opacity"] = fall.minOpacity;
froot["max_opacity"] = fall.maxOpacity;
froot["opaque"] = fall.opaque;
if (fall.splash) {
froot["splash"] = fall.splash->serialize();
}
@@ -32,6 +35,9 @@ void WeatherPreset::deserialize(const dv::value& src) {
froot.at("hspeed").get(fall.hspeed);
froot.at("scale").get(fall.scale);
froot.at("noise").get(fall.noise);
froot.at("min_opacity").get(fall.minOpacity);
froot.at("max_opacity").get(fall.maxOpacity);
froot.at("opaque").get(fall.opaque);
if (froot.has("splash")) {
const auto& sroot = froot["splash"];