add block.materials table
This commit is contained in:
@@ -8,6 +8,15 @@
|
||||
#include "presets/ParticlesPreset.hpp"
|
||||
#include "util/stringutil.hpp"
|
||||
|
||||
dv::value BlockMaterial::serialize() const {
|
||||
return dv::object({
|
||||
{"name", name},
|
||||
{"stepsSound", stepsSound},
|
||||
{"placeSound", placeSound},
|
||||
{"breakSound", breakSound}
|
||||
});
|
||||
}
|
||||
|
||||
std::string to_string(BlockModel model) {
|
||||
switch (model) {
|
||||
case BlockModel::none:
|
||||
|
||||
@@ -104,6 +104,8 @@ struct BlockMaterial {
|
||||
std::string stepsSound {""};
|
||||
std::string placeSound {""};
|
||||
std::string breakSound {""};
|
||||
|
||||
dv::value serialize() const;
|
||||
};
|
||||
|
||||
/// @brief Block properties definition
|
||||
|
||||
Reference in New Issue
Block a user