Skip to content

Commit

Permalink
Update Protobuf and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
olijeffers0n committed Aug 8, 2023
1 parent b37fbaf commit 566d1e8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
3 changes: 3 additions & 0 deletions rustplus/api/remote/rustplus_proto/rustplus.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion rustplus/api/remote/rustws.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ async def connect(
)
address += f"?v={str(self.magic_value)}"
self.connection = await connect(
address, close_timeout=0, ping_interval=None, max_size=1_000_000_000
address,
close_timeout=0,
ping_interval=None,
max_size=1_000_000_000,
)
self.connected_time = time.time()

Expand Down
19 changes: 18 additions & 1 deletion rustplus/api/structures/rust_team_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def __init__(self, data: AppTeamInfoNote) -> None:
self._type: int = data.type
self._x: float = data.x
self._y: float = data.y
self._icon: int = data.icon
self._colour_index: int = data.colour_index
self._label: str = data.label

@property
def type(self) -> int:
Expand All @@ -77,8 +80,22 @@ def x(self) -> float:
def y(self) -> float:
return self._y

@property
def icon(self) -> int:
return self._icon

@property
def colour_index(self) -> int:
return self._colour_index

@property
def label(self) -> str:
return self._label

def __str__(self) -> str:
return "RustTeamNote[type={}, x={}, y={}]".format(self._type, self._x, self._y)
return "RustTeamNote[type={}, x={}, y={}, icon={}, colour_index={}, label={}]".format(
self._type, self._x, self._y, self._icon, self._colour_index, self._label
)


class RustTeamInfo:
Expand Down

0 comments on commit 566d1e8

Please sign in to comment.