You've already forked FullScreenPokemon
mirror of
https://github.com/FullScreenShenanigans/FullScreenPokemon.git
synced 2026-04-28 12:58:40 -07:00
9a6283d81d
Cycling indoors, a great and terrible thing.
38 lines
1.4 KiB
JavaScript
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 = {}));
|