Skip to content

Commit

Permalink
add next_map
Browse files Browse the repository at this point in the history
closes #1
  • Loading branch information
money-urt committed Mar 9, 2024
1 parent 689e2b0 commit 4bed636
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion urt30arcon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Team,
)

__version__ = "1.0.3"
__version__ = "1.1.0"

__all__ = [
"__version__",
Expand Down
8 changes: 8 additions & 0 deletions urt30arcon/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ async def mute(self, slot: str, duration: str | None = None) -> None:
cmd += f" {_duration_to_seconds(duration)}"
await self._execute(cmd)

async def next_map(self) -> str | None:
if rv := await self.cvarlist("g_next"):
if m := rv.get("g_nextmap"):
return m
if m := rv.get("g_nextcyclemap"):
return m
return None

async def nuke(self, slot: str) -> None:
await self._execute(f"nuke {slot}")

Expand Down

0 comments on commit 4bed636

Please sign in to comment.