Add character levels and permanent player titles
This commit is contained in:
@@ -57,6 +57,8 @@ type Balance struct {
|
||||
StartingKit map[string]int64 `yaml:"startingKit"`
|
||||
Recipes map[string]Recipe `yaml:"recipes"`
|
||||
BandageHealing float64 `yaml:"bandageHealing"`
|
||||
Progression *Progression `yaml:"progression"`
|
||||
Titles []Title `yaml:"titles"`
|
||||
}
|
||||
|
||||
func Load() (Balance, error) { return Parse(balance) }
|
||||
@@ -70,6 +72,9 @@ func Parse(data []byte) (Balance, error) {
|
||||
return b, b.Validate()
|
||||
}
|
||||
func (b Balance) Validate() error {
|
||||
if err := b.validateProgression(); err != nil {
|
||||
return err
|
||||
}
|
||||
v := reflect.ValueOf(b)
|
||||
for i := 0; i < v.NumField(); i++ {
|
||||
f := v.Field(i)
|
||||
|
||||
Reference in New Issue
Block a user