Add MakePackWithSchema
This commit is contained in:
parent
55a3754a23
commit
c5d833db82
1 changed files with 6 additions and 0 deletions
6
pack.go
6
pack.go
|
@ -34,8 +34,14 @@ type AlternateProvider struct {
|
|||
}
|
||||
|
||||
// MakePack makes a booster pack from a given set
|
||||
// It's a shortcut to `MakePackWithSchema(set.PackSchema())`
|
||||
func MakePack(set Set) Pack {
|
||||
schema := set.PackSchema()
|
||||
return MakePackWithSchema(schema)
|
||||
}
|
||||
|
||||
// MakePackWithSchema makes a booster pack from a given schema
|
||||
func MakePackWithSchema(schema PackSchema) Pack {
|
||||
pack := make(Pack, 0)
|
||||
for _, slot := range schema.Slots {
|
||||
// Default provider
|
||||
|
|
Loading…
Reference in a new issue