Update
This commit is contained in:
@@ -32,6 +32,7 @@ enum Direction {
|
||||
|
||||
var diagonal_movement: bool = false
|
||||
|
||||
|
||||
class NeighborInfo:
|
||||
var position: Vector2i
|
||||
var direction: Direction
|
||||
@@ -430,6 +431,22 @@ func _on_mesh_library_changed():
|
||||
validate_item_indices()
|
||||
if auto_generate:
|
||||
generate_grid()
|
||||
_update_cell_option_buttons()
|
||||
|
||||
func _update_cell_option_buttons():
|
||||
if not mesh_library:
|
||||
return
|
||||
|
||||
var item_list = mesh_library.get_item_list()
|
||||
|
||||
for x in range(columns):
|
||||
for z in range(rows):
|
||||
var position = Vector3i(x, 0, z)
|
||||
var cell_item = get_cell_item(position)
|
||||
if cell_item != -1 and cell_item < item_list.size():
|
||||
set_cell_item(position, cell_item)
|
||||
else:
|
||||
set_cell_item(position, 0)
|
||||
|
||||
func _set(property, value):
|
||||
if property == "mesh_library":
|
||||
|
||||
Reference in New Issue
Block a user