MultiServer: add !collect and collect_mode

CommonClient: make missing and checked location lookups faster
FactorioClient: implement reverse grant technologies for collect/forfeit/coop
This commit is contained in:
Fabian Dill
2021-10-18 22:58:29 +02:00
parent 66e198cbb6
commit 34eba2655e
9 changed files with 116 additions and 21 deletions

View File

@@ -99,9 +99,9 @@ class FactorioContext(CommonContext):
f"{text}")
def on_package(self, cmd: str, args: dict):
if cmd == "Connected":
if cmd in {"Connected", "RoomUpdate"}:
# catch up sync anything that is already cleared.
if args["checked_locations"]:
if "checked_locations" in args and args["checked_locations"]:
self.rcon_client.send_commands({item_name: f'/ap-get-technology ap-{item_name}-\t-1' for
item_name in args["checked_locations"]})