mirror of
https://github.com/Relintai/broken_seals_roguelike.git
synced 2024-11-21 13:17:17 +01:00
Reimplemented the editor_generate property for the tile maps.
This commit is contained in:
parent
ebfd0914c4
commit
f695a8fa59
@ -1,3 +1,4 @@
|
|||||||
|
tool
|
||||||
extends Node2D
|
extends Node2D
|
||||||
|
|
||||||
# Copyright (c) 2019 Péter Magyar
|
# Copyright (c) 2019 Péter Magyar
|
||||||
@ -54,6 +55,9 @@ onready var tile_map : = $Terrarin
|
|||||||
onready var visibility_map : RTileMap = $VisibilityMap
|
onready var visibility_map : RTileMap = $VisibilityMap
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
|
if Engine.editor_hint:
|
||||||
|
return
|
||||||
|
|
||||||
tile_size = get_node("/root/Main").get_tile_size()
|
tile_size = get_node("/root/Main").get_tile_size()
|
||||||
connect("visibility_changed", self, "on_visibility_changed")
|
connect("visibility_changed", self, "on_visibility_changed")
|
||||||
|
|
||||||
@ -464,16 +468,22 @@ func get_editor_generate() -> bool:
|
|||||||
return _editor_generate
|
return _editor_generate
|
||||||
|
|
||||||
func set_editor_generate(value : bool) -> void:
|
func set_editor_generate(value : bool) -> void:
|
||||||
|
if !Engine.editor_hint:
|
||||||
|
return
|
||||||
|
|
||||||
if value:
|
if value:
|
||||||
#library.refresh_rects()
|
#library.refresh_rects()
|
||||||
|
|
||||||
#level_generator.setup(self, current_seed, false, library)
|
#level_generator.setup(self, current_seed, false, library)
|
||||||
#spawn()
|
#spawn()
|
||||||
pass
|
build_level()
|
||||||
|
visibility_map.clear()
|
||||||
else:
|
else:
|
||||||
#spawned = false
|
#spawned = false
|
||||||
#clear()
|
rooms.clear()
|
||||||
pass
|
map.clear()
|
||||||
|
tile_map.clear()
|
||||||
|
visibility_map.clear()
|
||||||
|
|
||||||
_editor_generate = value
|
_editor_generate = value
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user