Add terrain biomes jumping and extensible gathering professions

This commit is contained in:
dingo
2026-09-08 21:54:23 -04:00
parent 141cb9e6b2
commit df7b245ca7
34 changed files with 1895 additions and 184 deletions
+12
View File
@@ -19,6 +19,8 @@ type Recipe struct {
}
type Balance struct {
Gathering *GatheringContent `yaml:"gathering"`
GatheringRules *GatheringRules `yaml:"gatheringRules"`
Version int `yaml:"version"`
TickHz int `yaml:"tickHz"`
SnapshotHz int `yaml:"snapshotHz"`
@@ -76,6 +78,16 @@ func Parse(data []byte) (Balance, error) {
return b, b.Validate()
}
func (b Balance) Validate() error {
if b.Gathering != nil {
if err := b.Gathering.Validate(); err != nil {
return err
}
}
if b.GatheringRules != nil {
if err := b.GatheringRules.Validate(); err != nil {
return err
}
}
if b.Stats == nil {
return fmt.Errorf("stats rules are required")
}