merge: integrate remote player quest slices

This commit is contained in:
Rijad Zuzo
2026-08-16 16:53:30 +02:00
55 changed files with 3640 additions and 54 deletions
+14
View File
@@ -121,6 +121,20 @@ func get_state(animal_id: StringName) -> AnimalStateRecord:
return states.get(animal_id) as AnimalStateRecord
func get_all_states() -> Array[AnimalStateRecord]:
var all_states: Array[AnimalStateRecord] = []
for animal_id in states.keys():
var animal_state := states[animal_id] as AnimalStateRecord
if animal_state != null:
all_states.append(animal_state)
all_states.sort_custom(_sort_states_by_id)
return all_states
static func _sort_states_by_id(first: AnimalStateRecord, second: AnimalStateRecord) -> bool:
return String(first.get_animal_id()) < String(second.get_animal_id())
func reserve(animal_id: StringName, agent_id: int) -> bool:
var animal_state := get_state(animal_id)
return animal_state != null and animal_state.can_npc_feed() and animal_state.reserve(agent_id)