Added basic build menu and placement

This commit is contained in:
2024-03-06 09:25:28 -06:00
parent abde90e75f
commit ca8cfee1e8
25 changed files with 377 additions and 27 deletions

View File

@@ -1,8 +1,8 @@
class_name CellData
extends Resource
const BUILD = preload("res://data/interactions/build.tres")
const GATHER = preload("res://data/interactions/gather.tres")
const BUILD = preload("res://data/interactions/build/build.tres")
const GATHER = preload("res://data/interactions/gather/gather.tres")
@export var layer_info: Dictionary = {
Constants.TilemapLayers.CORRUPTION: false
@@ -40,6 +40,12 @@ func is_corrupted() -> bool:
func has_layer(layer: int) -> bool:
return layer_info.has(layer)
func is_interactable() -> bool:
return has_resource() or has_building()
func is_buildable() -> bool:
return not has_resource() or not has_building()
func get_interaction_options() -> Array[Interaction]:
var interactions: Array[Interaction] = []
if has_resource():