Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ A GUI for [RLBot](https://rlbot.org) v5 written in go and powered by [wails](htt
2. Run `wails3 dev`

## Installing build dependencies

1. Install the [wails v3-alpha cli](https://v3alpha.wails.io/getting-started/installation/)
2. Install [node](https://nodejs.org/en) and [pnpm](https://pnpm.io/installation)
3. Run `cd frontend` and then `pnpm i` (you probably want to `cd ../` after)
Expand Down
27 changes: 17 additions & 10 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"os"
"path/filepath"
"strings"

"github.com/ncruces/zenity"
rlbot "github.com/swz-git/go-interface"
Expand Down Expand Up @@ -39,14 +38,20 @@ func (a *App) startup(ctx context.Context) {
// return fmt.Sprintf("Hello %s, It's show time!", name)
// }

func recursiveFileSearch(root, targetName string) ([]string, error) {
func recursiveFileSearch(root, pattern string) ([]string, error) {
var matches []string
err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if strings.HasSuffix(info.Name(), targetName) {
matches = append(matches, path)
if !info.IsDir() && (info.Name() == "bot.toml" || filepath.Ext(info.Name()) == ".bot.toml") {
matched, err := filepath.Match(pattern, info.Name())
if err != nil {
return err
}
if matched {
matches = append(matches, path)
}
}
return nil
})
Expand Down Expand Up @@ -75,7 +80,7 @@ type StartMatchOptions struct {
MutatorSettings flat.MutatorSettingsT `json:"mutatorSettings"`
ExtraOptions ExtraOptions `json:"extraOptions"`
Launcher string `json:"launcher"`
GamePath string `json:"gamePath"`
LauncherArg string `json:"launcherArg"`
}

func (a *App) StartMatch(options StartMatchOptions) Result {
Expand Down Expand Up @@ -115,9 +120,11 @@ func (a *App) StartMatch(options StartMatchOptions) Result {
launcher = flat.LauncherEpic
case "custom":
launcher = flat.LauncherCustom
case "noLaunch":
launcher = flat.LauncherNoLaunch
default:
println("No launcher chosen, defaulting to steam")
launcher = flat.LauncherSteam
println("No launcher chosen, defaulting to NoLaunch")
launcher = flat.LauncherNoLaunch
}

var playerConfigs []*flat.PlayerConfigurationT
Expand All @@ -132,19 +139,19 @@ func (a *App) StartMatch(options StartMatchOptions) Result {

println(playerConfigs)

conn.SendPacket(&flat.MatchSettingsT{
conn.SendPacket(&flat.MatchConfigurationT{
AutoStartBots: true,
GameMapUpk: options.Map,
PlayerConfigurations: playerConfigs,
GameMode: gameMode,
MutatorSettings: &options.MutatorSettings,
Mutators: &options.MutatorSettings,
EnableRendering: options.ExtraOptions.EnableRendering,
EnableStateSetting: options.ExtraOptions.EnableStateSetting,
InstantStart: options.ExtraOptions.InstantStart,
SkipReplays: options.ExtraOptions.SkipReplays,
AutoSaveReplay: options.ExtraOptions.AutoSaveReplay,
Launcher: launcher,
GamePath: options.GamePath,
LauncherArg: options.LauncherArg,
ExistingMatchBehavior: flat.ExistingMatchBehavior(options.ExtraOptions.ExistingMatchBehavior),
})

Expand Down
6 changes: 3 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
},
"dependencies": {
"@wailsio/runtime": "3.0.0-alpha.27",
"svelte": "^5",
"svelte": "^5.20.5",
"svelte-5-french-toast": "2.0.1",
"svelte-dnd-action": "^0.9.52"
"svelte-dnd-action": "^0.9.57"
},
"devDependencies": {
"@rsbuild/core": "1.0.5",
"@rsbuild/plugin-svelte": "1.0.5",
"oxlint": "^0.13.2",
"typescript": "^5.5.2"
"typescript": "^5.7.3"
}
}
118 changes: 62 additions & 56 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions frontend/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<main>
<div class="navbar">
<div>
<!-- svelte-ignore a11y_click_events_have_key_events -->
<!-- svelte-ignore a11y_no_static_element_interactions -->
<!-- svelte-ignore a11y_missing_attribute -->
<a
onclick={() => {
activePage = "home";
Expand Down Expand Up @@ -63,11 +66,7 @@
<div
class={activePage == "rhost" ? "pageContainer" : "pageContainer hidden"}
>
<RocketHost
onBack={() => {
activePage = "home";
}}
/>
<RocketHost />
</div>
</main>

Expand Down
Loading