mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 13:31:49 +00:00
refactor: move Weather instance to WorldInfo
This commit is contained in:
parent
0ea842580c
commit
9c4db8fa10
9 changed files with 116 additions and 61 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue