Updated the modules to the latest. I changed the Terra and Terraman class prefixes to Terrain.

This commit is contained in:
Relintai 2022-02-08 14:44:37 +01:00
parent 467145d994
commit 232aae5726
23 changed files with 143 additions and 143 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"3.2": "94a0fc47f7b4e90f8973f9adbfd3312579ed2825", "master": "8c73e813134001e575b6f59e3b0100471c007410", "3.x": "156ee820f620111a2dc2f884e79190777ca6e785"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "3c334566ff05a74e913cd5c5ff38ae45aba5f5d2"}, "ui_extensions": {"master": "992b322266e3d3225447c4df0a1c34fee19e1fe3"}, "voxelman": {"master": "9253cc53c6fbbd78b5e4268eb498ef55b4dd0181"}, "texture_packer": {"master": "59480880356b7aff8967dfe2163e8416031c4f9b"}, "fastnoise": {"master": "46bb1f610bfb7171613b5c708d312bcf94e89356"}, "mesh_data_resource": {"master": "362d59ae45cbcd96aad24a0dc1cbd504a3e61e82"}, "procedural_animations": {"master": "f8aae42bf06b3936cc6bd24cb18e1c3ec9f78f4f"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "d66c8c4ac7f0f7342236880f15d58d5faf5f4bda"}, "mesh_utils": {"master": "4feb5186203640c234f0fc4e24cc0de83f21e951"}, "broken_seals_module": {"master": "52c5a81350db1c29d375c63d95010260911ec034"}, "thread_pool": {"master": "06c56fcb37d28a275212e2864c5885ae6a5c2ba0"}, "terraman": {"master": "2aa31ea22ed3a39c07307d3598c2fc084b4a31e3"}}
{"engine": {"3.2": "94a0fc47f7b4e90f8973f9adbfd3312579ed2825", "master": "8c73e813134001e575b6f59e3b0100471c007410", "3.x": "156ee820f620111a2dc2f884e79190777ca6e785"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "3c334566ff05a74e913cd5c5ff38ae45aba5f5d2"}, "ui_extensions": {"master": "80a3b96fc56991a0f88a1d441ed1e3cebaf3307a"}, "voxelman": {"master": "fe4a83b90934a48124598a4171b8e0c5d77d51d2"}, "texture_packer": {"master": "ae4d222fbaade063ed6f0bc9f3aaa53df68a7fed"}, "fastnoise": {"master": "46bb1f610bfb7171613b5c708d312bcf94e89356"}, "mesh_data_resource": {"master": "2bf76b8d07c2821161886ea4ea6edc788ec2ee51"}, "procedural_animations": {"master": "f8aae42bf06b3936cc6bd24cb18e1c3ec9f78f4f"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "ce369408caee7ab4c83aa3235c7c1324bde424a6"}, "mesh_utils": {"master": "902dae29797789d406faf256a22aa73b7f6d5261"}, "broken_seals_module": {"master": "52c5a81350db1c29d375c63d95010260911ec034"}, "thread_pool": {"master": "c401b7a027248158dae3fbce20d637d34eaaedb9"}, "terraman": {"master": "098afa23e2be52db7daceba303b54a670481ce91"}}

View File

@ -91,17 +91,17 @@ func duplicate_content_entry(entry : WorldGenBaseResource, add : bool = true) ->
return de
func setup_terra_library(library : TerramanLibrary, pseed : int) -> void:
func setup_terra_library(library : TerrainLibrary, pseed : int) -> void:
_setup_terra_library(library, pseed)
for c in get_content():
if c:
c.setup_terra_library(library, pseed)
func _setup_terra_library(library : TerramanLibrary, pseed : int) -> void:
func _setup_terra_library(library : TerrainLibrary, pseed : int) -> void:
pass
func generate_terra_chunk(chunk: TerraChunk, pseed : int, spawn_mobs: bool) -> void:
func generate_terra_chunk(chunk: TerrainChunk, pseed : int, spawn_mobs: bool) -> void:
var p : Vector2 = Vector2(chunk.get_position_x(), chunk.get_position_z())
var stack : Array = get_hit_stack(p)
@ -113,13 +113,13 @@ func generate_terra_chunk(chunk: TerraChunk, pseed : int, spawn_mobs: bool) -> v
for i in range(stack.size()):
stack[i]._generate_terra_chunk(chunk, pseed, spawn_mobs, stack, i)
func _generate_terra_chunk(chunk: TerraChunk, pseed : int, spawn_mobs: bool, stack : Array, stack_index : int) -> void:
func _generate_terra_chunk(chunk: TerrainChunk, pseed : int, spawn_mobs: bool, stack : Array, stack_index : int) -> void:
pass
func _generate_terra_chunk_fallback(chunk: TerraChunk, pseed : int, spawn_mobs: bool) -> void:
chunk.channel_ensure_allocated(TerraChunkDefault.DEFAULT_CHANNEL_TYPE, 1)
chunk.channel_ensure_allocated(TerraChunkDefault.DEFAULT_CHANNEL_ISOLEVEL, 1)
chunk.set_voxel(1, 0, 0, TerraChunkDefault.DEFAULT_CHANNEL_ISOLEVEL)
func _generate_terra_chunk_fallback(chunk: TerrainChunk, pseed : int, spawn_mobs: bool) -> void:
chunk.channel_ensure_allocated(TerrainChunkDefault.DEFAULT_CHANNEL_TYPE, 1)
chunk.channel_ensure_allocated(TerrainChunkDefault.DEFAULT_CHANNEL_ISOLEVEL, 1)
chunk.set_voxel(1, 0, 0, TerrainChunkDefault.DEFAULT_CHANNEL_ISOLEVEL)
func generate_map(pseed : int) -> Image:
var img : Image = Image.new()

View File

@ -218,6 +218,6 @@ master func sreceive_upload_character(data: String) -> void:
func set_terrarin_player():
Logger.verbose("NetworkManager cspawn_player")
var terrarin : TerraWorld = get_node("/root/main/World")
var terrarin : TerrainWorld = get_node("/root/main/World")
terrarin.set_player(local_player_master.player.get_body() as Spatial)

View File

@ -16,14 +16,14 @@
[ext_resource path="res://scenes/ConnectServerButton.gd" type="Script" id=14]
[ext_resource path="res://scenes/HostGameButton.gd" type="Script" id=15]
[ext_resource path="res://menu/MenuWorld.gd" type="Script" id=16]
[ext_resource path="res://tw/new_terramanlibrarymerger.tres" type="TerramanLibraryMerger" id=17]
[ext_resource path="res://tw/new_terramanlevelgenerator.tres" type="TerramanLevelGenerator" id=18]
[ext_resource path="res://tw/new_terramanlibrarymerger.tres" type="TerrainLibraryMerger" id=17]
[ext_resource path="res://tw/new_terramanlevelgenerator.tres" type="TerrainLevelGenerator" id=18]
[ext_resource path="res://scripts/settings/DirectionalLightSettings.gd" type="Script" id=19]
[ext_resource path="res://ui/about/About.tscn" type="PackedScene" id=20]
[ext_resource path="res://menu/ExitButton.gd" type="Script" id=21]
[ext_resource path="res://ui/Window.gd" type="Script" id=22]
[sub_resource type="TerraChunkBlocky" id=1]
[sub_resource type="TerrainChunkBlocky" id=1]
resource_name = "Chunk[-2,0]"
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -51.2, 0, 0 )
position_x = -2
@ -40,7 +40,7 @@ channel_count = 10
data_channel = PoolByteArray( 31, 4, 1, 0, 255, 44, 80, 4, 4, 4, 4, 4 )
isolevel_channel = PoolByteArray( 112, 73, 74, 74, 75, 75, 75, 76, 1, 0, 17, 77, 1, 0, 32, 78, 74, 15, 0, 48, 77, 77, 78, 1, 0, 161, 79, 79, 79, 79, 80, 80, 75, 75, 76, 77, 12, 0, 144, 80, 80, 80, 80, 81, 81, 81, 82, 83, 17, 0, 0, 15, 0, 0, 13, 0, 98, 82, 82, 83, 83, 84, 85, 17, 0, 1, 16, 0, 112, 83, 83, 84, 84, 85, 86, 87, 18, 0, 21, 80, 32, 0, 97, 85, 86, 87, 88, 77, 78, 51, 0, 5, 34, 0, 32, 88, 90, 18, 0, 0, 17, 0, 1, 67, 0, 121, 86, 87, 88, 89, 91, 78, 79, 18, 0, 50, 89, 90, 92, 53, 0, 1, 72, 0, 0, 36, 0, 51, 89, 91, 93, 18, 0, 2, 73, 0, 1, 18, 0, 3, 140, 0, 0, 20, 0, 2, 18, 0, 17, 94, 172, 0, 1, 175, 0, 0, 55, 0, 53, 87, 89, 92, 18, 0, 0, 148, 0, 2, 18, 0, 1, 33, 0, 1, 2, 0, 129, 81, 82, 83, 85, 87, 90, 92, 95, 13, 0, 16, 80, 245, 0, 9, 18, 0, 2, 7, 1, 22, 81, 36, 0, 0, 17, 0, 160, 79, 79, 80, 81, 83, 85, 87, 90, 92, 95 )
[sub_resource type="TerraChunkBlocky" id=2]
[sub_resource type="TerrainChunkBlocky" id=2]
resource_name = "Chunk[-1,-1]"
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -25.6, 0, -25.6 )
position_x = -1
@ -58,7 +58,7 @@ channel_count = 10
data_channel = PoolByteArray( 31, 1, 1, 0, 202, 19, 4, 1, 0, 1, 229, 0, 3, 12, 0, 5, 2, 0, 21, 1, 10, 0, 15, 2, 0, 39, 80, 4, 4, 4, 4, 4 )
isolevel_channel = PoolByteArray( 242, 3, 51, 51, 51, 52, 52, 53, 53, 54, 55, 56, 56, 57, 58, 58, 59, 59, 59, 59, 18, 0, 52, 54, 54, 55, 17, 0, 21, 59, 35, 0, 33, 57, 57, 34, 0, 39, 59, 59, 52, 0, 0, 15, 0, 50, 59, 59, 59, 69, 0, 0, 52, 0, 145, 59, 59, 60, 60, 60, 60, 59, 59, 53, 68, 0, 5, 17, 0, 66, 60, 60, 59, 54, 33, 0, 80, 58, 59, 60, 60, 61, 1, 0, 65, 60, 60, 56, 56, 84, 0, 64, 60, 60, 61, 62, 1, 0, 48, 61, 61, 60, 31, 0, 97, 59, 60, 61, 61, 62, 63, 1, 0, 49, 62, 62, 61, 46, 0, 160, 62, 63, 63, 64, 64, 65, 65, 65, 64, 64, 20, 0, 16, 62, 15, 0, 177, 65, 65, 66, 66, 67, 67, 66, 66, 66, 65, 64, 28, 0, 240, 1, 66, 66, 67, 68, 68, 69, 69, 69, 68, 68, 67, 67, 66, 65, 67, 67, 14, 0, 48, 70, 70, 71, 1, 0, 81, 70, 69, 69, 68, 67, 13, 0, 209, 72, 72, 73, 73, 74, 74, 74, 73, 73, 72, 71, 70, 69, 13, 0, 49, 75, 75, 76, 1, 0, 80, 75, 74, 73, 72, 71, 13, 0, 65, 77, 77, 78, 79, 1, 0, 209, 78, 77, 76, 75, 74, 77, 78, 78, 79, 80, 80, 81, 82, 1, 0, 81, 81, 80, 79, 78, 77, 14, 0, 208, 83, 84, 85, 85, 85, 85, 85, 85, 84, 83, 82, 81, 80 )
[sub_resource type="TerraChunkBlocky" id=3]
[sub_resource type="TerrainChunkBlocky" id=3]
resource_name = "Chunk[-1,0]"
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -25.6, 0, 0 )
position_x = -1
@ -75,7 +75,7 @@ channel_count = 10
data_channel = PoolByteArray( 31, 4, 1, 0, 255, 44, 80, 4, 4, 4, 4, 4 )
isolevel_channel = PoolByteArray( 129, 77, 78, 78, 79, 80, 80, 81, 82, 1, 0, 81, 81, 80, 79, 78, 77, 14, 0, 49, 83, 84, 85, 1, 0, 240, 8, 84, 83, 82, 81, 80, 82, 83, 83, 84, 85, 86, 87, 87, 88, 88, 88, 88, 87, 87, 86, 85, 84, 82, 15, 0, 209, 88, 89, 89, 90, 91, 91, 91, 91, 90, 90, 89, 88, 87, 16, 0, 240, 1, 90, 91, 92, 93, 93, 94, 94, 94, 93, 93, 92, 91, 90, 88, 87, 88, 16, 0, 242, 53, 94, 95, 96, 96, 97, 97, 96, 95, 95, 94, 93, 91, 88, 90, 91, 93, 94, 95, 97, 98, 98, 99, 99, 99, 99, 98, 97, 96, 95, 94, 89, 91, 93, 94, 96, 97, 99, 100, 101, 101, 102, 102, 101, 101, 100, 99, 98, 97, 90, 92, 94, 95, 97, 99, 100, 102, 103, 104, 104, 104, 104, 103, 103, 102, 101, 100, 91, 93, 17, 0, 241, 42, 105, 105, 106, 106, 106, 106, 105, 105, 104, 103, 91, 93, 95, 98, 100, 102, 103, 105, 106, 107, 108, 108, 108, 108, 107, 107, 106, 106, 91, 94, 96, 98, 101, 103, 105, 106, 108, 109, 109, 110, 110, 110, 109, 109, 109, 108, 92, 94, 97, 99, 101, 104, 106, 107, 109, 110, 111, 1, 0, 240, 14, 110, 110, 92, 94, 97, 100, 102, 104, 106, 108, 110, 111, 112, 112, 113, 113, 112, 112, 112, 112, 92, 95, 97, 100, 103, 105, 107, 109, 110, 17, 0, 1, 2, 0, 49, 92, 95, 98, 18, 0, 66, 111, 112, 113, 114, 1, 0, 127, 92, 95, 98, 101, 103, 106, 108, 18, 0, 3, 112, 113, 114, 114, 114, 114, 114, 114 )
[sub_resource type="TerraChunkBlocky" id=4]
[sub_resource type="TerrainChunkBlocky" id=4]
resource_name = "Chunk[-1,1]"
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -25.6, 0, 25.6 )
position_x = -1
@ -93,7 +93,7 @@ channel_count = 10
data_channel = PoolByteArray( 31, 4, 1, 0, 255, 44, 80, 4, 4, 4, 4, 4 )
isolevel_channel = PoolByteArray( 194, 92, 95, 98, 101, 103, 106, 108, 109, 111, 112, 113, 114, 1, 0, 7, 18, 0, 3, 19, 0, 1, 18, 0, 114, 105, 107, 109, 111, 112, 112, 113, 20, 0, 146, 92, 95, 98, 100, 103, 105, 107, 109, 110, 19, 0, 48, 113, 113, 113, 18, 0, 112, 102, 105, 106, 108, 109, 110, 111, 1, 0, 242, 0, 112, 112, 112, 92, 95, 97, 100, 102, 104, 106, 107, 108, 109, 109, 110, 1, 0, 179, 92, 95, 97, 99, 101, 103, 104, 106, 107, 107, 108, 1, 0, 179, 92, 94, 96, 98, 100, 102, 103, 104, 105, 105, 106, 1, 0, 179, 92, 94, 96, 97, 99, 100, 101, 102, 103, 103, 104, 1, 0, 148, 92, 94, 95, 97, 98, 99, 100, 100, 101, 1, 0, 150, 102, 92, 93, 95, 96, 97, 98, 98, 99, 1, 0, 113, 92, 93, 94, 95, 96, 96, 97, 1, 0, 32, 96, 96, 10, 0, 82, 92, 93, 93, 94, 95, 1, 0, 17, 94, 1, 0, 32, 95, 92, 19, 0, 116, 94, 94, 94, 93, 93, 93, 92, 1, 0, 16, 93, 1, 0, 97, 92, 92, 91, 91, 91, 90, 1, 0, 18, 92, 29, 0, 112, 91, 91, 90, 89, 89, 89, 88, 1, 0, 3, 33, 0, 177, 90, 90, 89, 88, 88, 87, 87, 87, 86, 87, 87, 18, 0, 1, 17, 0, 128, 87, 87, 86, 86, 85, 85, 85, 85 )
[sub_resource type="TerraChunkBlocky" id=5]
[sub_resource type="TerrainChunkBlocky" id=5]
resource_name = "Chunk[0,-2]"
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -51.2 )
position_z = -2
@ -110,7 +110,7 @@ channel_count = 10
data_channel = PoolByteArray( 27, 1, 1, 0, 43, 4, 4, 17, 0, 15, 18, 0, 0, 29, 1, 36, 0, 15, 2, 0, 230, 80, 1, 1, 1, 1, 1 )
isolevel_channel = PoolByteArray( 240, 3, 51, 52, 52, 53, 53, 54, 55, 56, 57, 59, 60, 62, 64, 66, 67, 69, 71, 72, 16, 0, 0, 17, 0, 16, 58, 18, 0, 80, 65, 67, 68, 70, 71, 16, 0, 34, 55, 56, 18, 0, 16, 63, 37, 0, 49, 70, 54, 55, 17, 0, 176, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 69, 16, 0, 0, 17, 0, 33, 58, 59, 19, 0, 96, 64, 66, 67, 56, 56, 57, 1, 0, 21, 58, 19, 0, 16, 65, 15, 0, 1, 2, 0, 5, 20, 0, 1, 11, 0, 1, 19, 0, 0, 10, 0, 80, 59, 59, 60, 62, 58, 1, 0, 0, 15, 0, 18, 56, 80, 0, 32, 59, 60, 17, 0, 17, 58, 16, 0, 2, 117, 0, 37, 58, 59, 18, 0, 17, 55, 1, 0, 16, 56, 118, 0, 2, 36, 0, 65, 55, 55, 54, 54, 173, 0, 145, 57, 59, 59, 59, 58, 58, 57, 56, 56, 17, 0, 1, 208, 0, 10, 18, 0, 0, 55, 0, 11, 18, 0, 0, 91, 0, 4, 54, 0, 17, 55, 34, 0, 9, 18, 0, 4, 126, 0, 2, 54, 0, 192, 57, 56, 56, 56, 56, 56, 56, 57, 58, 58, 59, 60 )
[sub_resource type="TerraChunkBlocky" id=6]
[sub_resource type="TerrainChunkBlocky" id=6]
resource_name = "Chunk[0,-1]"
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -25.6 )
position_z = -1
@ -127,7 +127,7 @@ channel_count = 10
data_channel = PoolByteArray( 31, 1, 1, 0, 159, 28, 4, 179, 0, 28, 4, 18, 0, 28, 4, 18, 0, 16, 4, 1, 0, 8, 55, 0, 0, 16, 0, 0, 2, 0, 5, 20, 0, 0, 13, 0, 15, 2, 0, 32, 80, 4, 4, 4, 4, 4 )
isolevel_channel = PoolByteArray( 144, 59, 59, 59, 58, 58, 57, 56, 56, 55, 1, 0, 82, 56, 56, 57, 58, 59, 18, 0, 33, 57, 56, 1, 0, 87, 57, 58, 58, 59, 60, 18, 0, 115, 57, 57, 58, 59, 60, 61, 62, 18, 0, 0, 2, 0, 0, 33, 0, 53, 61, 62, 63, 18, 0, 3, 16, 0, 48, 64, 65, 60, 90, 0, 1, 2, 0, 1, 33, 0, 68, 64, 65, 66, 60, 19, 0, 4, 17, 0, 32, 67, 61, 19, 0, 0, 2, 0, 3, 34, 0, 51, 67, 68, 62, 19, 0, 5, 17, 0, 134, 69, 63, 62, 61, 61, 60, 60, 60, 17, 0, 132, 70, 64, 63, 62, 62, 61, 61, 61, 51, 0, 178, 69, 70, 70, 66, 65, 64, 63, 63, 63, 62, 63, 68, 0, 144, 69, 70, 70, 71, 68, 67, 66, 65, 64, 1, 0, 4, 17, 0, 96, 71, 70, 69, 68, 67, 66, 1, 0, 18, 67, 34, 0, 128, 72, 72, 72, 71, 70, 69, 69, 68, 1, 0, 225, 69, 69, 70, 71, 71, 72, 72, 73, 75, 74, 73, 72, 71, 70, 1, 0, 224, 71, 71, 72, 73, 73, 73, 73, 78, 77, 75, 74, 73, 73, 72, 1, 0, 240, 10, 73, 73, 74, 74, 75, 75, 75, 81, 80, 78, 77, 76, 75, 75, 74, 74, 74, 74, 75, 75, 76, 76, 76, 76, 76 )
[sub_resource type="TerraChunkBlocky" id=7]
[sub_resource type="TerrainChunkBlocky" id=7]
resource_name = "Chunk[0,0]"
size_x = 16
size_z = 16
@ -142,7 +142,7 @@ channel_count = 10
data_channel = PoolByteArray( 31, 4, 1, 0, 255, 44, 80, 4, 4, 4, 4, 4 )
isolevel_channel = PoolByteArray( 112, 78, 77, 75, 74, 73, 73, 72, 1, 0, 240, 1, 73, 73, 74, 74, 75, 75, 75, 81, 80, 78, 77, 76, 75, 75, 74, 74, 14, 0, 16, 76, 1, 0, 114, 84, 82, 81, 80, 79, 78, 77, 1, 0, 16, 78, 1, 0, 242, 15, 87, 85, 84, 83, 82, 81, 80, 80, 80, 79, 79, 80, 80, 80, 80, 81, 81, 80, 90, 88, 87, 86, 85, 84, 83, 83, 83, 82, 82, 83, 1, 0, 134, 93, 91, 90, 89, 88, 87, 87, 86, 1, 0, 134, 95, 94, 93, 92, 91, 91, 90, 89, 1, 0, 117, 98, 97, 96, 95, 95, 94, 93, 1, 0, 165, 92, 92, 101, 100, 99, 99, 98, 97, 97, 96, 1, 0, 132, 95, 104, 103, 102, 102, 101, 101, 100, 1, 0, 165, 99, 99, 99, 106, 106, 105, 104, 104, 104, 103, 1, 0, 149, 102, 102, 109, 108, 108, 107, 107, 107, 106, 1, 0, 104, 105, 105, 110, 110, 110, 109, 1, 0, 148, 108, 108, 112, 112, 112, 111, 111, 111, 112, 1, 0, 66, 111, 111, 110, 113, 1, 0, 19, 114, 1, 0, 50, 113, 113, 112, 10, 0, 65, 115, 115, 115, 116, 1, 0, 32, 115, 115, 17, 0, 2, 15, 0, 17, 117, 1, 0, 49, 116, 116, 116, 18, 0, 2, 17, 0, 112, 118, 118, 118, 118, 117, 117, 117 )
[sub_resource type="TerraChunkBlocky" id=8]
[sub_resource type="TerrainChunkBlocky" id=8]
resource_name = "Chunk[0,1]"
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 25.6 )
position_z = 1
@ -159,7 +159,7 @@ channel_count = 10
data_channel = PoolByteArray( 31, 4, 1, 0, 255, 44, 80, 4, 4, 4, 4, 4 )
isolevel_channel = PoolByteArray( 161, 114, 114, 114, 115, 115, 115, 116, 116, 116, 117, 1, 0, 49, 116, 116, 116, 18, 0, 2, 17, 0, 131, 118, 118, 118, 118, 117, 117, 117, 114, 19, 0, 2, 17, 0, 0, 2, 0, 48, 113, 113, 113, 56, 0, 0, 19, 0, 16, 117, 16, 0, 106, 118, 118, 112, 112, 112, 112, 20, 0, 71, 110, 110, 111, 111, 20, 0, 177, 118, 118, 118, 108, 108, 109, 109, 110, 110, 111, 112, 61, 0, 192, 116, 116, 117, 118, 118, 106, 106, 107, 107, 108, 108, 109, 42, 0, 242, 0, 113, 114, 115, 115, 116, 117, 118, 104, 104, 104, 105, 106, 106, 107, 108, 41, 0, 176, 114, 115, 116, 117, 101, 102, 102, 103, 103, 104, 105, 42, 0, 0, 60, 0, 129, 114, 116, 117, 99, 99, 100, 100, 101, 21, 0, 0, 40, 0, 160, 112, 113, 115, 116, 97, 97, 97, 98, 99, 99, 21, 0, 240, 5, 105, 106, 107, 109, 111, 112, 114, 115, 94, 95, 95, 96, 96, 97, 98, 99, 100, 101, 103, 104, 19, 0, 177, 113, 114, 92, 92, 93, 94, 94, 95, 96, 97, 98, 19, 0, 240, 3, 108, 110, 112, 113, 90, 90, 91, 91, 92, 93, 94, 95, 97, 98, 99, 101, 103, 105, 56, 0, 208, 88, 88, 89, 90, 90, 91, 92, 94, 95, 96, 98, 100, 101, 37, 0, 160, 111, 87, 87, 87, 88, 89, 90, 91, 92, 93, 19, 0, 144, 102, 104, 107, 109, 110, 85, 85, 86, 86, 20, 0, 160, 92, 93, 95, 97, 99, 101, 103, 106, 108, 109 )
[sub_resource type="TerraChunkBlocky" id=9]
[sub_resource type="TerrainChunkBlocky" id=9]
resource_name = "Chunk[1,-1]"
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 25.6, 0, -25.6 )
position_x = 1
@ -177,7 +177,7 @@ channel_count = 10
data_channel = PoolByteArray( 21, 1, 1, 0, 19, 4, 1, 0, 5, 17, 0, 19, 1, 17, 0, 15, 18, 0, 9, 4, 35, 0, 5, 36, 0, 5, 17, 0, 4, 18, 0, 6, 17, 0, 2, 18, 0, 7, 16, 0, 2, 108, 0, 0, 8, 0, 6, 2, 0, 12, 16, 0, 37, 4, 4, 135, 0, 15, 2, 0, 129, 80, 4, 4, 4, 4, 4 )
isolevel_channel = PoolByteArray( 242, 6, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 73, 74, 74, 74, 59, 60, 62, 17, 0, 17, 69, 18, 0, 68, 73, 74, 74, 61, 17, 0, 3, 18, 0, 35, 73, 73, 17, 0, 16, 68, 17, 0, 16, 72, 17, 0, 48, 73, 64, 65, 68, 0, 68, 69, 69, 70, 71, 18, 0, 58, 65, 66, 67, 17, 0, 18, 72, 50, 0, 1, 34, 0, 2, 53, 0, 17, 72, 33, 0, 7, 18, 0, 48, 72, 72, 68, 16, 0, 48, 70, 71, 71, 71, 0, 2, 2, 0, 0, 17, 0, 0, 16, 0, 5, 19, 0, 21, 71, 16, 0, 5, 2, 0, 1, 49, 0, 48, 71, 71, 70, 1, 0, 0, 9, 0, 4, 2, 0, 0, 16, 0, 1, 2, 0, 3, 61, 0, 8, 19, 0, 48, 70, 70, 72, 113, 0, 8, 18, 0, 17, 71, 203, 0, 7, 19, 0, 113, 71, 71, 75, 75, 75, 74, 74, 39, 0, 4, 119, 0, 66, 76, 76, 76, 76, 20, 0, 128, 72, 71, 71, 71, 71, 72, 72, 72 )
[sub_resource type="TerraChunkBlocky" id=10]
[sub_resource type="TerrainChunkBlocky" id=10]
resource_name = "Chunk[1,0]"
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 25.6, 0, 0 )
position_x = 1
@ -194,7 +194,7 @@ channel_count = 10
data_channel = PoolByteArray( 31, 4, 1, 0, 255, 44, 80, 4, 4, 4, 4, 4 )
isolevel_channel = PoolByteArray( 224, 75, 75, 75, 74, 74, 73, 72, 72, 71, 71, 71, 70, 70, 71, 1, 0, 66, 76, 76, 76, 76, 20, 0, 0, 21, 0, 145, 71, 72, 72, 72, 78, 78, 78, 77, 77, 20, 0, 1, 1, 0, 192, 72, 72, 72, 81, 80, 80, 80, 79, 78, 77, 76, 76, 62, 0, 176, 74, 74, 74, 73, 73, 83, 83, 83, 82, 81, 81, 21, 0, 16, 77, 64, 0, 130, 75, 75, 74, 86, 86, 85, 85, 84, 21, 0, 33, 79, 78, 44, 0, 128, 89, 89, 88, 88, 87, 86, 85, 84, 43, 0, 0, 64, 0, 129, 78, 77, 92, 92, 92, 91, 90, 89, 21, 0, 0, 43, 0, 133, 80, 79, 79, 96, 95, 95, 94, 93, 21, 0, 149, 83, 82, 81, 80, 99, 99, 98, 97, 96, 21, 0, 0, 20, 0, 68, 102, 102, 101, 100, 21, 0, 163, 90, 89, 88, 86, 85, 84, 105, 105, 104, 103, 21, 0, 1, 20, 0, 98, 87, 86, 108, 108, 107, 106, 21, 0, 180, 98, 97, 95, 94, 92, 91, 90, 88, 111, 110, 109, 20, 0, 163, 99, 98, 96, 95, 93, 92, 90, 113, 112, 111, 21, 0, 210, 103, 102, 100, 99, 97, 95, 94, 93, 115, 114, 113, 113, 112, 20, 0, 33, 104, 103, 39, 0, 82, 116, 116, 115, 114, 114, 20, 0, 48, 106, 105, 103, 78, 0, 97, 117, 117, 116, 116, 115, 115, 20, 0, 112, 108, 107, 105, 103, 102, 100, 99 )
[sub_resource type="TerraChunkBlocky" id=11]
[sub_resource type="TerrainChunkBlocky" id=11]
resource_name = "Chunk[1,1]"
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 25.6, 0, 25.6 )
position_x = 1
@ -811,7 +811,7 @@ transform = Transform( 1, 1.49012e-08, 0, 0, 0.990268, -0.139173, -2.98023e-08,
transform = Transform( 0.907555, -0.0761572, 0.41297, 0.0262364, 0.99178, 0.12524, -0.419113, -0.102827, 0.902093, 0.752064, 1.69463, 3.15021 )
current = true
[node name="World" type="TerraWorldBlocky" parent="." groups=[
[node name="World" type="TerrainWorldBlocky" parent="." groups=[
"save",
]]
world_height = 50.0

View File

@ -1,5 +1,5 @@
tool
extends TerraWorldBlocky
extends TerrainWorldBlocky
# Copyright Péter Magyar relintai@gmail.com
# MIT License, might be merged into the Voxelman engine module
@ -116,7 +116,7 @@ func _process(delta):
var count : int = chunk_get_count()
var i : int = 0
while i < count:
var c : TerraChunk = chunk_get_index(i)
var c : TerrainChunk = chunk_get_index(i)
var l : float = (Vector2(cpos.x, cpos.z) - Vector2(c.position_x, c.position_z)).length()
@ -161,7 +161,7 @@ func _process(delta):
#func _process(delta : float) -> void:
# if not generation_queue.empty():
# var chunk : TerraChunk = generation_queue.front()
# var chunk : TerrainChunk = generation_queue.front()
# refresh_chunk_lod_level_data(chunk)
@ -192,23 +192,23 @@ func _generation_finished():
func get_chunk_lod_level(x : int, z : int, default : int) -> int:
# var key : String = str(x) + "," + str(y) + "," + str(z)
var ch : TerraChunk = chunk_get(x, z)
var ch : TerrainChunk = chunk_get(x, z)
if ch == null:
return default
return ch.lod_size
func _create_chunk(x : int, z : int, pchunk : TerraChunk) -> TerraChunk:
func _create_chunk(x : int, z : int, pchunk : TerrainChunk) -> TerrainChunk:
if !pchunk:
pchunk = TerraChunkBlocky.new()
pchunk = TerrainChunkBlocky.new()
if pchunk.job_get_count() == 0:
var tj : TerraTerrarinJob = TerraTerrarinJob.new()
var lj : TerraLightJob = TerraLightJob.new()
var pj : TerraPropJob = TerraPropJob.new()
var tj : TerrainTerrainJob = TerrainTerrainJob.new()
var lj : TerrainLightJob = TerrainLightJob.new()
var pj : TerrainPropJob = TerrainPropJob.new()
var prop_mesher = TerraMesherBlocky.new()
var prop_mesher = TerrainMesherBlocky.new()
prop_mesher.base_light_value = 0.45
prop_mesher.ao_strength = 0.2
prop_mesher.uv_margin = Rect2(0.017, 0.017, 1 - 0.034, 1 - 0.034)
@ -218,38 +218,38 @@ func _create_chunk(x : int, z : int, pchunk : TerraChunk) -> TerraChunk:
pj.set_prop_mesher(prop_mesher);
var mesher : TerraMesherBlocky = TerraMesherBlocky.new()
var mesher : TerrainMesherBlocky = TerrainMesherBlocky.new()
mesher.base_light_value = 0.45
mesher.ao_strength = 0.2
mesher.uv_margin = Rect2(0.017, 0.017, 1 - 0.034, 1 - 0.034)
mesher.voxel_scale = voxel_scale
mesher.build_flags = build_flags
mesher.texture_scale = 3
mesher.channel_index_type = TerraChunkDefault.DEFAULT_CHANNEL_TYPE
mesher.channel_index_isolevel = TerraChunkDefault.DEFAULT_CHANNEL_ISOLEVEL
mesher.channel_index_type = TerrainChunkDefault.DEFAULT_CHANNEL_TYPE
mesher.channel_index_isolevel = TerrainChunkDefault.DEFAULT_CHANNEL_ISOLEVEL
# mesher.lod_index = 3
tj.set_mesher(mesher)
var s : TerraMesherJobStep = TerraMesherJobStep.new()
s.job_type = TerraMesherJobStep.TYPE_NORMAL
var s : TerrainMesherJobStep = TerrainMesherJobStep.new()
s.job_type = TerrainMesherJobStep.TYPE_NORMAL
tj.add_jobs_step(s)
# s = TerraMesherJobStep.new()
# s.job_type = TerraMesherJobStep.TYPE_NORMAL_LOD
# s = TerrainMesherJobStep.new()
# s.job_type = TerrainMesherJobStep.TYPE_NORMAL_LOD
# s.lod_index = 1
# tj.add_jobs_step(s)
#
# s = TerraMesherJobStep.new()
# s.job_type = TerraMesherJobStep.TYPE_NORMAL_LOD
# s = TerrainMesherJobStep.new()
# s.job_type = TerrainMesherJobStep.TYPE_NORMAL_LOD
# s.lod_index = 2
# tj.add_jobs_step(s)
#
# s = TerraMesherJobStep.new()
# s.job_type = TerraMesherJobStep.TYPE_MERGE_VERTS
# s = TerrainMesherJobStep.new()
# s.job_type = TerrainMesherJobStep.TYPE_MERGE_VERTS
# tj.add_jobs_step(s)
#
# s = TerraMesherJobStep.new()
# s.job_type = TerraMesherJobStep.TYPE_BAKE_TEXTURE
# s = TerrainMesherJobStep.new()
# s.job_type = TerrainMesherJobStep.TYPE_BAKE_TEXTURE
# tj.add_jobs_step(s)
@ -297,7 +297,7 @@ func create_light(x : int, y : int, z : int, size : int, color : Color) -> void:
var chunkx : int = int(x / chunk_size_x)
var chunkz : int = int(z / chunk_size_z)
var light : TerraLight = TerraLight.new()
var light : TerrainLight = TerrainLight.new()
light.color = color
light.size = size
light.set_world_position(x, 20, z)
@ -354,7 +354,7 @@ func set_test_lod(val : int) -> void:
test_lod = val
for i in range(chunk_get_count()):
var c : TerraChunkDefault = chunk_get_index(i)
var c : TerrainChunkDefault = chunk_get_index(i)
c.current_lod_level = test_lod

View File

@ -12,13 +12,13 @@ var max_level : int = 2
var dungeon_seed : int = 0
var spawn_mobs : bool = true
var owner_chunk : TerraChunk = null
var owner_chunk : TerrainChunk = null
var _dungeon : Spatial = null
var _dungeon_back_teleporter : Spatial = null
var teleport_to : Vector3 = Vector3()
var _world : TerraWorld = null
var _world : TerrainWorld = null
var _is_windows : bool = false
var _mouse_hover : bool = false
@ -117,7 +117,7 @@ func teleport():
# p.get_body().transform.origin = teleport_to
func on_chunk_removed(chunk : TerraChunk) -> void:
func on_chunk_removed(chunk : TerrainChunk) -> void:
if chunk == owner_chunk:
queue_free()

View File

@ -123,7 +123,7 @@ func _setup():
func _setup_terra_library(library):
._setup_terra_library(library)
if library is TerramanLibraryMerger:
if library is TerrainLibraryMerger:
library.get_prop_packer().add_texture(wall_texture)
library.get_prop_packer().add_texture(floor_texture)
library.get_prop_packer().add_texture(ceiling_texture)
@ -221,11 +221,11 @@ func _generate_voxel_chunk(chunk, spawn_mobs):
# for i in range(get_dungeon_start_room_count()):
# get_dungeon_start_room(i).generate_chunk(chunk, spawn_mobs)
func add_wall(chunk : TerraChunk, x : int, z : int, floor_pos : int, ceiling_pos : int, wall : MeshDataResource, tex : Texture):
func add_wall(chunk : TerrainChunk, x : int, z : int, floor_pos : int, ceiling_pos : int, wall : MeshDataResource, tex : Texture):
for y in range(floor_pos, ceiling_pos):
chunk.add_mesh_data_resourcev(Vector3(x, y, z), wall, tex)
func spawn_teleporter_scene(scene : PackedScene, transform : Transform, chunk : TerraChunk, teleports_to : Vector3):
func spawn_teleporter_scene(scene : PackedScene, transform : Transform, chunk : TerrainChunk, teleports_to : Vector3):
var s = scene.instance()
chunk.get_voxel_world().add_child(s)
s.transform = transform

View File

@ -115,7 +115,7 @@ func _generate_voxel_chunk(chunk, spawn_mobs):
if !aabb.intersects(chunk_aabb):
return
chunk.ensure_channel_allocated(TerraChunkDefault.DEFAULT_CHANNEL_ALT_TYPE, 1)
chunk.ensure_channel_allocated(TerrainChunkDefault.DEFAULT_CHANNEL_ALT_TYPE, 1)
var px : int = chunk.position_x * chunk.size_x - posx
var pz : int = chunk.position_z * chunk.size_z - posz
@ -180,12 +180,12 @@ func _generate_voxel_chunk(chunk, spawn_mobs):
# for i in range(get_dungeon_start_room_count()):
# get_dungeon_start_room(i).generate_chunk(chunk, spawn_mobs)
func add_wall(chunk : TerraChunk, x : int, z : int, floor_pos : int, ceiling_pos : int, wall : MeshDataResource, tex : Texture):
func add_wall(chunk : TerrainChunk, x : int, z : int, floor_pos : int, ceiling_pos : int, wall : MeshDataResource, tex : Texture):
for y in range(floor_pos, ceiling_pos):
chunk.set_voxel(0, x, z, TerraChunkDefault.DEFAULT_CHANNEL_ALT_TYPE)
chunk.set_voxel(0, x, z, TerrainChunkDefault.DEFAULT_CHANNEL_ALT_TYPE)
# chunk.add_mesh_data_resourcev(Vector3(x, y, z), wall, tex)
func spawn_teleporter_scene(scene : PackedScene, transform : Transform, chunk : TerraChunk, teleports_to : Vector3):
func spawn_teleporter_scene(scene : PackedScene, transform : Transform, chunk : TerrainChunk, teleports_to : Vector3):
var s = scene.instance()
chunk.get_voxel_world().add_child(s)
s.transform = transform

View File

@ -99,7 +99,7 @@ var death_timer : float = 0
var last_mouse_over : Entity = null
var world : TerraWorld = null
var world : TerrainWorld = null
var entity : Entity
var model_rotation_node : Spatial
@ -145,7 +145,7 @@ func _ready() -> void:
# set_process_unhandled_input(false)
func _enter_tree():
world = get_node(world_path) as TerraWorld
world = get_node(world_path) as TerrainWorld
set_physics_process(true)

View File

@ -225,10 +225,10 @@ _global_script_classes=[ {
"language": "GDScript",
"path": "res://addons/world_generator/resources/subzone.gd"
}, {
"base": "TerramanLevelGenerator",
"class": "TerraWorldGenerator",
"base": "TerrainLevelGenerator",
"class": "TerrainWorldGenerator",
"language": "GDScript",
"path": "res://scripts/world_generators/TerraWorldGenerator.gd"
"path": "res://scripts/world_generators/TerrainWorldGenerator.gd"
}, {
"base": "GameModule",
"class": "UIGuiChildModule",
@ -304,7 +304,7 @@ _global_script_class_icons={
"SpellEffectVisualBasic": "",
"SpellGD": "",
"SubZone": "",
"TerraWorldGenerator": "",
"TerrainWorldGenerator": "",
"UIGuiChildModule": "",
"UIWindowModule": "",
"WorldGenBaseResource": "",

View File

@ -1,7 +1,7 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://scenes/MainScene.gd" type="Script" id=1]
[ext_resource path="res://tw/TerraWorldBlocky.tscn" type="PackedScene" id=2]
[ext_resource path="res://tw/TerrainWorldBlocky.tscn" type="PackedScene" id=2]
[ext_resource path="res://menu/Menu.tscn" type="PackedScene" id=3]
[ext_resource path="res://ui/theme/ui_theme.tres" type="Theme" id=4]
[ext_resource path="res://ui/debug/DebugInfo.tscn" type="PackedScene" id=5]

View File

@ -41,7 +41,7 @@ var connect_button : Button
var naturalist_button : Button
var player : Entity
var terrarin : TerraWorld
var terrarin : TerrainWorld
var spawned : bool = false
@ -61,7 +61,7 @@ func _ready():
naturalist_button = get_node(naturalist_button_path)
naturalist_button.connect("pressed", self, "_on_client_naturalist_button_clicked")
terrarin = get_node(terrarin_path) as TerraWorld
terrarin = get_node(terrarin_path) as TerrainWorld
Server.connect("cplayer_master_created", self, "_cplayer_master_created")

View File

@ -1,6 +1,6 @@
tool
extends TerramanLevelGenerator
class_name TerraWorldGenerator
extends TerrainLevelGenerator
class_name TerrainWorldGenerator
# Copyright (c) 2019-2021 Péter Magyar
#
@ -26,10 +26,10 @@ export(int) var _level_seed : int
export(bool) var _spawn_mobs : bool
export(Resource) var world_gen_world : Resource = null
var _world : TerraWorld
var _library : TerramanLibrary
var _world : TerrainWorld
var _library : TerrainLibrary
func setup(world : TerraWorld, level_seed : int, spawn_mobs : bool, library: TerramanLibrary) -> void:
func setup(world : TerrainWorld, level_seed : int, spawn_mobs : bool, library: TerrainLibrary) -> void:
_level_seed = level_seed
_spawn_mobs = spawn_mobs
_library = library
@ -48,7 +48,7 @@ func get_spawn_chunk_position() -> Vector2:
return Vector2()
func _generate_chunk(chunk : TerraChunk) -> void:
func _generate_chunk(chunk : TerrainChunk) -> void:
if world_gen_world == null:
return

View File

@ -1,5 +1,5 @@
tool
extends TerraWorldBlocky
extends TerrainWorldBlocky
# Copyright Péter Magyar relintai@gmail.com
# MIT License, might be merged into the Voxelman engine module
@ -119,7 +119,7 @@ func _process(delta):
var count : int = chunk_get_count()
var i : int = 0
while i < count:
var c : TerraChunk = chunk_get_index(i)
var c : TerrainChunk = chunk_get_index(i)
var l : float = (Vector2(cpos.x, cpos.z) - Vector2(c.position_x, c.position_z)).length()
@ -164,7 +164,7 @@ func _process(delta):
#func _process(delta : float) -> void:
# if not generation_queue.empty():
# var chunk : TerraChunk = generation_queue.front()
# var chunk : TerrainChunk = generation_queue.front()
# refresh_chunk_lod_level_data(chunk)
@ -195,59 +195,59 @@ func _generation_finished():
func get_chunk_lod_level(x : int, z : int, default : int) -> int:
# var key : String = str(x) + "," + str(y) + "," + str(z)
var ch : TerraChunk = chunk_get(x, z)
var ch : TerrainChunk = chunk_get(x, z)
if ch == null:
return default
return ch.lod_size
func _create_chunk(x : int, z : int, pchunk : TerraChunk) -> TerraChunk:
func _create_chunk(x : int, z : int, pchunk : TerrainChunk) -> TerrainChunk:
if !pchunk:
pchunk = TerraChunkBlocky.new()
pchunk = TerrainChunkBlocky.new()
if pchunk.job_get_count() == 0:
var tj : TerraTerrarinJob = TerraTerrarinJob.new()
var lj : TerraLightJob = TerraLightJob.new()
var tj : TerrainTerrainJob = TerrainTerrainJob.new()
var lj : TerrainLightJob = TerrainLightJob.new()
var mesher : TerraMesherBlocky = TerraMesherBlocky.new()
var mesher : TerrainMesherBlocky = TerrainMesherBlocky.new()
mesher.base_light_value = 0.45
mesher.ao_strength = 0.2
mesher.uv_margin = Rect2(0.017, 0.017, 1 - 0.034, 1 - 0.034)
mesher.voxel_scale = voxel_scale
mesher.build_flags = build_flags
mesher.texture_scale = 3
mesher.channel_index_type = TerraChunkDefault.DEFAULT_CHANNEL_TYPE
mesher.channel_index_isolevel = TerraChunkDefault.DEFAULT_CHANNEL_ISOLEVEL
mesher.channel_index_type = TerrainChunkDefault.DEFAULT_CHANNEL_TYPE
mesher.channel_index_isolevel = TerrainChunkDefault.DEFAULT_CHANNEL_ISOLEVEL
# mesher.lod_index = 3
tj.set_mesher(mesher)
var s : TerraMesherJobStep = TerraMesherJobStep.new()
s.job_type = TerraMesherJobStep.TYPE_NORMAL
var s : TerrainMesherJobStep = TerrainMesherJobStep.new()
s.job_type = TerrainMesherJobStep.TYPE_NORMAL
tj.add_jobs_step(s)
s = TerraMesherJobStep.new()
s.job_type = TerraMesherJobStep.TYPE_NORMAL_LOD
s = TerrainMesherJobStep.new()
s.job_type = TerrainMesherJobStep.TYPE_NORMAL_LOD
s.lod_index = 1
tj.add_jobs_step(s)
s = TerraMesherJobStep.new()
s.job_type = TerraMesherJobStep.TYPE_NORMAL_LOD
s = TerrainMesherJobStep.new()
s.job_type = TerrainMesherJobStep.TYPE_NORMAL_LOD
s.lod_index = 2
tj.add_jobs_step(s)
s = TerraMesherJobStep.new()
s.job_type = TerraMesherJobStep.TYPE_MERGE_VERTS
s = TerrainMesherJobStep.new()
s.job_type = TerrainMesherJobStep.TYPE_MERGE_VERTS
tj.add_jobs_step(s)
s = TerraMesherJobStep.new()
s.job_type = TerraMesherJobStep.TYPE_BAKE_TEXTURE
s = TerrainMesherJobStep.new()
s.job_type = TerrainMesherJobStep.TYPE_BAKE_TEXTURE
tj.add_jobs_step(s)
var pj : TerraPropJob = TerraPropJob.new()
var pj : TerrainPropJob = TerrainPropJob.new()
var prop_mesher = TerraMesherBlocky.new()
var prop_mesher = TerrainMesherBlocky.new()
prop_mesher.base_light_value = 0.45
prop_mesher.ao_strength = 0.2
prop_mesher.uv_margin = Rect2(0.017, 0.017, 1 - 0.034, 1 - 0.034)
@ -255,19 +255,19 @@ func _create_chunk(x : int, z : int, pchunk : TerraChunk) -> TerraChunk:
prop_mesher.build_flags = build_flags
prop_mesher.texture_scale = 3
s.job_type = TerraMesherJobStep.TYPE_NORMAL
s.job_type = TerrainMesherJobStep.TYPE_NORMAL
pj.add_jobs_step(s)
s = TerraMesherJobStep.new()
s.job_type = TerraMesherJobStep.TYPE_MERGE_VERTS
s = TerrainMesherJobStep.new()
s.job_type = TerrainMesherJobStep.TYPE_MERGE_VERTS
pj.add_jobs_step(s)
s = TerraMesherJobStep.new()
s.job_type = TerraMesherJobStep.TYPE_BAKE_TEXTURE
s = TerrainMesherJobStep.new()
s.job_type = TerrainMesherJobStep.TYPE_BAKE_TEXTURE
pj.add_jobs_step(s)
s = TerraMesherJobStep.new()
s.job_type = TerraMesherJobStep.TYPE_SIMPLIFY_MESH
s = TerrainMesherJobStep.new()
s.job_type = TerrainMesherJobStep.TYPE_SIMPLIFY_MESH
var fqms : FastQuadraticMeshSimplifier = FastQuadraticMeshSimplifier.new()
s.fqms = fqms
s.simplification_steps = 2
@ -320,7 +320,7 @@ func create_light(x : int, y : int, z : int, size : int, color : Color) -> void:
var chunkx : int = int(x / chunk_size_x)
var chunkz : int = int(z / chunk_size_z)
var light : TerraLight = TerraLight.new()
var light : TerrainLight = TerrainLight.new()
light.color = color
light.size = size
light.set_world_position(x, 20, z)
@ -382,7 +382,7 @@ func set_test_lod(val : int) -> void:
test_lod = val
for i in range(chunk_get_count()):
var c : TerraChunkDefault = chunk_get_index(i)
var c : TerrainChunkDefault = chunk_get_index(i)
c.current_lod_level = test_lod

View File

@ -1,8 +1,8 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://tw/new_terramanlibrarymergerpcm.tres" type="TerramanLibraryMergerPCM" id=1]
[ext_resource path="res://tw/TerraWorldBlocky.gd" type="Script" id=2]
[ext_resource path="res://tw/world_generator.tres" type="TerramanLevelGenerator" id=3]
[ext_resource path="res://tw/new_terramanlibrarymergerpcm.tres" type="TerrainLibraryMergerPCM" id=1]
[ext_resource path="res://tw/TerrainWorldBlocky.gd" type="Script" id=2]
[ext_resource path="res://tw/world_generator.tres" type="TerrainLevelGenerator" id=3]
[ext_resource path="res://scripts/settings/DirectionalLightSettings.gd" type="Script" id=4]
[ext_resource path="res://test_props/MeshDataInstance.tres" type="PropData" id=5]
@ -47,7 +47,7 @@ glow_strength = 1.1
glow_bloom = 0.1
glow_hdr_luminance_cap = 1.0
[node name="World" type="TerraWorldBlocky"]
[node name="World" type="TerrainWorldBlocky"]
world_height = 100.0
library = ExtResource( 1 )
level_generator = ExtResource( 3 )

View File

@ -1,14 +1,14 @@
tool
extends TerramanLevelGenerator
extends TerrainLevelGenerator
var lseed = 0
func setup(world : TerraWorld, level_seed : int, spawn_mobs : bool, library: TerramanLibrary) -> void:
func setup(world : TerrainWorld, level_seed : int, spawn_mobs : bool, library: TerrainLibrary) -> void:
lseed = level_seed
func _generate_chunk(chunk: TerraChunk) -> void:
chunk.channel_ensure_allocated(TerraChunkDefault.DEFAULT_CHANNEL_TYPE, 1)
chunk.channel_ensure_allocated(TerraChunkDefault.DEFAULT_CHANNEL_ISOLEVEL, 0)
func _generate_chunk(chunk: TerrainChunk) -> void:
chunk.channel_ensure_allocated(TerrainChunkDefault.DEFAULT_CHANNEL_TYPE, 1)
chunk.channel_ensure_allocated(TerrainChunkDefault.DEFAULT_CHANNEL_ISOLEVEL, 0)
var s : OpenSimplexNoise = OpenSimplexNoise.new()
s.seed = lseed
@ -22,9 +22,9 @@ func _generate_chunk(chunk: TerraChunk) -> void:
val *= val
val *= 20.0
chunk.set_voxel(val, x, z, TerraChunkDefault.DEFAULT_CHANNEL_ISOLEVEL)
chunk.set_voxel(val, x, z, TerrainChunkDefault.DEFAULT_CHANNEL_ISOLEVEL)
if val < 50:
chunk.set_voxel(2, x, z, TerraChunkDefault.DEFAULT_CHANNEL_TYPE)
chunk.set_voxel(2, x, z, TerrainChunkDefault.DEFAULT_CHANNEL_TYPE)
elif val > 70:
chunk.set_voxel(4, x, z, TerraChunkDefault.DEFAULT_CHANNEL_TYPE)
chunk.set_voxel(4, x, z, TerrainChunkDefault.DEFAULT_CHANNEL_TYPE)

View File

@ -1,4 +1,4 @@
[gd_resource type="TerramanLevelGenerator" load_steps=2 format=2]
[gd_resource type="TerrainLevelGenerator" load_steps=2 format=2]
[ext_resource path="res://tw/new_terramanlevelgenerator.gd" type="Script" id=1]

View File

@ -1,4 +1,4 @@
[gd_resource type="TerramanLevelGeneratorFlat" format=2]
[gd_resource type="TerrainLevelGeneratorFlat" format=2]
[resource]
floor_position = 10

View File

@ -1,4 +1,4 @@
[gd_resource type="TerramanLibraryMerger" load_steps=10 format=2]
[gd_resource type="TerrainLibraryMerger" load_steps=10 format=2]
[ext_resource path="res://modules/planets/test_planet/voxel_library/textures/grass_mossy_albedo.png" type="Texture" id=1]
[ext_resource path="res://modules/planets/test_planet/voxel_library/textures/stone_1_albedo.png" type="Texture" id=2]
@ -6,22 +6,22 @@
[ext_resource path="res://modules/core/materials/7_standard_material_notex.tres" type="Material" id=4]
[ext_resource path="res://modules/core/materials/5_standard_material_nouv2.tres" type="Material" id=5]
[sub_resource type="TerraSurfaceMerger" id=1]
[sub_resource type="TerrainSurfaceMerger" id=1]
texture_top = ExtResource( 1 )
texture_bottom = ExtResource( 1 )
texture_side = ExtResource( 1 )
[sub_resource type="TerraSurfaceMerger" id=2]
[sub_resource type="TerrainSurfaceMerger" id=2]
texture_top = ExtResource( 3 )
texture_bottom = ExtResource( 3 )
texture_side = ExtResource( 3 )
[sub_resource type="TerraSurfaceMerger" id=3]
[sub_resource type="TerrainSurfaceMerger" id=3]
texture_top = ExtResource( 3 )
texture_bottom = ExtResource( 1 )
texture_side = ExtResource( 2 )
[sub_resource type="TerraSurfaceMerger" id=4]
[sub_resource type="TerrainSurfaceMerger" id=4]
texture_top = ExtResource( 2 )
texture_bottom = ExtResource( 2 )
texture_side = ExtResource( 2 )

View File

@ -1,4 +1,4 @@
[gd_resource type="TerramanLibraryMergerPCM" load_steps=12 format=2]
[gd_resource type="TerrainLibraryMergerPCM" load_steps=12 format=2]
[ext_resource path="res://modules/planets/test_planet/voxel_library/textures/grass_mossy_albedo.png" type="Texture" id=1]
[ext_resource path="res://modules/planets/test_planet/voxel_library/textures/stone_1_albedo.png" type="Texture" id=2]
@ -8,22 +8,22 @@
[ext_resource path="res://modules/core/materials/6_standard_material_prop_nouv2.tres" type="Material" id=6]
[ext_resource path="res://modules/core/materials/8_standard_material_prop_notex.tres" type="Material" id=7]
[sub_resource type="TerraSurfaceMerger" id=1]
[sub_resource type="TerrainSurfaceMerger" id=1]
texture_top = ExtResource( 1 )
texture_bottom = ExtResource( 1 )
texture_side = ExtResource( 1 )
[sub_resource type="TerraSurfaceMerger" id=2]
[sub_resource type="TerrainSurfaceMerger" id=2]
texture_top = ExtResource( 3 )
texture_bottom = ExtResource( 3 )
texture_side = ExtResource( 3 )
[sub_resource type="TerraSurfaceMerger" id=3]
[sub_resource type="TerrainSurfaceMerger" id=3]
texture_top = ExtResource( 3 )
texture_bottom = ExtResource( 1 )
texture_side = ExtResource( 2 )
[sub_resource type="TerraSurfaceMerger" id=4]
[sub_resource type="TerrainSurfaceMerger" id=4]
texture_top = ExtResource( 2 )
texture_bottom = ExtResource( 2 )
texture_side = ExtResource( 2 )

View File

@ -1,6 +1,6 @@
[gd_resource type="TerramanLevelGenerator" load_steps=3 format=2]
[gd_resource type="TerrainLevelGenerator" load_steps=3 format=2]
[ext_resource path="res://scripts/world_generators/TerraWorldGenerator.gd" type="Script" id=1]
[ext_resource path="res://scripts/world_generators/TerrainWorldGenerator.gd" type="Script" id=1]
[ext_resource path="res://modules/planets/test_planet/test_world.tres" type="Resource" id=2]
[resource]

View File

@ -47,10 +47,10 @@ func get_editor_class() -> String:
func get_editor_additional_text() -> String:
return "TestContinent"
func _setup_terra_library(library : TerramanLibrary, pseed : int) -> void:
func _setup_terra_library(library : TerrainLibrary, pseed : int) -> void:
pass
func _generate_terra_chunk(chunk: TerraChunk, pseed : int, spawn_mobs: bool, stack : Array, stack_index : int) -> void:
func _generate_terra_chunk(chunk: TerrainChunk, pseed : int, spawn_mobs: bool, stack : Array, stack_index : int) -> void:
voxel_scale = chunk.voxel_scale
current_seed = pseed
@ -98,9 +98,9 @@ func _generate_terra_chunk(chunk: TerraChunk, pseed : int, spawn_mobs: bool, sta
100, \
chunk.position_z * chunk.size_z * chunk.voxel_scale + chunk.size_z / 2))
func gen_terra_chunk(chunk: TerraChunk, rng : RandomNumberGenerator) -> void:
chunk.channel_ensure_allocated(TerraChunkDefault.DEFAULT_CHANNEL_TYPE, 1)
chunk.channel_ensure_allocated(TerraChunkDefault.DEFAULT_CHANNEL_ISOLEVEL, 0)
func gen_terra_chunk(chunk: TerrainChunk, rng : RandomNumberGenerator) -> void:
chunk.channel_ensure_allocated(TerrainChunkDefault.DEFAULT_CHANNEL_TYPE, 1)
chunk.channel_ensure_allocated(TerrainChunkDefault.DEFAULT_CHANNEL_ISOLEVEL, 0)
var s : FastNoise = FastNoise.new()
s.set_noise_type(FastNoise.TYPE_SIMPLEX)
@ -120,12 +120,12 @@ func gen_terra_chunk(chunk: TerraChunk, rng : RandomNumberGenerator) -> void:
val *= 20.0
val += abs(sdet.get_noise_2d(vx * 0.8, vz * 0.8)) * 20
chunk.set_voxel(val, x, z, TerraChunkDefault.DEFAULT_CHANNEL_ISOLEVEL)
chunk.set_voxel(val, x, z, TerrainChunkDefault.DEFAULT_CHANNEL_ISOLEVEL)
if val < 50:
chunk.set_voxel(2, x, z, TerraChunkDefault.DEFAULT_CHANNEL_TYPE)
chunk.set_voxel(2, x, z, TerrainChunkDefault.DEFAULT_CHANNEL_TYPE)
elif val > 90:
chunk.set_voxel(4, x, z, TerraChunkDefault.DEFAULT_CHANNEL_TYPE)
chunk.set_voxel(4, x, z, TerrainChunkDefault.DEFAULT_CHANNEL_TYPE)
else:
if chunk.position_x == 0 && chunk.position_z == 0:
continue
@ -148,11 +148,11 @@ func gen_terra_chunk(chunk: TerraChunk, rng : RandomNumberGenerator) -> void:
# chunk.voxel_world.prop_add(tr, prop_tree2)
func spawn_dungeon(chunk: TerraChunk, dungeon_seed : int, spawn_mobs : bool) -> void:
func spawn_dungeon(chunk: TerrainChunk, dungeon_seed : int, spawn_mobs : bool) -> void:
var x : float = chunk.position_x * chunk.voxel_scale * chunk.size_x
var z : float = chunk.position_z * chunk.voxel_scale * chunk.size_z
var vh : int = chunk.get_voxel(6, 6, TerraChunkDefault.DEFAULT_CHANNEL_ISOLEVEL)
var vh : int = chunk.get_voxel(6, 6, TerrainChunkDefault.DEFAULT_CHANNEL_ISOLEVEL)
var vwh : float = chunk.get_voxel_scale() * chunk.get_world_height() * (vh / 256.0)
var dt : Spatial = dungeon_teleporter.instance()

View File

@ -14,7 +14,7 @@ func _setup() -> void:
func get_spawn_chunk_position() -> Vector2:
return Vector2(main_chunk_pos_x, main_chunk_pos_z)
func _generate_terra_chunk(chunk: TerraChunk, pseed : int, spawn_mobs: bool, stack : Array, stack_index : int) -> void:
func _generate_terra_chunk(chunk: TerrainChunk, pseed : int, spawn_mobs: bool, stack : Array, stack_index : int) -> void:
if !spawn_mobs:
return