mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 04:21:50 +00:00
make BlockMaterial serializable
This commit is contained in:
parent
862ac496a8
commit
9e28b783fd
4 changed files with 26 additions and 9 deletions
|
|
@ -10,6 +10,7 @@
|
|||
#include "maths/aabb.hpp"
|
||||
#include "typedefs.hpp"
|
||||
#include "util/EnumMetadata.hpp"
|
||||
#include "interfaces/Serializable.hpp"
|
||||
|
||||
struct ParticlesPreset;
|
||||
|
||||
|
|
@ -116,14 +117,16 @@ VC_ENUM_END
|
|||
using BoxModel = AABB;
|
||||
|
||||
/// @brief Common kit of block properties applied to groups of blocks
|
||||
struct BlockMaterial {
|
||||
struct BlockMaterial : Serializable {
|
||||
std::string name;
|
||||
std::string stepsSound;
|
||||
std::string placeSound;
|
||||
std::string breakSound;
|
||||
std::string hitSound;
|
||||
|
||||
dv::value serialize() const;
|
||||
dv::value toTable() const; // for compatibility
|
||||
dv::value serialize() const override;
|
||||
void deserialize(const dv::value& src) override;
|
||||
};
|
||||
|
||||
/// @brief Block properties definition
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue