Skip to content

Commit

Permalink
Resolve Source Protocol issue
Browse files Browse the repository at this point in the history
  • Loading branch information
BattlefieldDuck committed Feb 6, 2024
1 parent f7e90b9 commit 75ef9f1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions opengsq/protocols/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ def __parse_from_info_detailed(self, br: BinaryReader) -> GoldSourceInfo:
info["players"] = br.read_byte()
info["max_players"] = br.read_byte()
info["protocol"] = br.read_byte()
info["server_type"] = ServerType(br.read_byte())
info["environment"] = Environment(br.read_byte())
info["server_type"] = ServerType(ord(chr(br.read_byte()).lower()))
info["environment"] = Environment(ord(chr(br.read_byte()).lower()))
info["visibility"] = Visibility(br.read_byte())
info["mod"] = br.read_byte()

Expand Down
15 changes: 9 additions & 6 deletions opengsq/responses/source/gold_source_info.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from __future__ import annotations

from dataclasses import dataclass
from typing import Optional
from .partial_info import PartialInfo


Expand All @@ -18,26 +21,26 @@ class GoldSourceInfo(PartialInfo):
1 for Half-Life mod
"""

link: str
link: Optional[str] = None
"""URL to mod website."""

download_link: str
download_link: Optional[str] = None
"""URL to download the mod."""

version: int
version: Optional[int] = None
"""Version of mod installed on server."""

size: int
size: Optional[int] = None
"""Space (in bytes) the mod takes up."""

type: int
type: Optional[int] = None
"""
Indicates the type of mod:
0 for single and multiplayer mod
1 for multiplayer only mod
"""

dll: int
dll: Optional[int] = None
"""
Indicates whether mod uses its own DLL:
0 if it uses the Half-Life DLL
Expand Down
2 changes: 1 addition & 1 deletion opengsq/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.0.6'
__version__ = '3.0.7'

0 comments on commit 75ef9f1

Please sign in to comment.