Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
BattlefieldDuck committed Jan 22, 2024
1 parent d2ceaeb commit 3276422
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

autodoc_member_order = 'bysource'


# -- Options for HTML output -------------------------------------------------
Expand Down
20 changes: 11 additions & 9 deletions opengsq/responses/ase/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,25 @@
class Player:
"""
Represents a player in the game.
Args:
name (str): The name of the player.
team (str): The team of the player.
skin (str): The skin of the player.
score (int): The score of the player.
ping (int): The ping of the player.
time (int): The time of the player.
"""

name: str # The name of the player.
name: str
"""The name of the player."""

team: str
"""The team of the player."""

skin: str
"""The skin of the player."""

score: int
"""The score of the player."""

ping: int
"""The ping of the player."""

time: int
"""The time of the player."""

@property
def __dict__(self):
Expand Down
34 changes: 21 additions & 13 deletions opengsq/responses/ase/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,40 @@
class Status:
"""
Represents the status of a game server.
Attributes:
gamename (str): The name of the game.
gameport (int): The port number of the game server.
hostname (str): The hostname of the game server.
gametype (str): The type of the game.
map (str): The current map of the game.
version (str): The version of the game.
password (bool): Whether a password is required to join the game.
numplayers (int): The number of players currently in the game.
maxplayers (int): The maximum number of players allowed in the game.
rules (dict[str, str]): The rules of the game. Defaults to an empty dictionary.
players (list[Player]): The players currently in the game. Defaults to an empty list.
"""

gamename: str
"""The name of the game."""

gameport: int
"""The port number of the game server."""

hostname: str
"""The hostname of the game server."""

gametype: str
"""The type of the game."""

map: str
"""The current map of the game."""

version: str
"""The version of the game."""

password: bool
"""Whether a password is required to join the game."""

numplayers: int
"""The number of players currently in the game."""

maxplayers: int
"""The maximum number of players allowed in the game."""

rules: dict[str, str] = field(default_factory=dict)
"""The rules of the game. Defaults to an empty dictionary."""

players: list[Player] = field(default_factory=list)
"""The players currently in the game. Defaults to an empty list."""

@property
def __dict__(self):
Expand Down

0 comments on commit 3276422

Please sign in to comment.