Unreachable-server UX: message boxes + bat guidance instead of a 'crash'
Field report (first internet-join attempt): both join bats 'hard crash' on the remote machine. Root cause was procedural -- the host session was not running -- but the failure PRESENTATION was the bug: Release Fail() is a bare abort(), so a dead relay = silent process death + instantly-closing console window. - L4NET: the two player-facing dead-ends (LAN discovery no-answer, seat request unreachable/full) now show a MessageBox saying what happened and what to do before exiting (verified live against a dead relay: 'BattleTech -- can't join the game' appears). - join bats: echo + pause after exit so the window stays readable; join_lan.bat header now says it is LAN-only (the remote user ran both -- join_lan can never work over the internet). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
d173f088a6
commit
dfd1894fb9
+10
-4
@@ -706,6 +706,11 @@ class Operator(QMainWindow):
|
||||
# first-come-first-served (no BT_SELF), so every player gets the SAME
|
||||
# file -- who flies which mech is whoever sits down first, exactly
|
||||
# like walking up to a pod.
|
||||
tail = ("echo.\n"
|
||||
"echo The game has exited. If you did NOT quit on purpose,\n"
|
||||
"echo the session may not be running yet or the server was\n"
|
||||
"echo unreachable -- check with the operator and try again.\n"
|
||||
"pause\n")
|
||||
with open(os.path.join(out_dir, "join.bat"), "w", newline="\r\n") as f:
|
||||
f.write("@echo off\n"
|
||||
"rem BT411 -- join %s's game (internet). Your seat/mech\n"
|
||||
@@ -713,16 +718,17 @@ class Operator(QMainWindow):
|
||||
"set BT_RELAY=%s:%d\n"
|
||||
"cd /d %%~dp0content\n"
|
||||
"..\\build\\Release\\btl4.exe -egg %s -net 1501\n"
|
||||
% (host, host, self.f_port.value(), egg_name))
|
||||
% (host, host, self.f_port.value(), egg_name) + tail)
|
||||
with open(os.path.join(out_dir, "join_lan.bat"), "w",
|
||||
newline="\r\n") as f:
|
||||
f.write("@echo off\n"
|
||||
"rem BT411 -- join the LAN game. Finds the operator\n"
|
||||
"rem console AND your seat automatically.\n"
|
||||
"rem BT411 -- join the game from the operator's OWN\n"
|
||||
"rem network (LAN) -- finds the console automatically.\n"
|
||||
"rem Joining over the INTERNET? Use join.bat instead.\n"
|
||||
"set BT_RELAY=auto\n"
|
||||
"cd /d %%~dp0content\n"
|
||||
"..\\build\\Release\\btl4.exe -egg %s -net 1501\n"
|
||||
% egg_name)
|
||||
% egg_name + tail)
|
||||
self.log.appendPlainText(
|
||||
"exported join.bat + join_lan.bat to %s (public host: %s) -- "
|
||||
"one file for everyone; the relay assigns seats"
|
||||
|
||||
Reference in New Issue
Block a user