refactor: move Weather instance to WorldInfo

This commit is contained in:
MihailRis 2025-02-28 18:49:44 +03:00
parent 0ea842580c
commit 9c4db8fa10
9 changed files with 116 additions and 61 deletions

View file

@ -4,9 +4,10 @@
#include <string>
#include <vector>
#include "io/fwd.hpp"
#include "content/ContentPack.hpp"
#include "interfaces/Serializable.hpp"
#include "io/fwd.hpp"
#include "Weather.hpp"
#include "typedefs.hpp"
#include "util/timeutil.hpp"
@ -33,7 +34,6 @@ struct WorldInfo : public Serializable {
/// 0.5 - is noon
float daytime = timeutil::time_value(10, 00, 00);
// looking bad
float daytimeSpeed = 1.0f;
/// @brief total time passed in the world (not depending on daytimeSpeed)
@ -46,6 +46,8 @@ struct WorldInfo : public Serializable {
int major = 0, minor = -1;
Weather weather {};
dv::value serialize() const override;
void deserialize(const dv::value& src) override;
};