Skip to content

Commit

Permalink
Wargroove: Fixed WargrooveClient retaining victory and location infor…
Browse files Browse the repository at this point in the history
…mation during slot switching. Fixed Documentation wording around navigating steam menues.
  • Loading branch information
FlySniper committed Nov 14, 2023
1 parent 87d91ed commit 723faa0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions WargrooveClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ async def server_auth(self, password_requested: bool = False):
async def connection_closed(self):
await super(WargrooveContext, self).connection_closed()
self.remove_communication_files()
self.checked_locations.clear()
self.server_locations.clear()
self.finished_game = False

@property
def endpoints(self):
Expand All @@ -124,6 +127,9 @@ def endpoints(self):
async def shutdown(self):
await super(WargrooveContext, self).shutdown()
self.remove_communication_files()
self.checked_locations.clear()
self.server_locations.clear()
self.finished_game = False

def remove_communication_files(self):
for root, dirs, files in os.walk(self.game_communication_path):
Expand Down Expand Up @@ -402,8 +408,10 @@ async def game_watcher(ctx: WargrooveContext):
if file.find("send") > -1:
st = file.split("send", -1)[1]
sending = sending+[(int(st))]
os.remove(os.path.join(ctx.game_communication_path, file))
if file.find("victory") > -1:
victory = True
os.remove(os.path.join(ctx.game_communication_path, file))
ctx.locations_checked = sending
message = [{"cmd": 'LocationChecks', "locations": sending}]
await ctx.send_msgs(message)
Expand Down
2 changes: 1 addition & 1 deletion worlds/wargroove/docs/wargroove_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ is strongly recommended in case they become corrupted.
2. Open the `host.yaml` file in your favorite text editor (Notepad will work).
3. Put your Wargroove root directory in the `root_directory:` under the `wargroove_options:` section.
- The Wargroove root directory can be found by going to
`Steam->Right Click Wargroove->Properties->Local Files->Browse Local Files` and copying the path in the address bar.
`Steam->Right Click Wargroove->Properties->Installed Files->Browse` and copying the path in the address bar.
- Paste the path in between the quotes next to `root_directory:` in the `host.yaml`.
- You may have to replace all single \\ with \\\\.
4. Start the Wargroove client.
Expand Down

0 comments on commit 723faa0

Please sign in to comment.