Fixed non-tools build

This commit is contained in:
Segey Lapin
2021-10-25 18:06:06 +03:00
parent 5e69025beb
commit 2754dea132
2 changed files with 6 additions and 7 deletions

View File

@@ -4,7 +4,6 @@
#include "world_generator.h"
#include "density_map.h"
#include "world_map_data.h"
#include "mesher/mesher.h"
#include "characters.h"
#include "smart_object.h"
#include "road_map.h"
@@ -23,17 +22,12 @@ void register_world_types()
ClassDB::register_class<WorldGenerator>();
ClassDB::register_class<WorldHeightMap>();
ClassDB::register_class<DensityMap>();
ClassDB::register_class<CompoundTransvoxel>();
ClassDB::register_class<CompoundTransvoxelInspector>();
ClassDB::register_class<Characters_>();
ClassDB::register_class<SmartObject>();
ClassDB::register_class<SmartObjectManager>();
ClassDB::register_class<SmartObjectGroup>();
ClassDB::register_virtual_class<RoadGrid>();
ClassDB::register_class<Roads>();
#if TOOLS_ENABLED
EditorPlugins::add_by_type<CompoundTransvoxelEditorPlugin>();
#endif
}
void unregister_world_types()

View File

@@ -68,8 +68,13 @@ void SmartObject::_get_property_list(List<PropertyInfo> *p_list) const
animations = "default";
#endif
p_list->push_back(PropertyInfo(Variant::BOOL, "enabled"));
#if TOOLS_ENABLED
p_list->push_back(PropertyInfo(Variant::STRING, "animation_state", PROPERTY_HINT_ENUM, animations));
p_list->push_back(PropertyInfo(Variant::STRING, "animation_finish_state", PROPERTY_HINT_ENUM, animations));
#else
p_list->push_back(PropertyInfo(Variant::STRING, "animation_state", PROPERTY_HINT_NONE, ""));
p_list->push_back(PropertyInfo(Variant::STRING, "animation_finish_state", PROPERTY_HINT_NONE, ""));
#endif
p_list->push_back(PropertyInfo(Variant::BOOL, "teleport"));
p_list->push_back(PropertyInfo(Variant::REAL, "distance"));
#ifdef TOOLS_ENABLED
@@ -121,7 +126,6 @@ String SmartObject::dump_subnodes(Ref<AnimationNode> anode) const
}
return animations;
}
#endif
AnimationTree *SmartObject::find_animation_tree(Node *node) const
{
@@ -175,6 +179,7 @@ String SmartObject::get_animation_list() const
}
return animations;
}
#endif
bool SmartObject::_set(const StringName &p_name, const Variant &p_value)
{