Added leaderboard page. Updated debug commands

This commit is contained in:
simon
2018-03-10 11:23:25 -05:00
parent b8c9beaead
commit d9ba7759e5
9 changed files with 223 additions and 52 deletions

View File

@@ -368,12 +368,12 @@ var Debug = /** @class */ (function () {
}
Debug.setTileAt = function (x, y, newTile) {
mar.client.sendDebugCommand({ t: "debug", command: "setTileAt", x: x, y: y, newTile: newTile,
worldX: mar.client.worldX, worldY: mar.client.worldY });
worldX: mar.client.worldX, worldY: mar.client.worldY, dimension: mar.client.dimension });
mar.client.requestTerrain(); //Reload terrain
};
Debug.createWorld = function (x, y, dimension) {
mar.client.sendDebugCommand({ t: "debug", command: "createWorld", worldX: x, worldY: y, dimension: dimension });
mar.client.requestTerrain(); //Reload terrain
window.setTimeout(mar.client.requestTerrain, 250);
};
Debug.createWorldHex = function (x, y, dimension) {
mar.client.sendDebugCommand({ t: "debug", command: "createWorld",
@@ -420,6 +420,9 @@ var Debug = /** @class */ (function () {
mar.client.sendDebugCommand({ t: "debug", command: "spawnObj", data: data,
worldX: mar.client.worldX, worldY: mar.client.worldY, dimension: mar.client.dimension });
};
Debug.comPortMsg = function (objectId, message) {
mar.client.sendDebugCommand({ t: "debug", command: "comPortMsg", objectId: objectId, message: message });
};
return Debug;
}());
DEBUG = false; // todo remove

View File

@@ -115,14 +115,14 @@ class Debug {
public static setTileAt(x, y, newTile) {
mar.client.sendDebugCommand({t:"debug", command: "setTileAt", x: x, y: y, newTile: newTile,
worldX: mar.client.worldX, worldY: mar.client.worldY});
worldX: mar.client.worldX, worldY: mar.client.worldY, dimension: mar.client.dimension});
mar.client.requestTerrain(); //Reload terrain
}
public static createWorld(x, y, dimension) {
mar.client.sendDebugCommand({t:"debug", command: "createWorld", worldX: x, worldY: y, dimension:dimension});
mar.client.requestTerrain(); //Reload terrain
window.setTimeout(mar.client.requestTerrain, 250)
}
public static createWorldHex(x, y, dimension) {
@@ -180,6 +180,10 @@ class Debug {
worldX: mar.client.worldX, worldY: mar.client.worldY, dimension: mar.client.dimension});
}
public static comPortMsg(objectId, message) {
mar.client.sendDebugCommand({t:"debug", command: "comPortMsg", objectId: objectId, message: message});
}
}
DEBUG = false; // todo remove