Differential D3711 Diff 16562 binaries/data/mods/public/gui/session/message_box/QuitConfirmationDefeat.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/session/message_box/QuitConfirmationDefeat.js
Show All 31 Lines | if (g_IsNetworked && !g_IsNetworkedActive) | ||||
return; | return; | ||||
unregisterSimulationUpdateHandler(this.confirmHandler); | unregisterSimulationUpdateHandler(this.confirmHandler); | ||||
// Don't invite the host to exit if other humans are still playing. | // Don't invite the host to exit if other humans are still playing. | ||||
let askExit = !Engine.HasNetServer() || g_Players.every((player, i) => | let askExit = !Engine.HasNetServer() || g_Players.every((player, i) => | ||||
i == 0 || | i == 0 || | ||||
player.state != "active" || | player.state != "active" || | ||||
g_GameAttributes.settings.PlayerData[i].AI != ""); | g_InitAttributes.settings.PlayerData[i].AI != ""); | ||||
this.Title = won ? this.TitleVictory : this.TitleDefeated; | this.Title = won ? this.TitleVictory : this.TitleDefeated; | ||||
this.Caption = | this.Caption = | ||||
g_PlayerStateMessages[won ? "won" : "defeated"] + | g_PlayerStateMessages[won ? "won" : "defeated"] + | ||||
(askExit ? "\n" + this.Question : ""); | (askExit ? "\n" + this.Question : ""); | ||||
this.Buttons = askExit ? super.Buttons : undefined; | this.Buttons = askExit ? super.Buttons : undefined; | ||||
Show All 9 Lines |
Wildfire Games · Phabricator