feat: introduce identity-backed goat
This commit is contained in:
@@ -22,7 +22,10 @@ func validate() -> Array[String]:
|
||||
if (
|
||||
target_type
|
||||
not in [
|
||||
SimulationIds.TARGET_RESOURCE, SimulationIds.TARGET_ACTIVITY, SimulationIds.TARGET_FREE
|
||||
SimulationIds.TARGET_RESOURCE,
|
||||
SimulationIds.TARGET_ACTIVITY,
|
||||
SimulationIds.TARGET_ANIMAL,
|
||||
SimulationIds.TARGET_FREE,
|
||||
]
|
||||
):
|
||||
errors.append("target_type '%s' is invalid for '%s'" % [target_type, action_id])
|
||||
|
||||
@@ -4,6 +4,7 @@ extends RefCounted
|
||||
const ACTION_PATHS := [
|
||||
"res://simulation/definitions/actions/gather_food.tres",
|
||||
"res://simulation/definitions/actions/gather_wood.tres",
|
||||
"res://simulation/definitions/actions/feed_animal.tres",
|
||||
"res://simulation/definitions/actions/patrol.tres",
|
||||
"res://simulation/definitions/actions/study.tres",
|
||||
"res://simulation/definitions/actions/eat.tres",
|
||||
|
||||
@@ -6,6 +6,7 @@ const ACTION_DEAD := &"dead"
|
||||
const ACTION_SLEEP := &"sleep"
|
||||
const ACTION_GATHER_FOOD := &"gather_food"
|
||||
const ACTION_GATHER_WOOD := &"gather_wood"
|
||||
const ACTION_FEED_ANIMAL := &"feed_animal"
|
||||
const ACTION_PATROL := &"patrol"
|
||||
const ACTION_STUDY := &"study"
|
||||
const ACTION_EAT := &"eat"
|
||||
@@ -23,11 +24,15 @@ const PROFESSION_WANDERER := &"wanderer"
|
||||
|
||||
const TARGET_RESOURCE := &"resource"
|
||||
const TARGET_ACTIVITY := &"activity"
|
||||
const TARGET_ANIMAL := &"animal"
|
||||
const TARGET_FREE := &"free"
|
||||
|
||||
const RESOURCE_FOOD := &"food"
|
||||
const RESOURCE_WOOD := &"wood"
|
||||
|
||||
const ANIMAL_DUNJA := &"goat_dunja"
|
||||
const SPECIES_GOAT := &"goat"
|
||||
|
||||
const STORAGE_VILLAGE_PANTRY := &"village_pantry"
|
||||
const STORAGE_VILLAGE_WOODPILE := &"village_woodpile"
|
||||
|
||||
@@ -40,6 +45,7 @@ const EVENT_NPC_DIED := &"npc_died"
|
||||
const EVENT_TASK_STARTED := &"task_started"
|
||||
const EVENT_TASK_BLOCKED := &"task_blocked"
|
||||
const EVENT_RESOURCE_DEPLETED := &"resource_depleted"
|
||||
const EVENT_ANIMAL_FED := &"animal_fed"
|
||||
|
||||
const OPPORTUNITY_RESTOCK_EMPTY_PANTRY := &"restock_empty_pantry"
|
||||
const OPPORTUNITY_SUPPLY_MISSING_WOOD := &"supply_missing_wood"
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
[gd_resource type="Resource" script_class="ActionDefinition" load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://simulation/definitions/ActionDefinition.gd" id="1"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1")
|
||||
action_id = &"feed_animal"
|
||||
display_name = "Feed Dunja"
|
||||
default_duration = 2.0
|
||||
preferred_profession_id = &"farmer"
|
||||
target_type = &"animal"
|
||||
completion_cost_resource_id = &"food"
|
||||
completion_cost_amount = 1.0
|
||||
Reference in New Issue
Block a user