Ejemplo n.º 1
0
def _parse_formation(reader: ReplayReader) -> TYPE_FORMATION:
    formation = reader.read_int()
    if formation != -1:
        w = reader.read_float()
        position = _read_vector(reader)
        scale = reader.read_float()
        return {"w": w, "position": position, "scale": scale}
    return None
Ejemplo n.º 2
0
def command_set_command_cells(
        reader: ReplayReader) -> Dict[str, Union[str, int, TYPE_LUA]]:
    command_id = reader.read_uint()
    cells = reader.read_lua()
    if cells:
        reader.read(1)
    vector = (reader.read_float(), reader.read_float(), reader.read_float())
    return {
        "type": "set_command_cells",
        "command_id": command_id,
        "cells": cells,
        "vector": vector
    }
Ejemplo n.º 3
0
def _read_vector(reader: ReplayReader) -> TYPE_VECTOR:
    return reader.read_float(), reader.read_float(), reader.read_float()