add get arguments

This commit is contained in:
cyber-dream 2023-01-30 09:23:17 +03:00
parent 5c7a5256bd
commit 877fb8ddf6
3 changed files with 20 additions and 0 deletions

View File

@ -25,3 +25,7 @@ func (game MinecraftGame) GetLaunchArgs() []string {
func (game MinecraftGame) GetType() string { func (game MinecraftGame) GetType() string {
return gameType return gameType
} }
func (game MinecraftGame) GetArguments() skirdagame.Arguments {
return skirdagame.Arguments{}
}

View File

@ -7,6 +7,7 @@ type SkirdaGame interface {
GetUIAssets() GameUIAssets GetUIAssets() GameUIAssets
GetLaunchArgs() []string GetLaunchArgs() []string
GetType() string GetType() string
GetArguments() Arguments
} }
type GameUIAssets struct { type GameUIAssets struct {
@ -30,3 +31,13 @@ func (games SkirdaGames) FindGameByID(gameId string) (SkirdaGame, error) {
} }
return nil, errors.New("") return nil, errors.New("")
} }
type Argument struct {
Body string
Value string
}
type Arguments struct {
Required []Argument
Optional []Argument
}

View File

@ -8,6 +8,7 @@ type SteamGame struct {
SkirdaGameId string SkirdaGameId string
SteamId string SteamId string
Assets skirdagame.GameUIAssets Assets skirdagame.GameUIAssets
Arguments skirdagame.Arguments
// CurrentVersion string // CurrentVersion string
} }
@ -26,3 +27,7 @@ func (game SteamGame) GetLaunchArgs() []string {
func (game SteamGame) GetType() string { func (game SteamGame) GetType() string {
return gameType return gameType
} }
func (game SteamGame) GetArguments() skirdagame.Arguments {
return game.Arguments
}