mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-22 10:29:47 +00:00
add 'translucent' entity property
This commit is contained in:
parent
35e3d80f35
commit
1ec159d2f6
3 changed files with 5 additions and 0 deletions
|
|
@ -94,6 +94,7 @@ template<> void ContentUnitLoader<EntityDef>::loadUnit(
|
||||||
root.at("mass").get(def.mass);
|
root.at("mass").get(def.mass);
|
||||||
root.at("elasticity").get(def.elasticity);
|
root.at("elasticity").get(def.elasticity);
|
||||||
root.at("step-height").get(def.stepHeight);
|
root.at("step-height").get(def.stepHeight);
|
||||||
|
root.at("translucent").get(def.translucent);
|
||||||
|
|
||||||
std::string lightingModeName;
|
std::string lightingModeName;
|
||||||
root.at("lighting-mode").get(lightingModeName);
|
root.at("lighting-mode").get(lightingModeName);
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,5 @@ void EntityDef::cloneTo(EntityDef& dst) {
|
||||||
dst.stepHeight = stepHeight;
|
dst.stepHeight = stepHeight;
|
||||||
dst.save = save;
|
dst.save = save;
|
||||||
dst.lightingMode = lightingMode;
|
dst.lightingMode = lightingMode;
|
||||||
|
dst.translucent = translucent;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,9 @@ struct EntityDef {
|
||||||
/// @brief Model lighting mode
|
/// @brief Model lighting mode
|
||||||
ModelLightingMode lightingMode = ModelLightingMode::SOLID;
|
ModelLightingMode lightingMode = ModelLightingMode::SOLID;
|
||||||
|
|
||||||
|
/// @brief Render the entity in the translucent pass
|
||||||
|
bool translucent = true;
|
||||||
|
|
||||||
/// @brief Can the entity be interacted with cursor (on_attack, on_use)
|
/// @brief Can the entity be interacted with cursor (on_attack, on_use)
|
||||||
bool selectable = true;
|
bool selectable = true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue