mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
MultiServer: Flag for saving on datastore, create_as_hint scout and client state change
This commit is contained in:
@@ -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))
|
hints.extend(collect_hint_location_id(ctx, client.team, client.slot, location))
|
||||||
locs.append(NetworkItem(target_item, location, target_player, flags))
|
locs.append(NetworkItem(target_item, location, target_player, flags))
|
||||||
ctx.notify_hints(client.team, hints, only_new=create_as_hint == 2)
|
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}])
|
await ctx.send_msgs(client, [{'cmd': 'LocationInfo', 'locations': locs}])
|
||||||
|
|
||||||
elif cmd == 'StatusUpdate':
|
elif cmd == 'StatusUpdate':
|
||||||
@@ -1800,6 +1802,7 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict):
|
|||||||
targets.add(client)
|
targets.add(client)
|
||||||
if targets:
|
if targets:
|
||||||
ctx.broadcast(targets, [args])
|
ctx.broadcast(targets, [args])
|
||||||
|
ctx.save()
|
||||||
|
|
||||||
elif cmd == "SetNotify":
|
elif cmd == "SetNotify":
|
||||||
if "keys" not in args or type(args["keys"]) != list:
|
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.on_goal_achieved(client)
|
||||||
|
|
||||||
ctx.client_game_state[client.team, client.slot] = new_status
|
ctx.client_game_state[client.team, client.slot] = new_status
|
||||||
|
ctx.save()
|
||||||
|
|
||||||
|
|
||||||
class ServerCommandProcessor(CommonCommandProcessor):
|
class ServerCommandProcessor(CommonCommandProcessor):
|
||||||
|
Reference in New Issue
Block a user