aboutsummaryrefslogtreecommitdiff
path: root/internal/action
diff options
context:
space:
mode:
Diffstat (limited to 'internal/action')
-rw-r--r--internal/action/behavior.go2
-rw-r--r--internal/action/recipe.go8
2 files changed, 10 insertions, 0 deletions
diff --git a/internal/action/behavior.go b/internal/action/behavior.go
index 67baab0..ccd95bf 100644
--- a/internal/action/behavior.go
+++ b/internal/action/behavior.go
@@ -49,6 +49,7 @@ type NodeAction struct {
TakeItem string `yaml:"take_item"`
Teleport int `yaml:"teleport"`
Heal int `yaml:"heal"`
+ Cost int `yaml:"cost"`
}
type Condition struct {
@@ -57,6 +58,7 @@ type Condition struct {
Not bool `yaml:"not"`
PlayerFlag string `yaml:"player_flag"`
HasItem string `yaml:"has_item"`
+ MinCredits int `yaml:"min_credits"`
AllOf []Condition `yaml:"all_of"`
AnyOf []Condition `yaml:"any_of"`
}
diff --git a/internal/action/recipe.go b/internal/action/recipe.go
index 2e93c06..fee3434 100644
--- a/internal/action/recipe.go
+++ b/internal/action/recipe.go
@@ -21,6 +21,7 @@ type RecipeDef struct {
Level int `yaml:"level"`
XP int `yaml:"xp"`
Station []string `yaml:"station"`
+ Tool string `yaml:"tool"`
Consume []ConsumeEntry `yaml:"consume"`
Output string `yaml:"output"`
OutputQty int `yaml:"output_qty"`
@@ -153,6 +154,13 @@ func (r *RecipeDef) DisplayName() string {
return r.Output
}
+func (r *RecipeDef) EffectiveSkill() string {
+ if r.Skill != "" {
+ return r.Skill
+ }
+ return r.Type
+}
+
func (s *RecipeStore) FindByNameOrID(query string, recipeType string) (*RecipeDef, error) {
all, err := s.LoadAll()
if err != nil {