mirror of
https://github.com/packwiz/packwiz.git
synced 2025-11-19 01:24:32 +01:00
Improve optional stuff, add preserve flag
This commit is contained in:
@@ -16,11 +16,16 @@ type Mod struct {
|
||||
Name string `toml:"name"`
|
||||
FileName string `toml:"filename"`
|
||||
Side string `toml:"side,omitempty"`
|
||||
Optional bool `toml:"optional,omitempty"`
|
||||
Download ModDownload `toml:"download"`
|
||||
// Update is a map of map of stuff, so you can store arbitrary values on string keys to define updating
|
||||
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"`
|
||||
}
|
||||
|
||||
// ModDownload specifies how to download the mod file
|
||||
@@ -95,4 +100,4 @@ func (m Mod) GetParsedUpdateData(updaterName string) (interface{}, bool) {
|
||||
// GetFilePath is a clumsy hack that I made because Mod already stores it's path anyway
|
||||
func (m Mod) GetFilePath() string {
|
||||
return m.metaFile
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user