Add item actions, targeting, bindings, and encumbrance
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user