Esempio n. 1
0
def globalStat(data: Data) -> dict:
    args = {
        "name": data.takeString(),
        "hidden": data.takeBool(),
        "main": data.takeBool()
    }

    if not args["hidden"]:
        for arg in ["min", "max", "value"]:
            args[arg] = data.takeNumeric(4, signed=True)

    return args
Esempio n. 2
0
def members(data: Data) -> dict:
    count = data.take()

    args = {"members": {}}
    for i in range(count):
        id = data.take()
        args["members"][id] = (data.takeString(), data.takeBool())

    return args