From 2007549e01dff6a20b8a05806bc5a6c993db258e Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Mon, 8 Nov 2021 19:13:13 +0100 Subject: [PATCH] MultiServer: move PrintJSONMessagePart's found to PrintJSON --- NetUtils.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/NetUtils.py b/NetUtils.py index 20c78528..d4f90b2a 100644 --- a/NetUtils.py +++ b/NetUtils.py @@ -13,8 +13,6 @@ class JSONMessagePart(typing.TypedDict, total=False): # optional type: str color: str - # mainly for items, optional - found: bool # owning player for location/item player: int @@ -274,7 +272,7 @@ class Hint(typing.NamedTuple): add_json_text(parts, "[Hint]: ") add_json_text(parts, self.receiving_player, type="player_id") add_json_text(parts, "'s ") - add_json_item(parts, self.item, self.receiving_player, found=self.found) + add_json_item(parts, self.item, self.receiving_player) add_json_text(parts, " is at ") add_json_location(parts, self.location, self.finding_player) add_json_text(parts, " in ") @@ -291,7 +289,8 @@ class Hint(typing.NamedTuple): return {"cmd": "PrintJSON", "data": parts, "type": "Hint", "receiving": self.receiving_player, - "item": NetworkItem(self.item, self.location, self.finding_player)} + "item": NetworkItem(self.item, self.location, self.finding_player), + "found": self.found} @property def local(self):