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.
41 lines
1.4 KiB
TypeScript
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);
|
|
}
|
|
}
|
|
}]
|
|
};
|
|
}
|