MultiServer: add time to RoomInfo

This commit is contained in:
Fabian Dill 2021-11-07 11:37:50 +01:00
parent 00d62fc23f
commit 2b124aaff4
2 changed files with 5 additions and 2 deletions

View File

@ -14,9 +14,9 @@ import threading
import random
import pickle
import itertools
import time
import ModuleUpdate
import NetUtils
ModuleUpdate.update()
@ -26,6 +26,7 @@ import prompt_toolkit
from prompt_toolkit.patch_stdout import patch_stdout
from fuzzywuzzy import process as fuzzy_process
import NetUtils
from worlds.AutoWorld import AutoWorldRegister
proxy_worlds = {name: world(None, 0) for name, world in AutoWorldRegister.world_types.items()}
@ -506,7 +507,8 @@ async def on_client_connected(ctx: Context, client: Client):
'datapackage_version': network_data_package["version"],
'datapackage_versions': {game: game_data["version"] for game, game_data
in network_data_package["games"].items()},
'seed_name': ctx.seed_name
'seed_name': ctx.seed_name,
'time': time.time(),
}])

View File

@ -61,6 +61,7 @@ Sent to clients when they connect to an Archipelago server.
| datapackage_version | int | Data version of the [data package](#Data-Package-Contents) the server will send. Used to update the client's (optional) local cache. |
| datapackage_versions | dict\[str, int\] | Data versions of the individual games' data packages the server will send. |
| seed_name | str | uniquely identifying name of this generation |
| time | float | Unix time stamp of "now". Send for time synchronization if wanted for things like the DeathLink Bounce. |
#### forfeit
Dictates what is allowed when it comes to a player forfeiting their run. A forfeit is an action which distributes the rest of the items in a player's run to those other players awaiting them.