mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
sc2: Fixed sc2 client's /received command breaking after PR 1933 merged (#3497)
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user