New steam arguments
This commit is contained in:
parent
4e446adefc
commit
d645cbc860
@ -3,7 +3,12 @@ package gameUtils
|
|||||||
var garrysmodGame = SteamGame{
|
var garrysmodGame = SteamGame{
|
||||||
GameId: "garrysmod",
|
GameId: "garrysmod",
|
||||||
SteamId: "4000",
|
SteamId: "4000",
|
||||||
Args: []string{},
|
Args: []Argument{
|
||||||
|
Argument{
|
||||||
|
Body: "+connect",
|
||||||
|
Value: "127.0.0.1:27015",
|
||||||
|
},
|
||||||
|
},
|
||||||
Platforms: map[string]bool{
|
Platforms: map[string]bool{
|
||||||
"linux": true,
|
"linux": true,
|
||||||
"windows": true,
|
"windows": true,
|
||||||
@ -19,7 +24,7 @@ var openarena = SteamGame{
|
|||||||
GameId: "openarena",
|
GameId: "openarena",
|
||||||
SteamId: "",
|
SteamId: "",
|
||||||
//Executable: "/usr/games/openarena",
|
//Executable: "/usr/games/openarena",
|
||||||
Args: []string{},
|
//Args: []string{},
|
||||||
Assets: GameInterfaceAssets{
|
Assets: GameInterfaceAssets{
|
||||||
Title: "Open Arena",
|
Title: "Open Arena",
|
||||||
Icon: "icon.png",
|
Icon: "icon.png",
|
||||||
@ -30,7 +35,7 @@ var openarena = SteamGame{
|
|||||||
var minecraft = SteamGame{
|
var minecraft = SteamGame{
|
||||||
GameId: "minecraft",
|
GameId: "minecraft",
|
||||||
SteamId: "",
|
SteamId: "",
|
||||||
Args: []string{},
|
//Args: []string{},
|
||||||
Assets: GameInterfaceAssets{
|
Assets: GameInterfaceAssets{
|
||||||
Title: "Minecraft",
|
Title: "Minecraft",
|
||||||
Icon: "icon.png",
|
Icon: "icon.png",
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
package gameUtils
|
package gameUtils
|
||||||
|
|
||||||
type SteamGame struct {
|
type SteamGame struct {
|
||||||
GameId string
|
GameId string
|
||||||
SteamId string
|
SteamId string
|
||||||
Args []string
|
Args []Argument
|
||||||
Assets GameInterfaceAssets
|
OptionalArgs []Argument
|
||||||
Platforms map[string]bool
|
Assets GameInterfaceAssets
|
||||||
|
Platforms map[string]bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type GameInterfaceAssets struct {
|
type GameInterfaceAssets struct {
|
||||||
@ -24,3 +25,8 @@ type JSGameInterface struct {
|
|||||||
Icon string `json:"icon"`
|
Icon string `json:"icon"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Argument struct {
|
||||||
|
Body string `json:"body"`
|
||||||
|
Value string `json:"value"`
|
||||||
|
}
|
||||||
|
@ -29,3 +29,7 @@ func GetJSGameInterface(game SteamGame) JSGameInterface {
|
|||||||
}
|
}
|
||||||
return newInterface
|
return newInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ArgToStr(a Argument) string {
|
||||||
|
return a.Body + " " + a.Value
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user