Added debug command to save the game

This commit is contained in:
simon
2018-05-11 10:25:40 -04:00
parent e97ecbe380
commit 9c41c16079
6 changed files with 41 additions and 3 deletions

View File

@@ -253,6 +253,8 @@ var WorldIndicator = (function (_super) {
};
return WorldIndicator;
}(DebugMessage));
{
}
var RENDERER_WIDTH = document.getElementById("game").clientWidth * window.devicePixelRatio;
var RENDERER_HEIGHT = (window.innerHeight / 1.40) * window.devicePixelRatio;
var DEBUG = true;
@@ -437,6 +439,9 @@ var Debug = (function () {
Debug.setEnergy = function (objectId, amount) {
mar.client.sendDebugCommand({ t: "debug", command: "setEnergy", objectId: objectId, amount: amount });
};
Debug.saveGame = function () {
mar.client.sendDebugCommand({t: "debug", command: "saveGame"});
};
return Debug;
}());
DEBUG = false;