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

38 lines
1.4 KiB
JavaScript

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