MultiServer: Flag for saving on datastore, create_as_hint scout and client state change
This commit is contained in:
parent
67a22b8b43
commit
bbf8546867
|
@ -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':
|
||||
|
@ -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:
|
||||
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue