diff --git a/core/mod.go b/core/mod.go index 338042e..2b7a207 100644 --- a/core/mod.go +++ b/core/mod.go @@ -45,12 +45,12 @@ type ModOption struct { 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 +// The four possible values of Side (the side that the mod is on) are "server", "client", "both", and "" (equivalent to "both") const ( ServerSide = "server" ClientSide = "client" UniversalSide = "both" + EmptySide = "" ) // LoadMod attempts to load a mod file from a path diff --git a/curseforge/export.go b/curseforge/export.go index e09cbbe..f093d56 100644 --- a/curseforge/export.go +++ b/curseforge/export.go @@ -72,7 +72,7 @@ var exportCmd = &cobra.Command{ // Filter mods by side // TODO: opt-in optional disabled filtering? for _, mod := range mods { - if len(mod.Side) == 0 || mod.Side == side || mod.Side == "both" || side == "both" { + if mod.Side == side || mod.Side == core.EmptySide || mod.Side == core.UniversalSide || side == core.UniversalSide { mods[i] = mod i++ } diff --git a/modrinth/export.go b/modrinth/export.go index 9bd2433..47f6041 100644 --- a/modrinth/export.go +++ b/modrinth/export.go @@ -138,7 +138,7 @@ var exportCmd = &cobra.Command{ envInstalled = "required" } var clientEnv, serverEnv string - if dl.Mod.Side == core.UniversalSide { + if dl.Mod.Side == core.UniversalSide || dl.Mod.Side == core.EmptySide { clientEnv = envInstalled serverEnv = envInstalled } else if dl.Mod.Side == core.ClientSide {