From 84a6d50ae7453f87af3dcc67a6cda32ea4767c9c Mon Sep 17 00:00:00 2001 From: Phaneros <31861583+MatthewMarinets@users.noreply.github.com> Date: Sun, 9 Jun 2024 07:55:05 -0700 Subject: [PATCH] sc2: Fixed sc2 client's /received command breaking after PR 1933 merged (#3497) --- worlds/sc2/Client.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/worlds/sc2/Client.py b/worlds/sc2/Client.py index c97902fb..e6696b78 100644 --- a/worlds/sc2/Client.py +++ b/worlds/sc2/Client.py @@ -107,10 +107,10 @@ class ColouredMessage: def coloured(self, text: str, colour: str) -> 'ColouredMessage': add_json_text(self.parts, text, type="color", color=colour) return self - def location(self, location_id: int, player_id: int = 0) -> 'ColouredMessage': + def location(self, location_id: int, player_id: int) -> 'ColouredMessage': add_json_location(self.parts, location_id, player_id) return self - def item(self, item_id: int, player_id: int = 0, flags: int = 0) -> 'ColouredMessage': + def item(self, item_id: int, player_id: int, flags: int = 0) -> 'ColouredMessage': add_json_item(self.parts, item_id, player_id, flags) return self def player(self, player_id: int) -> 'ColouredMessage': @@ -256,7 +256,7 @@ class StarcraftClientProcessor(ClientCommandProcessor): for item in received_items_of_this_type: print_faction_title() has_printed_faction_title = True - (ColouredMessage('* ').item(item.item, flags=item.flags) + (ColouredMessage('* ').item(item.item, self.ctx.slot, flags=item.flags) (" from ").location(item.location, self.ctx.slot) (" by ").player(item.player) ).send(self.ctx) @@ -277,7 +277,7 @@ class StarcraftClientProcessor(ClientCommandProcessor): received_items_of_this_type = items_received.get(child_item, []) for item in received_items_of_this_type: filter_match_count += len(received_items_of_this_type) - (ColouredMessage(' * ').item(item.item, flags=item.flags) + (ColouredMessage(' * ').item(item.item, self.ctx.slot, flags=item.flags) (" from ").location(item.location, self.ctx.slot) (" by ").player(item.player) ).send(self.ctx)