Skip to content

Commit

Permalink
Merge pull request #38 from cirrahn/feature/remove-mass-preload
Browse files Browse the repository at this point in the history
Remove mass effect preload
  • Loading branch information
Z3nner authored Jun 20, 2024
2 parents bbbf5ac + 04ab7aa commit 0104779
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 94 deletions.
2 changes: 0 additions & 2 deletions lang/en.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"lancer-weapon-fx.Sound Volume": "Sound Volume",
"lancer-weapon-fx.Sound Volume Hint": "Set a base volume level for all sound effects. Note that for each user, this value is combined with the user's \"Global: Interface\" volume setting (see the \"Playlists\" sidebar tab) to produce their final volume level.",
"lancer-weapon-fx.Preload Effects": "Preload Effects",
"lancer-weapon-fx.Preload Effects Hint": "If enabled, common effects (images and videos) will be pre-loaded when loading the world. Disabling this improves world loading time at the cost of lag the first time an animation is played.",
"lancer-weapon-fx.Debug: Play Miss Animations by Default": "Debug: Play Miss Animations by Default"
}
4 changes: 2 additions & 2 deletions scripts/WeaponFX.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {bindHooks as bindApiHooks} from "./api.js";
import {bindHooks as bindSettingsHooks} from "./settings.js";
import {bindHooks as bindPreloaderHooks} from "./preloader.js";
import {bindHooks as bindModuleCheckHooks} from "./moduleCheck.js";
import {bindHooks as bindFlowListenerHooks} from "./flow/flowListener.js";

bindSettingsHooks();
bindApiHooks();
bindPreloaderHooks();
bindModuleCheckHooks();
bindFlowListenerHooks();
10 changes: 10 additions & 0 deletions scripts/moduleCheck.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export const bindHooks = () => {
Hooks.once("sequencer.ready", () => {
// Check if either free or Patreon JB2A module is installed and activated, otherwise return and display an error message.
if (game.modules.get('jb2a_patreon')?.active || game.modules.get('JB2A_DnD5e')?.active) return;

const message = "Lancer Weapon FX | You need either the Free or the Patreon version of JB2A installed and active for this module to work properly!";
console.error(`${message} The free version can be found at: https://foundryvtt.com/packages/JB2A_DnD5e`);
ui.notifications.error(message, {permanent: true, console: false});
});
};
80 changes: 0 additions & 80 deletions scripts/preloader.js

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/settings.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {MODULE_ID} from "./consts.js";

export const SETTING_VOLUME = "volume";
export const SETTING_IS_PRELOAD_EFFECTS = "is-preload-effects";

export const SETTING_DEBUG_IS_DEFAULT_MISS = "debug-is-default-miss";

Expand All @@ -18,15 +17,6 @@ export const bindHooks = () => {
default: 1.0,
});

game.settings.register(MODULE_ID, SETTING_IS_PRELOAD_EFFECTS, {
name: "lancer-weapon-fx.Preload Effects",
hint: "lancer-weapon-fx.Preload Effects Hint",
scope: "world",
config: true,
type: Boolean,
default: true,
});

game.settings.register(MODULE_ID, SETTING_DEBUG_IS_DEFAULT_MISS, {
name: "lancer-weapon-fx.Debug: Play Miss Animations by Default",
scope: "client",
Expand Down

0 comments on commit 0104779

Please sign in to comment.