extends Resource

## Discrete follow distances (meters), **near → far** (ascending). Index **0** = closest.
## No `class_name` — see repo Godot headless / CI notes.
@export var band_distances: PackedFloat32Array = PackedFloat32Array([25.709])
@export var default_band_index: int = 0


func band_count() -> int:
	return band_distances.size()


## **True** when every entry is **> 0**.
## Empty arrays are vacuously true; callers also check [method band_count].
func all_band_distances_positive() -> bool:
	for i in range(band_distances.size()):
		if band_distances[i] <= 0.0:
			return false
	return true


func clamp_index(i: int) -> int:
	var n := band_count()
	if n == 0:
		return 0
	return clampi(i, 0, n - 1)


func distance_at(index: int) -> float:
	var n := band_count()
	if n == 0:
		return 0.0
	var ci := clamp_index(index)
	return band_distances[ci]
