Skip to content

Instantly share code, notes, and snippets.

View eropple's full-sized avatar

Ed Ropple eropple

View GitHub Profile
@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();
}
})();
@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"]
}
//% 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();
/*
* 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.
*
/**
* The default behavior for a weapon.
* @param instance
* @param stats
*/
var transformStatBlock = function(instance, stats) {
stats.attack += instance.parent.attackModifier;
stats.magic += instance.parent.magicModifier;
};
MAIN_COLOR=$fg[green]
SECONDARY_COLOR=$fg[cyan]
CAPPER_COLOR=$fg[yellow]
CAPPER=$
if [[ `id -u $USER` -eq 0 ]]
then
MAIN_COLOR=$fg[red]
SECONDARY_COLOR=$fg[yellow]
MAIN_COLOR=$fg[green]
SECONDARY_COLOR=$fg[cyan]
CAPPER_COLOR=$fg[yellow]
CAPPER=$
if [[ `id -u $USER` -eq 0 ]]
then
MAIN_COLOR=$fg[red]
SECONDARY_COLOR=$fg[yellow]
@eropple
eropple / .zshrc
Last active August 29, 2015 14:26
export DOTFILE_ROOT=/path/to/dotfile/root/dotfiles # I put them in Dropbox
source ${DOTFILE_ROOT}/zshrc-base.zsh
export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='mvim' # change this to your windowed editor of choice
fi

Keybase proof

I hereby claim:

  • I am eropple on github.
  • I am eropple (https://keybase.io/eropple) on keybase.
  • I have a public key ASBtSLPebbXhWAc3rEkvdhGdSNEPfQISC64r0618TceZPAo

To claim this, I am signing this object: