so others may contribute
This commit is contained in:
43
code/debugging.js
Normal file
43
code/debugging.js
Normal file
@ -0,0 +1,43 @@
|
||||
|
||||
// DEBUGGING TOOLS ///////////////////////////////////////////////////
|
||||
// meant to be used from browser debugger tools and the like.
|
||||
|
||||
window.debug = function() {}
|
||||
|
||||
window.debug.renderDetails = function() {
|
||||
console.log('portals: ' + Object.keys(portals).length);
|
||||
console.log('links: ' + Object.keys(links).length);
|
||||
console.log('fields: ' + Object.keys(fields).length);
|
||||
}
|
||||
|
||||
window.debug.printStackTrace = function() {
|
||||
var e = new Error('dummy');
|
||||
console.log(e.stack);
|
||||
}
|
||||
|
||||
window.debug.clearPortals = function() {
|
||||
portalsLayer.clearLayers();
|
||||
}
|
||||
|
||||
window.debug.clearLinks = function() {
|
||||
linksLayer.clearLayers();
|
||||
}
|
||||
|
||||
window.debug.clearFields = function() {
|
||||
fieldsLayer.clearLayers();
|
||||
}
|
||||
|
||||
window.debug.getFields = function() {
|
||||
return fields;
|
||||
}
|
||||
|
||||
window.debug.forceSync = function() {
|
||||
localStorage.clear();
|
||||
window.playersToResolve = [];
|
||||
window.playersInResolving = [];
|
||||
debug.clearFields();
|
||||
debug.clearLinks();
|
||||
debug.clearPortals();
|
||||
updateGameScore();
|
||||
requestData();
|
||||
}
|
Reference in New Issue
Block a user