Commit some stuff

This commit is contained in:
comp500
2019-04-25 18:10:23 +01:00
parent a531e36713
commit d6b55b8032
5 changed files with 98 additions and 20 deletions

View File

@@ -1,21 +1,21 @@
package core
import "github.com/BurntSushi/toml"
// Mod stores metadata about a mod. This is written to a TOML file for each mod.
type Mod struct {
metaFilename string
Name string `toml:"name"`
FileName string `toml:"filename"`
Side string `toml:"side"`
Optional bool `toml:"optional"`
Download struct {
metaFilename string // The filename for the metadata file, used as an ID
Name string `toml:"name"`
FileName string `toml:"filename"`
Side string `toml:"side,omitempty"`
Optional bool `toml:"optional,omitempty"`
Download struct {
URL string `toml:"url"`
HashFormat string `toml:"hash-format"`
Hash string `toml:"hash"`
} `toml:"download"`
Update map[string]toml.Primitive
Update map[string]toml.Primitive `toml:"update"`
}
// The three possible values of Side (the side that the mod is on) are "server", "client", and "both".
const (
ServerSide = "server"