diff --git a/level_generator/voxel_level_generator.cpp b/level_generator/voxel_level_generator.cpp index 21da49c..24b6734 100644 --- a/level_generator/voxel_level_generator.cpp +++ b/level_generator/voxel_level_generator.cpp @@ -44,7 +44,7 @@ VoxelLevelGenerator::~VoxelLevelGenerator() { void VoxelLevelGenerator::_bind_methods() { #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_generate_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); + //BIND_VMETHOD(MethodInfo("_generate_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); #else GDVIRTUAL_BIND(_generate_chunk, "chunk"); #endif diff --git a/library/voxel_library.cpp b/library/voxel_library.cpp index 15ac0a9..46be619 100644 --- a/library/voxel_library.cpp +++ b/library/voxel_library.cpp @@ -382,7 +382,7 @@ void VoxelLibrary::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "initialized", PROPERTY_HINT_NONE, "", 0), "set_initialized", "get_initialized"); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::BOOL, "ret"), "_supports_caching")); + //BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::BOOL, "ret"), "_supports_caching")); #else GDVIRTUAL_BIND(_supports_caching); #endif @@ -391,15 +391,15 @@ void VoxelLibrary::_bind_methods() { ClassDB::bind_method(D_METHOD("supports_caching"), &VoxelLibrary::supports_caching); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_setup_material_albedo", PropertyInfo(Variant::INT, "material_index"), PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"))); + //BIND_VMETHOD(MethodInfo("_setup_material_albedo", PropertyInfo(Variant::INT, "material_index"), PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"))); #else GDVIRTUAL_BIND(_setup_material_albedo, "material_index", "texture"); #endif #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_material_cache_get_key", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); - BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "TerrainMaterialCache"), "_material_cache_get", PropertyInfo(Variant::INT, "key"))); - BIND_VMETHOD(MethodInfo("_material_cache_unref", PropertyInfo(Variant::INT, "key"))); + //BIND_VMETHOD(MethodInfo("_material_cache_get_key", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); + //BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "TerrainMaterialCache"), "_material_cache_get", PropertyInfo(Variant::INT, "key"))); + //BIND_VMETHOD(MethodInfo("_material_cache_unref", PropertyInfo(Variant::INT, "key"))); #else GDVIRTUAL_BIND(_material_cache_get_key, "chunk", "texture"); GDVIRTUAL_BIND(_material_cache_get, "key"); @@ -427,9 +427,9 @@ void VoxelLibrary::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "materials", PROPERTY_HINT_NONE, "17/17:Material", PROPERTY_USAGE_DEFAULT, "Material"), "materials_set", "materials_get"); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_liquid_material_cache_get_key", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); - BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "TerrainMaterialCache"), "_liquid_material_cache_get", PropertyInfo(Variant::INT, "key"))); - BIND_VMETHOD(MethodInfo("_liquid_material_cache_unref", PropertyInfo(Variant::INT, "key"))); + //BIND_VMETHOD(MethodInfo("_liquid_material_cache_get_key", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); + //BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "TerrainMaterialCache"), "_liquid_material_cache_get", PropertyInfo(Variant::INT, "key"))); + //BIND_VMETHOD(MethodInfo("_liquid_material_cache_unref", PropertyInfo(Variant::INT, "key"))); #else GDVIRTUAL_BIND(_liquid_material_cache_get_key, "chunk", "texture"); GDVIRTUAL_BIND(_liquid_material_cache_get, "key"); @@ -457,9 +457,9 @@ void VoxelLibrary::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "liquid_materials", PROPERTY_HINT_NONE, "17/17:Material", PROPERTY_USAGE_DEFAULT, "Material"), "liquid_materials_set", "liquid_materials_get"); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_prop_material_cache_get_key", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); - BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "TerrainMaterialCache"), "_prop_material_cache_get", PropertyInfo(Variant::INT, "key"))); - BIND_VMETHOD(MethodInfo("_prop_material_cache_unref", PropertyInfo(Variant::INT, "key"))); + //BIND_VMETHOD(MethodInfo("_prop_material_cache_get_key", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); + //BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "TerrainMaterialCache"), "_prop_material_cache_get", PropertyInfo(Variant::INT, "key"))); + //BIND_VMETHOD(MethodInfo("_prop_material_cache_unref", PropertyInfo(Variant::INT, "key"))); #else GDVIRTUAL_BIND(_prop_material_cache_get_key, "chunk", "texture"); GDVIRTUAL_BIND(_prop_material_cache_get, "key"); diff --git a/library/voxel_library_merger.cpp b/library/voxel_library_merger.cpp index 6937319..9b97981 100644 --- a/library/voxel_library_merger.cpp +++ b/library/voxel_library_merger.cpp @@ -363,7 +363,7 @@ void VoxelLibraryMerger::_setup_material_albedo(const int material_index, const } if (shmat.is_valid()) { - shmat->set_shader_param("texture_albedo", texture); + shmat->set_shader_parameter("texture_albedo", texture); } } } diff --git a/library/voxel_library_merger_pcm.cpp b/library/voxel_library_merger_pcm.cpp index 9689f84..aff7bff 100644 --- a/library/voxel_library_merger_pcm.cpp +++ b/library/voxel_library_merger_pcm.cpp @@ -42,7 +42,7 @@ SOFTWARE. #include "../world/default/voxel_chunk_default.h" -#include "core/hashfuncs.h" +#include "core/templates/hashfuncs.h" bool VoxelLibraryMergerPCM::_supports_caching() { return true; @@ -702,7 +702,7 @@ void VoxelLibraryMergerPCM::_setup_material_albedo(const int material_index, con } if (shmat.is_valid()) { - shmat->set_shader_param("texture_albedo", texture); + shmat->set_shader_parameter("texture_albedo", texture); } } } diff --git a/library/voxel_material_cache.cpp b/library/voxel_material_cache.cpp index 47b8ed4..bee3474 100644 --- a/library/voxel_material_cache.cpp +++ b/library/voxel_material_cache.cpp @@ -287,7 +287,7 @@ void VoxelMaterialCache::_bind_methods() { ClassDB::bind_method(D_METHOD("dec_ref_count"), &VoxelMaterialCache::dec_ref_count); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_setup_material_albedo", PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"))); + //BIND_VMETHOD(MethodInfo("_setup_material_albedo", PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"))); #else GDVIRTUAL_BIND(_setup_material_albedo, "texture"); #endif diff --git a/library/voxel_material_cache_pcm.cpp b/library/voxel_material_cache_pcm.cpp index 36e9003..591ccb4 100644 --- a/library/voxel_material_cache_pcm.cpp +++ b/library/voxel_material_cache_pcm.cpp @@ -173,7 +173,7 @@ void VoxelMaterialCachePCM::_setup_material_albedo(Ref texture) { Ref shmat = m; if (shmat.is_valid()) { - shmat->set_shader_param("texture_albedo", texture); + shmat->set_shader_parameter("texture_albedo", texture); } } } diff --git a/meshers/voxel_mesher.cpp b/meshers/voxel_mesher.cpp index a995a34..38a0772 100644 --- a/meshers/voxel_mesher.cpp +++ b/meshers/voxel_mesher.cpp @@ -949,9 +949,9 @@ VoxelMesher::~VoxelMesher() { void VoxelMesher::_bind_methods() { #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_add_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); - BIND_VMETHOD(MethodInfo("_bake_colors", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); - BIND_VMETHOD(MethodInfo("_bake_liquid_colors", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); + //BIND_VMETHOD(MethodInfo("_add_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); + //BIND_VMETHOD(MethodInfo("_bake_colors", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); + //BIND_VMETHOD(MethodInfo("_bake_liquid_colors", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); #else GDVIRTUAL_BIND(_add_chunk, "chunk"); GDVIRTUAL_BIND(_bake_colors, "chunk"); @@ -1015,7 +1015,7 @@ void VoxelMesher::_bind_methods() { #endif #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_add_mesher", PropertyInfo(Variant::OBJECT, "mesher", PROPERTY_HINT_RESOURCE_TYPE, "VoxelMesher"))); + //BIND_VMETHOD(MethodInfo("_add_mesher", PropertyInfo(Variant::OBJECT, "mesher", PROPERTY_HINT_RESOURCE_TYPE, "VoxelMesher"))); #else GDVIRTUAL_BIND(_add_mesher, "mesher"); #endif diff --git a/nodes/voxel_light_node.h b/nodes/voxel_light_node.h index ba00a77..a715a54 100644 --- a/nodes/voxel_light_node.h +++ b/nodes/voxel_light_node.h @@ -37,7 +37,6 @@ SOFTWARE. class VoxelLightNode : public Spatial { GDCLASS(VoxelLightNode, Spatial); - OBJ_CATEGORY("Props"); public: //make it turn into a normal light if voxelman isn't present? diff --git a/world/default/voxel_world_default.cpp b/world/default/voxel_world_default.cpp index 5e999d2..16742c3 100644 --- a/world/default/voxel_world_default.cpp +++ b/world/default/voxel_world_default.cpp @@ -363,7 +363,7 @@ void VoxelWorldDefault::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "num_lods"), "set_num_lods", "get_num_lods"); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_update_lods")); + //BIND_VMETHOD(MethodInfo("_update_lods")); #else GDVIRTUAL_BIND(_update_lods); #endif diff --git a/world/environment_data.cpp b/world/environment_data.cpp index aff06b7..83451e2 100644 --- a/world/environment_data.cpp +++ b/world/environment_data.cpp @@ -90,7 +90,7 @@ EnvironmentData::~EnvironmentData() { void EnvironmentData::_bind_methods() { #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_setup", PropertyInfo(Variant::OBJECT, "world_environment", PROPERTY_HINT_RESOURCE_TYPE, "WorldEnvironment"), PropertyInfo(Variant::OBJECT, "primary_light", PROPERTY_HINT_RESOURCE_TYPE, "DirectionalLight"), PropertyInfo(Variant::OBJECT, "secondary_light", PROPERTY_HINT_RESOURCE_TYPE, "DirectionalLight"))); + //BIND_VMETHOD(MethodInfo("_setup", PropertyInfo(Variant::OBJECT, "world_environment", PROPERTY_HINT_RESOURCE_TYPE, "WorldEnvironment"), PropertyInfo(Variant::OBJECT, "primary_light", PROPERTY_HINT_RESOURCE_TYPE, "DirectionalLight"), PropertyInfo(Variant::OBJECT, "secondary_light", PROPERTY_HINT_RESOURCE_TYPE, "DirectionalLight"))); #else GDVIRTUAL_BIND(_setup, "world_environment", "primary_light", "secondary_light"); #endif diff --git a/world/jobs/voxel_job.cpp b/world/jobs/voxel_job.cpp index 3e6b694..3f8fffa 100644 --- a/world/jobs/voxel_job.cpp +++ b/world/jobs/voxel_job.cpp @@ -349,8 +349,8 @@ VoxelJob::~VoxelJob() { void VoxelJob::_bind_methods() { #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::REAL, "delta"))); - BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::REAL, "delta"))); + //BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::REAL, "delta"))); + //BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::REAL, "delta"))); #else GDVIRTUAL_BIND(_process, "delta"); GDVIRTUAL_BIND(_physics_process, "delta"); @@ -372,7 +372,7 @@ void VoxelJob::_bind_methods() { ClassDB::bind_method(D_METHOD("next_job"), &VoxelJob::next_job); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_reset")); + //BIND_VMETHOD(MethodInfo("_reset")); #else GDVIRTUAL_BIND(_reset); #endif @@ -383,7 +383,7 @@ void VoxelJob::_bind_methods() { ClassDB::bind_method(D_METHOD("_execute"), &VoxelJob::_execute); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_execute_phase")); + //BIND_VMETHOD(MethodInfo("_execute_phase")); #else GDVIRTUAL_BIND(_execute_phase); #endif @@ -419,7 +419,7 @@ void VoxelJob::_bind_methods() { ClassDB::bind_method(D_METHOD("should_return"), &VoxelJob::should_return); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_execute")); + //BIND_VMETHOD(MethodInfo("_execute")); #else GDVIRTUAL_BIND(_execute); #endif diff --git a/world/jobs/voxel_mesher_job_step.cpp b/world/jobs/voxel_mesher_job_step.cpp index cc4afd3..d21ecb8 100644 --- a/world/jobs/voxel_mesher_job_step.cpp +++ b/world/jobs/voxel_mesher_job_step.cpp @@ -102,7 +102,7 @@ void VoxelMesherJobStep::_bind_methods() { ClassDB::bind_method(D_METHOD("get_simplification_step_ratio"), &VoxelMesherJobStep::get_simplification_step_ratio); ClassDB::bind_method(D_METHOD("set_simplification_step_ratio", "value"), &VoxelMesherJobStep::set_simplification_step_ratio); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "simplification_step_ratio"), "set_simplification_step_ratio", "get_simplification_step_ratio"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "simplification_step_ratio"), "set_simplification_step_ratio", "get_simplification_step_ratio"); ClassDB::bind_method(D_METHOD("get_simplification_steps"), &VoxelMesherJobStep::get_simplification_steps); ClassDB::bind_method(D_METHOD("set_simplification_steps", "value"), &VoxelMesherJobStep::set_simplification_steps); @@ -110,7 +110,7 @@ void VoxelMesherJobStep::_bind_methods() { ClassDB::bind_method(D_METHOD("get_simplification_agressiveness"), &VoxelMesherJobStep::get_simplification_agressiveness); ClassDB::bind_method(D_METHOD("set_simplification_agressiveness", "value"), &VoxelMesherJobStep::set_simplification_agressiveness); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "simplification_agressiveness"), "set_simplification_agressiveness", "get_simplification_agressiveness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "simplification_agressiveness"), "set_simplification_agressiveness", "get_simplification_agressiveness"); #endif BIND_ENUM_CONSTANT(TYPE_NORMAL); diff --git a/world/voxel_chunk.cpp b/world/voxel_chunk.cpp index d9e5f85..415355d 100644 --- a/world/voxel_chunk.cpp +++ b/world/voxel_chunk.cpp @@ -1355,13 +1355,13 @@ void VoxelChunk::_bind_methods() { ADD_SIGNAL(MethodInfo("mesh_generation_finished", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_mesh_data_resource_added", PropertyInfo(Variant::INT, "index"))); + //BIND_VMETHOD(MethodInfo("_mesh_data_resource_added", PropertyInfo(Variant::INT, "index"))); - BIND_VMETHOD(MethodInfo("_channel_setup")); + //BIND_VMETHOD(MethodInfo("_channel_setup")); - BIND_VMETHOD(MethodInfo("_bake_lights")); - BIND_VMETHOD(MethodInfo("_bake_light", PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "VoxelLight"))); - BIND_VMETHOD(MethodInfo("_clear_baked_lights")); + //BIND_VMETHOD(MethodInfo("_bake_lights")); + //BIND_VMETHOD(MethodInfo("_bake_light", PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "VoxelLight"))); + //BIND_VMETHOD(MethodInfo("_clear_baked_lights")); #else GDVIRTUAL_BIND(_mesh_data_resource_added, "index"); @@ -1377,19 +1377,19 @@ void VoxelChunk::_bind_methods() { ClassDB::bind_method(D_METHOD("clear_baked_lights"), &VoxelChunk::clear_baked_lights); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_enter_tree")); - BIND_VMETHOD(MethodInfo("_exit_tree")); - BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::REAL, "delta"))); - BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::REAL, "delta"))); - BIND_VMETHOD(MethodInfo("_world_transform_changed")); - BIND_VMETHOD(MethodInfo("_visibility_changed", PropertyInfo(Variant::BOOL, "visible"))); - BIND_VMETHOD(MethodInfo("_world_light_added", PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "VoxelLight"))); - BIND_VMETHOD(MethodInfo("_world_light_removed", PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "VoxelLight"))); + //BIND_VMETHOD(MethodInfo("_enter_tree")); + //BIND_VMETHOD(MethodInfo("_exit_tree")); + //BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::REAL, "delta"))); + //BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::REAL, "delta"))); + //BIND_VMETHOD(MethodInfo("_world_transform_changed")); + //BIND_VMETHOD(MethodInfo("_visibility_changed", PropertyInfo(Variant::BOOL, "visible"))); + //BIND_VMETHOD(MethodInfo("_world_light_added", PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "VoxelLight"))); + //BIND_VMETHOD(MethodInfo("_world_light_removed", PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "VoxelLight"))); - BIND_VMETHOD(MethodInfo("_generation_process", PropertyInfo(Variant::REAL, "delta"))); - BIND_VMETHOD(MethodInfo("_generation_physics_process", PropertyInfo(Variant::REAL, "delta"))); + //BIND_VMETHOD(MethodInfo("_generation_process", PropertyInfo(Variant::REAL, "delta"))); + //BIND_VMETHOD(MethodInfo("_generation_physics_process", PropertyInfo(Variant::REAL, "delta"))); - BIND_VMETHOD(MethodInfo("_finalize_build")); + //BIND_VMETHOD(MethodInfo("_finalize_build")); #else GDVIRTUAL_BIND(_enter_tree); GDVIRTUAL_BIND(_exit_tree); @@ -1651,7 +1651,7 @@ void VoxelChunk::_bind_methods() { ClassDB::bind_method(D_METHOD("colliders_clear"), &VoxelChunk::colliders_clear); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_build")); + //BIND_VMETHOD(MethodInfo("_build")); #else GDVIRTUAL_BIND(_build); #endif diff --git a/world/voxel_structure.cpp b/world/voxel_structure.cpp index 5cb189a..320f250 100644 --- a/world/voxel_structure.cpp +++ b/world/voxel_structure.cpp @@ -87,7 +87,7 @@ VoxelStructure::~VoxelStructure() { void VoxelStructure::_bind_methods() { #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_write_to_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); + //BIND_VMETHOD(MethodInfo("_write_to_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); #else GDVIRTUAL_BIND(_write_to_chunk, "chunk"); #endif diff --git a/world/voxel_world.cpp b/world/voxel_world.cpp index 55ae6c1..383fbb0 100644 --- a/world/voxel_world.cpp +++ b/world/voxel_world.cpp @@ -647,7 +647,7 @@ void VoxelWorld::prop_add(Transform tarnsform, const Ref &prop, const continue; #if VERSION_MAJOR < 4 - Node *n = sc->instance(); + Node *n = sc->instantiate(); #else Node *n = sc->instantiate(); #endif @@ -1205,7 +1205,7 @@ void VoxelWorld::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "voxel_structures", PROPERTY_HINT_NONE, "17/17:VoxelStructure", PROPERTY_USAGE_DEFAULT, "VoxelStructure"), "voxel_structures_set", "voxel_structures_get"); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_chunk_added", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); + //BIND_VMETHOD(MethodInfo("_chunk_added", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); #else GDVIRTUAL_BIND(_chunk_added, "chunk"); #endif @@ -1238,11 +1238,11 @@ void VoxelWorld::_bind_methods() { ADD_SIGNAL(MethodInfo("generation_finished")); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_generation_finished")); + //BIND_VMETHOD(MethodInfo("_generation_finished")); - BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"), "_create_chunk", PropertyInfo(Variant::INT, "x"), PropertyInfo(Variant::INT, "y"), PropertyInfo(Variant::INT, "z"), PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); - BIND_VMETHOD(MethodInfo("_prepare_chunk_for_generation", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); - BIND_VMETHOD(MethodInfo("_generate_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); + //BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "ret", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"), "_create_chunk", PropertyInfo(Variant::INT, "x"), PropertyInfo(Variant::INT, "y"), PropertyInfo(Variant::INT, "z"), PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); + //BIND_VMETHOD(MethodInfo("_prepare_chunk_for_generation", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); + //BIND_VMETHOD(MethodInfo("_generate_chunk", PropertyInfo(Variant::OBJECT, "chunk", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); #else GDVIRTUAL_BIND(_generation_finished); GDVIRTUAL_BIND(_create_chunk, "chunk", "x", "y", "z", "chunk", "ret"); @@ -1281,7 +1281,7 @@ void VoxelWorld::_bind_methods() { ClassDB::bind_method(D_METHOD("get_or_create_chunk_at_world_position", "world_position"), &VoxelWorld::get_or_create_chunk_at_world_position); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::INT, "ret"), "_get_channel_index_info", PropertyInfo(Variant::INT, "channel_type", PROPERTY_HINT_ENUM, BINDING_STRING_CHANNEL_TYPE_INFO))); + //BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::INT, "ret"), "_get_channel_index_info", PropertyInfo(Variant::INT, "channel_type", PROPERTY_HINT_ENUM, BINDING_STRING_CHANNEL_TYPE_INFO))); #else GDVIRTUAL_BIND(_get_channel_index_info, "channel_type", "ret"); #endif @@ -1290,7 +1290,7 @@ void VoxelWorld::_bind_methods() { ClassDB::bind_method(D_METHOD("_get_channel_index_info", "channel_type"), &VoxelWorld::_get_channel_index_info); #if VERSION_MAJOR < 4 - BIND_VMETHOD(MethodInfo("_set_voxel_with_tool", + //BIND_VMETHOD(MethodInfo("_set_voxel_with_tool", PropertyInfo(Variant::BOOL, "mode_add"), PropertyInfo(Variant::VECTOR3, "hit_position"), PropertyInfo(Variant::VECTOR3, "hit_normal"),