mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-12-21 13:16:49 +01:00
Added a seed parameter to the world generation methods.
This commit is contained in:
parent
47c49b56ab
commit
3adfad40a2
@ -32,36 +32,36 @@ func duplicate_content_entry(entry : WorldGenBaseResource) -> void:
|
|||||||
de.resource_name += " (Duplicate)"
|
de.resource_name += " (Duplicate)"
|
||||||
add_content(de)
|
add_content(de)
|
||||||
|
|
||||||
func setup_terra_library(library : TerramanLibrary) -> void:
|
func setup_terra_library(library : TerramanLibrary, pseed : int) -> void:
|
||||||
_setup_terra_library(library)
|
_setup_terra_library(library, pseed)
|
||||||
|
|
||||||
for c in get_content():
|
for c in get_content():
|
||||||
if c:
|
if c:
|
||||||
c.setup_terra_library()
|
c.setup_terra_library(library, pseed)
|
||||||
|
|
||||||
func _setup_terra_library(library : TerramanLibrary) -> void:
|
func _setup_terra_library(library : TerramanLibrary, pseed : int) -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func generate_terra_chunk(chunk: TerraChunk, spawn_mobs: bool) -> void:
|
func generate_terra_chunk(chunk: TerraChunk, pseed : int, spawn_mobs: bool) -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func generate_map() -> Image:
|
func generate_map(pseed : int) -> Image:
|
||||||
var img : Image = Image.new()
|
var img : Image = Image.new()
|
||||||
|
|
||||||
img.create(get_rect().size.x, get_rect().size.y, false, Image.FORMAT_RGBA8)
|
img.create(get_rect().size.x, get_rect().size.y, false, Image.FORMAT_RGBA8)
|
||||||
|
|
||||||
add_to_map(img)
|
add_to_map(img, pseed)
|
||||||
|
|
||||||
return img
|
return img
|
||||||
|
|
||||||
func add_to_map(var img : Image) -> void:
|
func add_to_map(var img : Image, pseed : int) -> void:
|
||||||
_add_to_map(img)
|
_add_to_map(img, pseed)
|
||||||
|
|
||||||
for c in get_content():
|
for c in get_content():
|
||||||
if c:
|
if c:
|
||||||
c.add_to_map(img)
|
c.add_to_map(img, pseed)
|
||||||
|
|
||||||
func _add_to_map(var img : Image) -> void:
|
func _add_to_map(var img : Image, pseed : int) -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func get_editor_rect_border_color() -> Color:
|
func get_editor_rect_border_color() -> Color:
|
||||||
|
Loading…
Reference in New Issue
Block a user