Remove Engine.IsGameStarted completely
Revert89e511def9
refs: #4211,bc6da5e3f2
Accepted By: elexis Differential Revision: https://code.wildfiregames.com/D5152 This was SVN commit r27883.
This commit is contained in:
parent
0eae7442b9
commit
29b57026a6
@ -31,10 +31,12 @@ class SessionMessageBox
|
||||
if (this.Buttons && this.Buttons[buttonId].onPress)
|
||||
this.Buttons[buttonId].onPress.call(this);
|
||||
|
||||
if (Engine.IsGameStarted())
|
||||
if (this.ResumeOnClose)
|
||||
resumeGame();
|
||||
}
|
||||
}
|
||||
|
||||
SessionMessageBox.prototype.Width = 400;
|
||||
SessionMessageBox.prototype.Height = 200;
|
||||
|
||||
SessionMessageBox.prototype.ResumeOnClose = true;
|
||||
|
@ -12,7 +12,8 @@ QuitConfirmation.prototype.Buttons =
|
||||
[
|
||||
{
|
||||
// Translation: Shown in the Dialog that shows up when the game finishes
|
||||
"caption": translate("Stay")
|
||||
"caption": translate("Stay"),
|
||||
"onPress": resumeGame
|
||||
},
|
||||
{
|
||||
// Translation: Shown in the Dialog that shows up when the game finishes
|
||||
@ -28,3 +29,5 @@ QuitConfirmation.prototype.Buttons =
|
||||
|
||||
QuitConfirmation.prototype.Width = 600;
|
||||
QuitConfirmation.prototype.Height = 200;
|
||||
|
||||
QuitConfirmation.prototype.ResumeOnClose = false;
|
||||
|
@ -36,11 +36,6 @@
|
||||
|
||||
namespace JSI_Game
|
||||
{
|
||||
bool IsGameStarted()
|
||||
{
|
||||
return g_Game;
|
||||
}
|
||||
|
||||
void StartGame(const ScriptInterface& guiInterface, JS::HandleValue attribs, int playerID, bool storeReplay)
|
||||
{
|
||||
ENSURE(!g_NetServer);
|
||||
@ -179,7 +174,6 @@ void DumpTerrainMipmap()
|
||||
|
||||
void RegisterScriptFunctions(const ScriptRequest& rq)
|
||||
{
|
||||
ScriptFunction::Register<&IsGameStarted>(rq, "IsGameStarted");
|
||||
ScriptFunction::Register<&StartGame>(rq, "StartGame");
|
||||
ScriptFunction::Register<&Script_EndGame>(rq, "EndGame");
|
||||
ScriptFunction::Register<&GetPlayerID>(rq, "GetPlayerID");
|
||||
|
Loading…
Reference in New Issue
Block a user