refactor: clarify simulation ownership
This commit is contained in:
@@ -4,7 +4,7 @@ signal arrived_at_target(sim_id: int)
|
||||
signal navigation_failed(sim_id: int)
|
||||
signal position_changed(sim_id: int, active_position: Vector3)
|
||||
|
||||
const DEBUG_LOGS := true
|
||||
@export var debug_logs := false
|
||||
|
||||
@export var move_speed := 3.0
|
||||
@export var rotation_speed := 8.0
|
||||
@@ -47,7 +47,7 @@ var glyph_phase := 0.0
|
||||
|
||||
|
||||
func debug_log(message: String) -> void:
|
||||
if DEBUG_LOGS:
|
||||
if debug_logs:
|
||||
print("[NPCVisual] ", name, " | ", message)
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ func _physics_process(delta: float) -> void:
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
# keep your camera mouse code here too
|
||||
if event.is_action_pressed("interact"):
|
||||
try_interact()
|
||||
|
||||
@@ -100,13 +99,6 @@ func try_harvest_resource_node() -> bool:
|
||||
return true
|
||||
|
||||
|
||||
func is_near(zone: Marker3D) -> bool:
|
||||
if zone == null:
|
||||
return false
|
||||
|
||||
return global_position.distance_to(zone.global_position) <= interaction_range
|
||||
|
||||
|
||||
func is_near_storage(storage_node: StorageNode) -> bool:
|
||||
if storage_node == null:
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user