Pass through optional-disabled on CF import (fixes #93)

This commit is contained in:
comp500
2022-03-07 18:22:29 +00:00
parent 7c387f6c83
commit 3fb350f244
5 changed files with 22 additions and 10 deletions

View File

@@ -23,11 +23,7 @@ type Mod struct {
Update map[string]map[string]interface{} `toml:"update"`
updateData map[string]interface{}
Option *struct {
Optional bool `toml:"optional"`
Description string `toml:"description,omitempty"`
Default bool `toml:"default,omitempty"`
} `toml:"option,omitempty"`
Option *ModOption `toml:"option,omitempty"`
}
// ModDownload specifies how to download the mod file
@@ -37,6 +33,13 @@ type ModDownload struct {
Hash string `toml:"hash"`
}
// ModOption specifies optional metadata for this mod file
type ModOption struct {
Optional bool `toml:"optional"`
Description string `toml:"description,omitempty"`
Default bool `toml:"default,omitempty"`
}
// The three possible values of Side (the side that the mod is on) are "server", "client", and "both".
//noinspection GoUnusedConst
const (