From 76265b54a82d58ed8c56c7a09ea3be5536bf1665 Mon Sep 17 00:00:00 2001 From: Relintai Date: Mon, 22 Mar 2021 23:41:58 +0100 Subject: [PATCH] Fix editor world generation. --- game/modules/planets/test_planet/biomes/simple_biome.gd | 1 + game/modules/planets/test_planet/villages/village.gd | 1 + game/scripts/world_generators/MainPlanetGenerator.gd | 1 + 3 files changed, 3 insertions(+) diff --git a/game/modules/planets/test_planet/biomes/simple_biome.gd b/game/modules/planets/test_planet/biomes/simple_biome.gd index caab1281..e66b948e 100644 --- a/game/modules/planets/test_planet/biomes/simple_biome.gd +++ b/game/modules/planets/test_planet/biomes/simple_biome.gd @@ -1,3 +1,4 @@ +tool extends Biome # Copyright (c) 2019-2020 Péter Magyar diff --git a/game/modules/planets/test_planet/villages/village.gd b/game/modules/planets/test_planet/villages/village.gd index 17f21f5e..b195b5f2 100644 --- a/game/modules/planets/test_planet/villages/village.gd +++ b/game/modules/planets/test_planet/villages/village.gd @@ -1,3 +1,4 @@ +tool extends Dungeon export (EntityData) var trainer : EntityData diff --git a/game/scripts/world_generators/MainPlanetGenerator.gd b/game/scripts/world_generators/MainPlanetGenerator.gd index d3e25bc2..9ebf99e7 100644 --- a/game/scripts/world_generators/MainPlanetGenerator.gd +++ b/game/scripts/world_generators/MainPlanetGenerator.gd @@ -49,6 +49,7 @@ func setup(world : VoxelWorld, level_seed : int, spawn_mobs : bool, library: Vox # create_planet() func _generate_chunk(chunk : VoxelChunk) -> void: + if _planet == null: return