Add item actions, targeting, bindings, and encumbrance

This commit is contained in:
dingo
2026-09-10 20:57:36 -04:00
parent 32955eca09
commit 9b01ee38e3
38 changed files with 1297 additions and 77 deletions
+6
View File
@@ -19,6 +19,7 @@ type Recipe struct {
}
type Balance struct {
Inventory *InventoryRules `yaml:"inventory"`
XPCurve *XPCurve `yaml:"xpCurve"`
Housing *HousingRules `yaml:"housing"`
Building *BuildingContent `yaml:"building"`
@@ -85,6 +86,11 @@ func Parse(data []byte) (Balance, error) {
return b, b.Validate()
}
func (b Balance) Validate() error {
if b.Inventory != nil {
if e := b.Inventory.Validate(); e != nil {
return e
}
}
if b.XPCurve != nil {
if e := b.XPCurve.Validate(); e != nil {
return e