Add housing storage, guest permissions, and timed key destruction
This commit is contained in:
@@ -19,6 +19,7 @@ type Recipe struct {
|
||||
}
|
||||
|
||||
type Balance struct {
|
||||
Housing *HousingRules `yaml:"housing"`
|
||||
Building *BuildingContent `yaml:"building"`
|
||||
Powers *PowerContent `yaml:"powers"`
|
||||
Crafting *CraftingContent `yaml:"crafting"`
|
||||
@@ -83,6 +84,11 @@ func Parse(data []byte) (Balance, error) {
|
||||
return b, b.Validate()
|
||||
}
|
||||
func (b Balance) Validate() error {
|
||||
if b.Housing != nil {
|
||||
if e := b.Housing.Validate(); e != nil {
|
||||
return e
|
||||
}
|
||||
}
|
||||
if e := (Catalog{Building: b.Building, Crafting: b.Crafting, Items: b.Items}).validateBuilding(); e != nil {
|
||||
return e
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user