This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* watcher function to ensure injection is applied */ | |
window.showBirthDate = function(event){ | |
var formatDate = function formatDate(d){; | |
return ("0" + d.getUTCHours()).slice(-2) + ":" + | |
("0" + d.getUTCMinutes()).slice(-2) + ":" + | |
("0" + d.getUTCSeconds()).slice(-2) + " " + | |
("0" + (d.getUTCMonth()+1)).slice(-2) + "/" + | |
("0" + d.getUTCDate()).slice(-2) + "/" + | |
d.getUTCFullYear() + " UTC"; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The function below was developed late last year by the Screeps player "stybbe" published in | |
// chat.screeps.com's #share-thy-code channel. No license was applied; all rights remain with | |
// the author. | |
global.voiceConsole = function voiceConsole(text){ | |
console.log(`<span style="color:green; font-style: italic;">${text}</span> | |
<script> | |
if (!window.speakText){ | |
window.speakText = function(gameTime, text) { | |
var id = gameTime + "-" + text; | |
if(!window.voiceHash){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* To start using Traveler, require it in main.js: | |
* | |
* There are 6 options available to pass to the module. Options are passed in the form | |
* of an object with one or more of the following: | |
* | |
* exportTraveler: boolean Whether the require() should return the Traveler class. Defaults to true. | |
* installTraveler: boolean Whether the Traveler class should be stored in `global.Traveler`. Defaults to false. | |
* installPrototype: boolean Whether Creep.prototype.travelTo() should be created. Defaults to true. | |
* hostileLocation: string Where in Memory a list of hostile rooms can be found. If it can be found in |