mirror of
https://github.com/Relintai/world_generator.git
synced 2025-04-13 21:30:51 +02:00
Updated register_types.h and cpp to the current godot 4 style.
This commit is contained in:
parent
260c430f11
commit
7149f1b6a0
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "register_types.h"
|
||||
|
||||
#include "core/object/class_db.h"
|
||||
|
||||
#include "data/world_generator_prop_data.h"
|
||||
|
||||
#include "main/building.h"
|
||||
@ -30,15 +32,17 @@ SOFTWARE.
|
||||
|
||||
#include "world_generator.h"
|
||||
|
||||
void register_world_generator_types() {
|
||||
ClassDB::register_class<WorldGeneratorPropData>();
|
||||
void initialize_world_generator_module(ModuleInitializationLevel p_level) {
|
||||
if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||
GDREGISTER_CLASS(WorldGeneratorPropData);
|
||||
|
||||
ClassDB::register_class<Building>();
|
||||
ClassDB::register_class<Biome>();
|
||||
ClassDB::register_class<Planet>();
|
||||
GDREGISTER_CLASS(Building);
|
||||
GDREGISTER_CLASS(Biome);
|
||||
GDREGISTER_CLASS(Planet);
|
||||
|
||||
ClassDB::register_class<WorldGenerator>();
|
||||
GDREGISTER_CLASS(WorldGenerator);
|
||||
}
|
||||
}
|
||||
|
||||
void unregister_world_generator_types() {
|
||||
void uninitialize_world_generator_module(ModuleInitializationLevel p_level) {
|
||||
}
|
||||
|
@ -20,5 +20,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_world_generator_types();
|
||||
void unregister_world_generator_types();
|
||||
#ifndef WORLD_GENERATOR_REGISTER_TYPES_H
|
||||
#define WORLD_GENERATOR_REGISTER_TYPES_H
|
||||
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void initialize_world_generator_module(ModuleInitializationLevel p_level);
|
||||
void uninitialize_world_generator_module(ModuleInitializationLevel p_level);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user