Skip to content

Commit

Permalink
Network: remove "SlotAlreadyTaken" from docs and clients, as it was r…
Browse files Browse the repository at this point in the history
…emoved from the server in 0.2
  • Loading branch information
Berserker66 authored and KonoTyran committed May 25, 2022
1 parent c661da5 commit e8be80c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
10 changes: 5 additions & 5 deletions CommonClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ async def send_death(self, death_text: str = ""):
}
}])

async def update_death_link(self, death_link):
async def update_death_link(self, death_link: bool):
old_tags = self.tags.copy()
if death_link:
self.tags.add("DeathLink")
Expand Down Expand Up @@ -496,8 +496,6 @@ async def process_server_cmd(ctx: CommonContext, args: dict):
ctx.event_invalid_slot()
elif 'InvalidGame' in errors:
ctx.event_invalid_game()
elif 'SlotAlreadyTaken' in errors:
raise Exception('Player slot already in use for that team')
elif 'IncompatibleVersion' in errors:
raise Exception('Server reported your client version as incompatible')
elif 'InvalidItemsHandling' in errors:
Expand Down Expand Up @@ -670,8 +668,10 @@ async def main(args):
if args.url:
url = urllib.parse.urlparse(args.url)
args.connect = url.netloc
args.name = urllib.parse.unquote(url.username)
args.password = urllib.parse.unquote(url.password)
if url.username:
args.name = urllib.parse.unquote(url.username)
if url.password:
args.password = urllib.parse.unquote(url.password)

colorama.init()

Expand Down
1 change: 0 additions & 1 deletion FactorioClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import string
import copy
import subprocess
import sys
import time
import random

Expand Down
3 changes: 1 addition & 2 deletions docs/network protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,10 @@ Sent to clients when the server refuses connection. This is sent during the init
#### Arguments
| Name | Type | Notes |
| ---- | ---- | ----- |
| errors | list\[str\] | Optional. When provided, should contain any one of: `InvalidSlot`, `InvalidGame`, `SlotAlreadyTaken`, `IncompatibleVersion`, `InvalidPassword`, or `InvalidItemsHandling`. |
| errors | list\[str\] | Optional. When provided, should contain any one of: `InvalidSlot`, `InvalidGame`, `IncompatibleVersion`, `InvalidPassword`, or `InvalidItemsHandling`. |

InvalidSlot indicates that the sent 'name' field did not match any auth entry on the server.
InvalidGame indicates that a correctly named slot was found, but the game for it mismatched.
SlotAlreadyTaken indicates a connection with a different uuid is already established.
IncompatibleVersion indicates a version mismatch.
InvalidPassword indicates the wrong, or no password when it was required, was sent.
InvalidItemsHandling indicates a wrong value type or flag combination was sent.
Expand Down
1 change: 0 additions & 1 deletion worlds/meritous/docs/setup_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ More in-depth information about the game can be found in the game's help file, a

- `Disconnected`: If the game does not reconnect automatically, you may need to save, quit, and reload the game to reconnect. Keep in mind that the game does not auto-save, and it is only possible to save the game at Save Tiles.
- `InvalidSlot`, `InvalidGame`: Make sure the `slotname` in `meritous-ap.json` matches the name provided in your Meritous YAML file.
- `SlotAlreadyTaken`: Make sure Meritous Gaiden is not already running and connected to the server.
- `IncompatibleVersion`: Make sure Meritous Gaiden has been updated to the latest version.
- `InvalidPassword`: Make sure the `password` in `meritous-ap.json` matches the password for your game. If there is no password, either set this to `null` (no quotes) or omit/remove it completely.
- `InvalidItemsHandling`: This is a bug and shouldn't happen if you downloaded a precompiled copy of the game. If you downloaded a precompiled copy, please let KewlioMZX know over GitHub or the AP Discord.

0 comments on commit e8be80c

Please sign in to comment.