New steam arguments

This commit is contained in:
Gregory Brzezinski 2022-11-03 23:12:26 +03:00
parent 4e446adefc
commit d645cbc860
3 changed files with 23 additions and 8 deletions

View File

@ -3,7 +3,12 @@ package gameUtils
var garrysmodGame = SteamGame{
GameId: "garrysmod",
SteamId: "4000",
Args: []string{},
Args: []Argument{
Argument{
Body: "+connect",
Value: "127.0.0.1:27015",
},
},
Platforms: map[string]bool{
"linux": true,
"windows": true,
@ -19,7 +24,7 @@ var openarena = SteamGame{
GameId: "openarena",
SteamId: "",
//Executable: "/usr/games/openarena",
Args: []string{},
//Args: []string{},
Assets: GameInterfaceAssets{
Title: "Open Arena",
Icon: "icon.png",
@ -30,7 +35,7 @@ var openarena = SteamGame{
var minecraft = SteamGame{
GameId: "minecraft",
SteamId: "",
Args: []string{},
//Args: []string{},
Assets: GameInterfaceAssets{
Title: "Minecraft",
Icon: "icon.png",

View File

@ -1,11 +1,12 @@
package gameUtils
type SteamGame struct {
GameId string
SteamId string
Args []string
Assets GameInterfaceAssets
Platforms map[string]bool
GameId string
SteamId string
Args []Argument
OptionalArgs []Argument
Assets GameInterfaceAssets
Platforms map[string]bool
}
type GameInterfaceAssets struct {
@ -24,3 +25,8 @@ type JSGameInterface struct {
Icon string `json:"icon"`
Description string `json:"description"`
}
type Argument struct {
Body string `json:"body"`
Value string `json:"value"`
}

View File

@ -29,3 +29,7 @@ func GetJSGameInterface(game SteamGame) JSGameInterface {
}
return newInterface
}
func ArgToStr(a Argument) string {
return a.Body + " " + a.Value
}