feat: define reusable animal archetypes

This commit is contained in:
Rijad Zuzo
2026-08-12 20:50:52 +02:00
parent d5eb2b81f9
commit 4e4ae1a969
20 changed files with 1141 additions and 411 deletions
@@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="AnimalCatalog" load_steps=4 format=3]
[ext_resource type="Script" path="res://simulation/animals/AnimalCatalog.gd" id="1_catalog"]
[ext_resource type="Resource" path="res://simulation/animals/definitions/domestic_goat.tres" id="2_goat"]
[ext_resource type="Resource" path="res://simulation/animals/definitions/domestic_sheep.tres" id="3_sheep"]
[resource]
script = ExtResource("1_catalog")
animals = Array[ExtResource("2_goat")]([ExtResource("2_goat"), ExtResource("3_sheep")])
@@ -0,0 +1,18 @@
[gd_resource type="Resource" script_class="AnimalDefinition" load_steps=2 format=3]
[ext_resource type="Script" path="res://simulation/animals/AnimalDefinition.gd" id="1_definition"]
[resource]
script = ExtResource("1_definition")
animal_definition_id = &"domestic_goat"
species_id = &"goat"
display_name = "Domestic goat"
behavior_id = &"grazer_routine"
supported_action_ids = Array[StringName]([&"feed_animal"])
presentation_scene_path = "res://world/animals/grazer/cozy_grazer.tscn"
movement_speed = 1.6
visual_scale = Vector3(1, 1, 1)
body_scale = Vector3(1, 1, 1)
fluff_scale = Vector3(1, 1, 1)
show_horns = true
show_beard = true
@@ -0,0 +1,18 @@
[gd_resource type="Resource" script_class="AnimalDefinition" load_steps=2 format=3]
[ext_resource type="Script" path="res://simulation/animals/AnimalDefinition.gd" id="1_definition"]
[resource]
script = ExtResource("1_definition")
animal_definition_id = &"domestic_sheep"
species_id = &"sheep"
display_name = "Domestic sheep"
behavior_id = &"grazer_routine"
supported_action_ids = Array[StringName]([&"feed_animal"])
presentation_scene_path = "res://world/animals/grazer/cozy_grazer.tscn"
movement_speed = 1.4
visual_scale = Vector3(1.08, 1.04, 1.08)
body_scale = Vector3(1.12, 1.08, 1.12)
fluff_scale = Vector3(1.16, 1.14, 1.16)
show_horns = false
show_beard = false