Skip to content

Commit

Permalink
MultiServer: Flag for saving on datastore, create_as_hint scout and c…
Browse files Browse the repository at this point in the history
…lient state change
  • Loading branch information
Berserker66 committed Apr 8, 2023
1 parent 67a22b8 commit bbf8546
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MultiServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1742,6 +1742,8 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict):
hints.extend(collect_hint_location_id(ctx, client.team, client.slot, location))
locs.append(NetworkItem(target_item, location, target_player, flags))
ctx.notify_hints(client.team, hints, only_new=create_as_hint == 2)
if locs and create_as_hint:
ctx.save()
await ctx.send_msgs(client, [{'cmd': 'LocationInfo', 'locations': locs}])

elif cmd == 'StatusUpdate':
Expand Down Expand Up @@ -1800,6 +1802,7 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict):
targets.add(client)
if targets:
ctx.broadcast(targets, [args])
ctx.save()

elif cmd == "SetNotify":
if "keys" not in args or type(args["keys"]) != list:
Expand All @@ -1817,6 +1820,7 @@ def update_client_status(ctx: Context, client: Client, new_status: ClientStatus)
ctx.on_goal_achieved(client)

ctx.client_game_state[client.team, client.slot] = new_status
ctx.save()


class ServerCommandProcessor(CommonCommandProcessor):
Expand Down

0 comments on commit bbf8546

Please sign in to comment.