Files
Josh Goldberg 9a6283d81d Added a "Running Indoors" mod
Cycling indoors, a great and terrible thing.
2016-04-18 12:16:29 -05:00

41 lines
1.4 KiB
TypeScript

module FullScreenPokemon {
"use strict";
FullScreenPokemon.settings.mods = {
storeLocally: true,
prefix: "FullScreenPokemon::Mods::",
mods: [
{
name: "Running Indoors",
enabled: false,
events: {
onModEnable: function (mod: ModAttachr.IModAttachrMod): void {
let area: IArea = this.AreaSpawner.getArea();
if (!area) {
return;
}
(<any>area).allowCyclingOld = area.allowCycling;
area.allowCycling = true;
},
onModDisable: function (mod: ModAttachr.IModAttachrMod): void {
let area: IArea = this.AreaSpawner.getArea();
if (!area) {
return;
}
area.allowCycling = (<any>area).allowCyclingOld;
delete (<any>area).allowCyclingOld;
if (!area.allowCycling && this.player.cycling) {
this.stopCycling(this.player);
}
},
onSetLocation: function (mod: ModAttachr.IModAttachrMod): void {
mod.events.onModEnable.call(this, mod);
}
}
}]
};
}