Small adjustments
This commit is contained in:
parent
c14a150795
commit
250099f5fd
|
@ -1111,7 +1111,7 @@ class Location():
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hint_text(self):
|
def hint_text(self):
|
||||||
return getattr(self, "_hint_text", self.name)
|
return getattr(self, "_hint_text", self.name.replace("_", " ").replace("-", " "))
|
||||||
|
|
||||||
class Item():
|
class Item():
|
||||||
location: Optional[Location] = None
|
location: Optional[Location] = None
|
||||||
|
|
|
@ -356,7 +356,7 @@ async def process_server_cmd(ctx: CommonContext, args: dict):
|
||||||
if msgs:
|
if msgs:
|
||||||
await ctx.send_msgs(msgs)
|
await ctx.send_msgs(msgs)
|
||||||
if ctx.finished_game:
|
if ctx.finished_game:
|
||||||
await ctx.send_msgs([{"cmd": "StatusUpdate", "status": CLientStatus.CLIENT_GOAL}])
|
await ctx.send_msgs([{"cmd": "StatusUpdate", "status": ClientStatus.CLIENT_GOAL}])
|
||||||
|
|
||||||
# Get the server side view of missing as of time of connecting.
|
# Get the server side view of missing as of time of connecting.
|
||||||
# This list is used to only send to the server what is reported as ACTUALLY Missing.
|
# This list is used to only send to the server what is reported as ACTUALLY Missing.
|
||||||
|
|
|
@ -525,10 +525,15 @@ def format_hint(ctx: Context, team: int, hint: NetUtils.Hint) -> str:
|
||||||
def json_format_send_event(net_item: NetworkItem, receiving_player: int):
|
def json_format_send_event(net_item: NetworkItem, receiving_player: int):
|
||||||
parts = []
|
parts = []
|
||||||
NetUtils.add_json_text(parts, net_item.player, type=NetUtils.JSONTypes.player_id)
|
NetUtils.add_json_text(parts, net_item.player, type=NetUtils.JSONTypes.player_id)
|
||||||
|
if net_item.player == receiving_player:
|
||||||
|
NetUtils.add_json_text(parts, " found their ")
|
||||||
|
NetUtils.add_json_text(parts, net_item.item, type=NetUtils.JSONTypes.item_id)
|
||||||
|
else:
|
||||||
NetUtils.add_json_text(parts, " sent ")
|
NetUtils.add_json_text(parts, " sent ")
|
||||||
NetUtils.add_json_text(parts, net_item.item, type=NetUtils.JSONTypes.item_id)
|
NetUtils.add_json_text(parts, net_item.item, type=NetUtils.JSONTypes.item_id)
|
||||||
NetUtils.add_json_text(parts, " to ")
|
NetUtils.add_json_text(parts, " to ")
|
||||||
NetUtils.add_json_text(parts, receiving_player, type=NetUtils.JSONTypes.player_id)
|
NetUtils.add_json_text(parts, receiving_player, type=NetUtils.JSONTypes.player_id)
|
||||||
|
|
||||||
NetUtils.add_json_text(parts, " (")
|
NetUtils.add_json_text(parts, " (")
|
||||||
NetUtils.add_json_text(parts, net_item.location, type=NetUtils.JSONTypes.location_id)
|
NetUtils.add_json_text(parts, net_item.location, type=NetUtils.JSONTypes.location_id)
|
||||||
NetUtils.add_json_text(parts, ")")
|
NetUtils.add_json_text(parts, ")")
|
||||||
|
|
Loading…
Reference in New Issue