fix: inventory is now a tool class

This commit is contained in:
Sara 2024-08-16 16:18:46 +02:00
parent a05bc7cd67
commit c97742f992
2 changed files with 3 additions and 1 deletions

View file

@ -11,6 +11,8 @@ void Inventory::_bind_methods() {
}
void Inventory::_ready() {
if(gd::Engine::get_singleton()->is_editor_hint())
return;
this->parent_unit = gd::Object::cast_to<Unit>(this->get_parent());
}

View file

@ -65,7 +65,7 @@ void initialize_gdextension_types(gd::ModuleInitializationLevel p_level)
GDREGISTER_RUNTIME_CLASS(EntityHealth);
GDREGISTER_CLASS(NavMarker);
GDREGISTER_RUNTIME_CLASS(NavRoom);
GDREGISTER_RUNTIME_CLASS(Inventory);
GDREGISTER_CLASS(Inventory);
GDREGISTER_RUNTIME_CLASS(RTSGameMode);
GDREGISTER_RUNTIME_CLASS(RTSPlayer);
}