This commit is contained in:
aclist authored and GitHub committed 2026-07-31 23:13:10 +09:00
commit 557079ce0f
3 files changed
+23 -1

No files matched your search

+4 -1
View File
@@ -139,6 +139,8 @@ def get_remote_signatures(mods: list[str]) -> list[tuple[str, str, int, int]]:
j = r.json() j = r.json()
rows = j["response"]["publishedfiledetails"] rows = j["response"]["publishedfiledetails"]
for row in rows: for row in rows:
if row["result"] == 9:
continue
title = str(row["title"]) title = str(row["title"])
_id = str(row["publishedfileid"]) _id = str(row["publishedfileid"])
time = int(row["time_updated"]) time = int(row["time_updated"])
@@ -205,9 +207,11 @@ def launch_offline(
proc = subprocess.run([*client_args, *params]) proc = subprocess.run([*client_args, *params])
return proc.returncode return proc.returncode
def find_loginusers(path: Path) -> Path: def find_loginusers(path: Path) -> Path:
return path / "config" / "loginusers.vdf" return path / "config" / "loginusers.vdf"
def find_user_id(path: Path) -> str | None: def find_user_id(path: Path) -> str | None:
resolved_path = find_loginusers(path) resolved_path = find_loginusers(path)
try: try:
@@ -226,7 +230,6 @@ def find_user_id(path: Path) -> str | None:
return None return None
def find_user_id_32(path: Path) -> int: def find_user_id_32(path: Path) -> int:
uid = find_user_id(path) uid = find_user_id(path)
if uid is None: if uid is None:
+10
View File
@@ -86,6 +86,7 @@ class Prerequisites:
mods: list[list[str]] mods: list[list[str]]
game_mode: bool game_mode: bool
is_last_server: bool is_last_server: bool
invalid_mods: list[tuple[str, str]]
allows_downloads: tuple[bool, str] allows_downloads: tuple[bool, str]
@@ -191,6 +192,9 @@ class ConnectionManager:
is_last = self.is_last_server() is_last = self.is_last_server()
# TODO: strings
invalid_mods = [(mod[0], mod[1]) for mod in remote_mods if mod[2] == "Invalid mod"]
prereqs = Prerequisites( prereqs = Prerequisites(
name=info.server_name, name=info.server_name,
appid=info.game_id, appid=info.game_id,
@@ -206,6 +210,7 @@ class ConnectionManager:
mods=remote_mods, mods=remote_mods,
game_mode=game_mode, game_mode=game_mode,
is_last_server=is_last, is_last_server=is_last,
invalid_mods=invalid_mods,
allows_downloads=allows_downloads, allows_downloads=allows_downloads,
) )
@@ -261,6 +266,11 @@ class ConnectionManager:
for mod in alpha_mods: for mod in alpha_mods:
if any(mod[1] in tuple for tuple in missing_mods): if any(mod[1] in tuple for tuple in missing_mods):
mod[2] = resync mod[2] = resync
for mod in alpha_mods:
# NOTE: if the mod is neither synched or out of date, it is a malformed mod
if mod[2] == "":
# TODO: strings
mod[2] = "Invalid mod"
return alpha_mods, missing_mods return alpha_mods, missing_mods
+9
View File
@@ -239,6 +239,15 @@ class PreConnectionAssistant(Gtk.Box):
) )
"""Errors""" """Errors"""
if len(prereqs.invalid_mods) > 0:
pairs = [": ".join(sub) for sub in prereqs.invalid_mods]
lines = "\n".join(pairs)
msg = (
"Server has invalid mods that are not recognized by Steam.\n"
"Contact the server owner and include these mod IDs in your report:\n"
f"{lines}"
)
errors.append(msg)
if prereqs.binary_missing: if prereqs.binary_missing:
errors.append( errors.append(
f"Remote server is running the build '{prereqs.build}', but it is not installed.\n{resync_msg}" f"Remote server is running the build '{prereqs.build}', but it is not installed.\n{resync_msg}"