mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Wargroove: Fixed WargrooveClient retaining victory and location information and minor doc fix (#2464)
This commit is contained in:
@@ -113,6 +113,9 @@ class WargrooveContext(CommonContext):
|
|||||||
async def connection_closed(self):
|
async def connection_closed(self):
|
||||||
await super(WargrooveContext, self).connection_closed()
|
await super(WargrooveContext, self).connection_closed()
|
||||||
self.remove_communication_files()
|
self.remove_communication_files()
|
||||||
|
self.checked_locations.clear()
|
||||||
|
self.server_locations.clear()
|
||||||
|
self.finished_game = False
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def endpoints(self):
|
def endpoints(self):
|
||||||
@@ -124,6 +127,9 @@ class WargrooveContext(CommonContext):
|
|||||||
async def shutdown(self):
|
async def shutdown(self):
|
||||||
await super(WargrooveContext, self).shutdown()
|
await super(WargrooveContext, self).shutdown()
|
||||||
self.remove_communication_files()
|
self.remove_communication_files()
|
||||||
|
self.checked_locations.clear()
|
||||||
|
self.server_locations.clear()
|
||||||
|
self.finished_game = False
|
||||||
|
|
||||||
def remove_communication_files(self):
|
def remove_communication_files(self):
|
||||||
for root, dirs, files in os.walk(self.game_communication_path):
|
for root, dirs, files in os.walk(self.game_communication_path):
|
||||||
@@ -402,8 +408,10 @@ async def game_watcher(ctx: WargrooveContext):
|
|||||||
if file.find("send") > -1:
|
if file.find("send") > -1:
|
||||||
st = file.split("send", -1)[1]
|
st = file.split("send", -1)[1]
|
||||||
sending = sending+[(int(st))]
|
sending = sending+[(int(st))]
|
||||||
|
os.remove(os.path.join(ctx.game_communication_path, file))
|
||||||
if file.find("victory") > -1:
|
if file.find("victory") > -1:
|
||||||
victory = True
|
victory = True
|
||||||
|
os.remove(os.path.join(ctx.game_communication_path, file))
|
||||||
ctx.locations_checked = sending
|
ctx.locations_checked = sending
|
||||||
message = [{"cmd": 'LocationChecks', "locations": sending}]
|
message = [{"cmd": 'LocationChecks', "locations": sending}]
|
||||||
await ctx.send_msgs(message)
|
await ctx.send_msgs(message)
|
||||||
|
@@ -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).
|
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.
|
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
|
- 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`.
|
- Paste the path in between the quotes next to `root_directory:` in the `host.yaml`.
|
||||||
- You may have to replace all single \\ with \\\\.
|
- You may have to replace all single \\ with \\\\.
|
||||||
4. Start the Wargroove client.
|
4. Start the Wargroove client.
|
||||||
|
Reference in New Issue
Block a user