Skip to content

Instantly share code, notes, and snippets.

View eropple's full-sized avatar

Ed Ropple eropple

View GitHub Profile
/*
* All recent hotspots (as of 2009) *really* like to have the natural code
*
* if (guardExpression) {
* throw new BadException(messageExpression);
* }
*
* refactored so that messageExpression is moved to a separate
* String-returning method.
*
//% root!TestDialogue.js
// ^ says "run the original TestDialogue.js first"
(function() { // boilerplate, it hides some stuff so you don't pollute the script for other mods
var oldStep2 = step2;
step2 = function() {
var orig = oldStep2();
@eropple
eropple / TestDialogue.js
Created February 20, 2014 07:25
Another test script
var loadAssets = function(assets) {
return [
{
fileName: "Portraits/adam-normal.png",
type: Types["Texture"]
},
{
fileName: "Portraits/celt-normal.png",
type: Types["Texture"]
}
@eropple
eropple / Maps_Scripts_TestMap.js
Created February 16, 2014 09:47
Example of Anaeax scripting/mod support
//% root!Maps/Scripts/TestMap.js
(function() {
var a = init;
init = function() {
LOGGER.info("I'm an override function for " + MAP.titleName);
a();
}
})();