feat: add Tekton entity with movement, carry/throw mechanics, and a static controller for item throwing.
This commit is contained in:
@@ -659,6 +659,8 @@ func _create_tekton(pos: Vector2i, tekton_id: int, is_static: bool = false):
|
||||
|
||||
# If Static, swap controller
|
||||
if is_static:
|
||||
tekton.is_static_turret = true
|
||||
|
||||
var old_controller = tekton.get_node_or_null("TektonController")
|
||||
if old_controller:
|
||||
old_controller.queue_free()
|
||||
|
||||
@@ -2019,6 +2019,7 @@ func _find_nearby_tekton() -> Node3D: # Find closest Tekton
|
||||
for t in tektons:
|
||||
if t.is_carried: continue
|
||||
if t.get("is_recovering"): continue # Cannot grab recovering/shrunk Tekton
|
||||
if t.get("is_static_turret"): continue # Cannot grab/knock static turret
|
||||
|
||||
# Check adjacency (or same tile)
|
||||
# Assuming is_adjacent_or_same is a helper function that checks if two Vector2i are adjacent or the same.
|
||||
|
||||
Reference in New Issue
Block a user