added ns in CONFIG.l5r5e.systemName

This commit is contained in:
Vlyan
2023-01-08 10:32:35 +01:00
parent 5fbb34d882
commit 1ec9e65ca5
15 changed files with 61 additions and 62 deletions

View File

@@ -120,7 +120,7 @@ export class ActorL5r5e extends Actor {
// Now using updateDocuments // Now using updateDocuments
return Actor.updateDocuments([docData], context).then(() => { return Actor.updateDocuments([docData], context).then(() => {
// Notify the "Gm Monitor" if this actor is watched // Notify the "Gm Monitor" if this actor is watched
if (game.settings.get("l5r5e", "gm-monitor-actors").find((e) => e === this.id)) { if (game.settings.get(CONFIG.l5r5e.systemName, "gm-monitor-actors").find((e) => e === this.id)) {
game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor"); game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor");
} }
}); });
@@ -330,9 +330,9 @@ export class ActorL5r5e extends Actor {
} }
const cfg = { const cfg = {
character: game.settings.get("l5r5e", "initiative-prepared-character"), character: game.settings.get(CONFIG.l5r5e.systemName, "initiative-prepared-character"),
adversary: game.settings.get("l5r5e", "initiative-prepared-adversary"), adversary: game.settings.get(CONFIG.l5r5e.systemName, "initiative-prepared-adversary"),
minion: game.settings.get("l5r5e", "initiative-prepared-minion"), minion: game.settings.get(CONFIG.l5r5e.systemName, "initiative-prepared-minion"),
}; };
// Prepared is a boolean or if null we get the info in the actor // Prepared is a boolean or if null we get the info in the actor

View File

@@ -49,7 +49,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
// Build the list order // Build the list order
Array.from(CONFIG.l5r5e.techniques) Array.from(CONFIG.l5r5e.techniques)
.filter(([id, cfg]) => cfg.type !== "custom" || game.settings.get("l5r5e", "techniques-customs")) .filter(([id, cfg]) => cfg.type !== "custom" || game.settings.get(CONFIG.l5r5e.systemName, "techniques-customs"))
.forEach(([id, cfg]) => { .forEach(([id, cfg]) => {
out[id] = []; out[id] = [];
}); });

View File

@@ -24,14 +24,14 @@ export class CombatL5r5e extends Combat {
// Get global modifiers // Get global modifiers
const cfg = { const cfg = {
difficulty: game.settings.get("l5r5e", "initiative-difficulty-value"), difficulty: game.settings.get(CONFIG.l5r5e.systemName, "initiative-difficulty-value"),
difficultyHidden: game.settings.get("l5r5e", "initiative-difficulty-hidden"), difficultyHidden: game.settings.get(CONFIG.l5r5e.systemName, "initiative-difficulty-hidden"),
}; };
// SkillId from DicePicker or global // SkillId from DicePicker or global
const skillId = messageOptions.skillId const skillId = messageOptions.skillId
? messageOptions.skillId ? messageOptions.skillId
: CONFIG.l5r5e.initiativeSkills[game.settings.get("l5r5e", "initiative-encounter")]; : CONFIG.l5r5e.initiativeSkills[game.settings.get(CONFIG.l5r5e.systemName, "initiative-encounter")];
const skillCat = CONFIG.l5r5e.skills.get(skillId); const skillCat = CONFIG.l5r5e.skills.get(skillId);
// Get score for each combatant // Get score for each combatant

View File

@@ -1,4 +1,5 @@
export const L5R5E = { export const L5R5E = {
systemName: "l5r5e", // System namespace, same as "id" in system.json
paths: { paths: {
assets: `systems/l5r5e/assets/`, assets: `systems/l5r5e/assets/`,
templates: `systems/l5r5e/templates/`, templates: `systems/l5r5e/templates/`,

View File

@@ -176,7 +176,7 @@ export class DicePickerDialog extends FormApplication {
// Difficulty // Difficulty
if (!options.difficulty || !this.parseDifficulty(options.difficulty)) { if (!options.difficulty || !this.parseDifficulty(options.difficulty)) {
this.difficulty = game.settings.get("l5r5e", "initiative-difficulty-value"); this.difficulty = game.settings.get(CONFIG.l5r5e.systemName, "initiative-difficulty-value");
} }
// DifficultyHidden // DifficultyHidden
@@ -201,7 +201,7 @@ export class DicePickerDialog extends FormApplication {
*/ */
async refresh() { async refresh() {
if (this._difficultyHiddenIsLock.option) { if (this._difficultyHiddenIsLock.option) {
this.difficulty = game.settings.get("l5r5e", "initiative-difficulty-value"); this.difficulty = game.settings.get(CONFIG.l5r5e.systemName, "initiative-difficulty-value");
this.difficultyHidden = false; this.difficultyHidden = false;
} }
this.render(false); this.render(false);
@@ -363,7 +363,7 @@ export class DicePickerDialog extends FormApplication {
*/ */
set difficultyHidden(isHidden) { set difficultyHidden(isHidden) {
// If GM hide, then player choice don't matter // If GM hide, then player choice don't matter
this._difficultyHiddenIsLock.gm = game.settings.get("l5r5e", "initiative-difficulty-hidden"); this._difficultyHiddenIsLock.gm = game.settings.get(CONFIG.l5r5e.systemName, "initiative-difficulty-hidden");
if (this._difficultyHiddenIsLock.gm || this._difficultyHiddenIsLock.option) { if (this._difficultyHiddenIsLock.gm || this._difficultyHiddenIsLock.option) {
isHidden = true; isHidden = true;
} }

View File

@@ -683,7 +683,7 @@ export class RollnKeepDialog extends FormApplication {
} }
// Delete old chat message related to this series // Delete old chat message related to this series
if (game.settings.get("l5r5e", "rnk-deleteOldMessage")) { if (game.settings.get(CONFIG.l5r5e.systemName, "rnk-deleteOldMessage")) {
if (game.user.isFirstGM) { if (game.user.isFirstGM) {
const message = game.messages.get(msgOldId); const message = game.messages.get(msgOldId);
if (message) { if (message) {

View File

@@ -84,7 +84,7 @@ export class GmMonitor extends FormApplication {
*/ */
_initialize() { _initialize() {
let actors; let actors;
const ids = game.settings.get("l5r5e", "gm-monitor-actors"); const ids = game.settings.get(CONFIG.l5r5e.systemName, "gm-monitor-actors");
if (ids.length > 0) { if (ids.length > 0) {
// get actors with stored ids // get actors with stored ids
@@ -218,7 +218,7 @@ export class GmMonitor extends FormApplication {
*/ */
async _saveActorsIds() { async _saveActorsIds() {
return game.settings.set( return game.settings.set(
"l5r5e", CONFIG.l5r5e.systemName,
"gm-monitor-actors", "gm-monitor-actors",
this.object.actors.map((e) => e.id) this.object.actors.map((e) => e.id)
); );

View File

@@ -55,8 +55,8 @@ export class GmToolbox extends FormApplication {
*/ */
_initialize() { _initialize() {
this.object = { this.object = {
difficulty: game.settings.get("l5r5e", "initiative-difficulty-value"), difficulty: game.settings.get(CONFIG.l5r5e.systemName, "initiative-difficulty-value"),
difficultyHidden: game.settings.get("l5r5e", "initiative-difficulty-hidden"), difficultyHidden: game.settings.get(CONFIG.l5r5e.systemName, "initiative-difficulty-hidden"),
}; };
} }
@@ -128,7 +128,7 @@ export class GmToolbox extends FormApplication {
event.stopPropagation(); event.stopPropagation();
this.object.difficultyHidden = !this.object.difficultyHidden; this.object.difficultyHidden = !this.object.difficultyHidden;
game.settings game.settings
.set("l5r5e", "initiative-difficulty-hidden", this.object.difficultyHidden) .set(CONFIG.l5r5e.systemName, "initiative-difficulty-hidden", this.object.difficultyHidden)
.then(() => this.submit()); .then(() => this.submit());
}); });

View File

@@ -158,14 +158,14 @@ export default class HooksL5r5e {
// *** Conf *** // *** Conf ***
const encounterTypeList = Object.keys(CONFIG.l5r5e.initiativeSkills); const encounterTypeList = Object.keys(CONFIG.l5r5e.initiativeSkills);
const prepared = { const prepared = {
character: game.settings.get("l5r5e", "initiative-prepared-character"), character: game.settings.get(CONFIG.l5r5e.systemName, "initiative-prepared-character"),
adversary: game.settings.get("l5r5e", "initiative-prepared-adversary"), adversary: game.settings.get(CONFIG.l5r5e.systemName, "initiative-prepared-adversary"),
minion: game.settings.get("l5r5e", "initiative-prepared-minion"), minion: game.settings.get(CONFIG.l5r5e.systemName, "initiative-prepared-minion"),
}; };
// *** Template *** // *** Template ***
const tpl = await renderTemplate(`${CONFIG.l5r5e.paths.templates}gm/combat-tracker-bar.html`, { const tpl = await renderTemplate(`${CONFIG.l5r5e.paths.templates}gm/combat-tracker-bar.html`, {
encounterType: game.settings.get("l5r5e", "initiative-encounter"), encounterType: game.settings.get(CONFIG.l5r5e.systemName, "initiative-encounter"),
encounterTypeList, encounterTypeList,
prepared, prepared,
}); });
@@ -186,7 +186,7 @@ export default class HooksL5r5e {
if (!encounterTypeList.includes(encounter)) { if (!encounterTypeList.includes(encounter)) {
return; return;
} }
game.settings.set("l5r5e", "initiative-encounter", encounter); game.settings.set(CONFIG.l5r5e.systemName, "initiative-encounter", encounter);
}); });
html.find(".prepared-control").on("mousedown", (event) => { html.find(".prepared-control").on("mousedown", (event) => {
@@ -202,7 +202,7 @@ export default class HooksL5r5e {
true: rev ? "actor" : "false", true: rev ? "actor" : "false",
actor: rev ? "false" : "true", actor: rev ? "false" : "true",
}; };
game.settings.set("l5r5e", `initiative-prepared-${preparedId}`, nextValue[prepared[preparedId]]); game.settings.set(CONFIG.l5r5e.systemName, `initiative-prepared-${preparedId}`, nextValue[prepared[preparedId]]);
}); });
} }

View File

@@ -23,8 +23,6 @@ export class SkillSheetL5r5e extends ItemSheetL5r5e {
sheetData.data.SkillCategoriesList = CONFIG.l5r5e.skillCategories; sheetData.data.SkillCategoriesList = CONFIG.l5r5e.skillCategories;
console.log(sheetData.data.system);
return sheetData; return sheetData;
} }
} }

View File

@@ -21,7 +21,7 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
// List all available techniques type // List all available techniques type
const types = ["core", "school", "title"]; const types = ["core", "school", "title"];
if (game.settings.get("l5r5e", "techniques-customs")) { if (game.settings.get(CONFIG.l5r5e.systemName, "techniques-customs")) {
types.push("custom"); types.push("custom");
} }
sheetData.data.techniquesList = game.l5r5e.HelpersL5r5e.getTechniquesList({ types }); sheetData.data.techniquesList = game.l5r5e.HelpersL5r5e.getTechniquesList({ types });

View File

@@ -110,17 +110,17 @@ Hooks.once("init", async () => {
// ***** Register custom sheets ***** // ***** Register custom sheets *****
// Actors // Actors
Actors.unregisterSheet("core", ActorSheet); Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("l5r5e", CharacterSheetL5r5e, { Actors.registerSheet(L5R5E.systemName, CharacterSheetL5r5e, {
types: ["character"], types: ["character"],
label: "ACTOR.TypeCharacter", label: "ACTOR.TypeCharacter",
makeDefault: true, makeDefault: true,
}); });
Actors.registerSheet("l5r5e", NpcSheetL5r5e, { Actors.registerSheet(L5R5E.systemName, NpcSheetL5r5e, {
types: ["npc"], types: ["npc"],
label: "ACTOR.TypeNpc", label: "ACTOR.TypeNpc",
makeDefault: true, makeDefault: true,
}); });
Actors.registerSheet("l5r5e", ArmySheetL5r5e, { Actors.registerSheet(L5R5E.systemName, ArmySheetL5r5e, {
types: ["army"], types: ["army"],
label: "ACTOR.TypeArmy", label: "ACTOR.TypeArmy",
makeDefault: true, makeDefault: true,
@@ -128,72 +128,72 @@ Hooks.once("init", async () => {
// Items // Items
Items.unregisterSheet("core", ItemSheet); Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("l5r5e", ItemSheetL5r5e, { Items.registerSheet(L5R5E.systemName, ItemSheetL5r5e, {
types: ["item"], types: ["item"],
label: "ITEM.TypeItem", label: "ITEM.TypeItem",
makeDefault: true, makeDefault: true,
}); });
Items.registerSheet("l5r5e", SkillSheetL5r5e, { Items.registerSheet(L5R5E.systemName, SkillSheetL5r5e, {
types: ["skill"], types: ["skill"],
label: "ITEM.TypeSkill", label: "ITEM.TypeSkill",
makeDefault: true, makeDefault: true,
}); });
Items.registerSheet("l5r5e", ArmorSheetL5r5e, { Items.registerSheet(L5R5E.systemName, ArmorSheetL5r5e, {
types: ["armor"], types: ["armor"],
label: "ITEM.TypeArmor", label: "ITEM.TypeArmor",
makeDefault: true, makeDefault: true,
}); });
Items.registerSheet("l5r5e", WeaponSheetL5r5e, { Items.registerSheet(L5R5E.systemName, WeaponSheetL5r5e, {
types: ["weapon"], types: ["weapon"],
label: "ITEM.TypeWeapon", label: "ITEM.TypeWeapon",
makeDefault: true, makeDefault: true,
}); });
Items.registerSheet("l5r5e", TechniqueSheetL5r5e, { Items.registerSheet(L5R5E.systemName, TechniqueSheetL5r5e, {
types: ["technique"], types: ["technique"],
label: "ITEM.TypeTechnique", label: "ITEM.TypeTechnique",
makeDefault: true, makeDefault: true,
}); });
Items.registerSheet("l5r5e", PropertySheetL5r5e, { Items.registerSheet(L5R5E.systemName, PropertySheetL5r5e, {
types: ["property"], types: ["property"],
label: "ITEM.TypeProperty", label: "ITEM.TypeProperty",
makeDefault: true, makeDefault: true,
}); });
Items.registerSheet("l5r5e", PeculiaritySheetL5r5e, { Items.registerSheet(L5R5E.systemName, PeculiaritySheetL5r5e, {
types: ["peculiarity"], types: ["peculiarity"],
label: "ITEM.TypePeculiarity", label: "ITEM.TypePeculiarity",
makeDefault: true, makeDefault: true,
}); });
Items.registerSheet("l5r5e", AdvancementSheetL5r5e, { Items.registerSheet(L5R5E.systemName, AdvancementSheetL5r5e, {
types: ["advancement"], types: ["advancement"],
label: "ITEM.TypeAdvancement", label: "ITEM.TypeAdvancement",
makeDefault: true, makeDefault: true,
}); });
Items.registerSheet("l5r5e", TitleSheetL5r5e, { Items.registerSheet(L5R5E.systemName, TitleSheetL5r5e, {
types: ["title"], types: ["title"],
label: "ITEM.TypeTitle", label: "ITEM.TypeTitle",
makeDefault: true, makeDefault: true,
}); });
Items.registerSheet("l5r5e", BondSheetL5r5e, { Items.registerSheet(L5R5E.systemName, BondSheetL5r5e, {
types: ["bond"], types: ["bond"],
label: "ITEM.TypeBond", label: "ITEM.TypeBond",
makeDefault: true, makeDefault: true,
}); });
Items.registerSheet("l5r5e", SignatureScrollSheetL5r5e, { Items.registerSheet(L5R5E.systemName, SignatureScrollSheetL5r5e, {
types: ["signature_scroll"], types: ["signature_scroll"],
label: "ITEM.TypeSignature_scroll", label: "ITEM.TypeSignature_scroll",
makeDefault: true, makeDefault: true,
}); });
Items.registerSheet("l5r5e", ItemPatternSheetL5r5e, { Items.registerSheet(L5R5E.systemName, ItemPatternSheetL5r5e, {
types: ["item_pattern"], types: ["item_pattern"],
label: "ITEM.TypeItem_pattern", label: "ITEM.TypeItem_pattern",
makeDefault: true, makeDefault: true,
}); });
Items.registerSheet("l5r5e", ArmyCohortSheetL5r5e, { Items.registerSheet(L5R5E.systemName, ArmyCohortSheetL5r5e, {
types: ["army_cohort"], types: ["army_cohort"],
label: "ITEM.TypeArmy_cohort", label: "ITEM.TypeArmy_cohort",
makeDefault: true, makeDefault: true,
}); });
Items.registerSheet("l5r5e", ArmyFortificationSheetL5r5e, { Items.registerSheet(L5R5E.systemName, ArmyFortificationSheetL5r5e, {
types: ["army_fortification"], types: ["army_fortification"],
label: "ITEM.TypeArmy_fortification", label: "ITEM.TypeArmy_fortification",
makeDefault: true, makeDefault: true,
@@ -201,7 +201,7 @@ Hooks.once("init", async () => {
// Journal // Journal
Journal.unregisterSheet("core", JournalSheet); Journal.unregisterSheet("core", JournalSheet);
Journal.registerSheet("l5r5e", BaseJournalSheetL5r5e, { Journal.registerSheet(L5R5E.systemName, BaseJournalSheetL5r5e, {
label: "JOURNAL.TypeJournal", label: "JOURNAL.TypeJournal",
makeDefault: true, makeDefault: true,
}); });
@@ -214,7 +214,7 @@ Hooks.once("init", async () => {
// Override the default Token _drawBar function to allow fatigue bar reversing. // Override the default Token _drawBar function to allow fatigue bar reversing.
Token.prototype._drawBar = function (number, bar, data) { Token.prototype._drawBar = function (number, bar, data) {
const reverseBar = data.attribute === "fatigue" && game.settings.get("l5r5e", "token-reverseFatigueBar"); const reverseBar = data.attribute === "fatigue" && game.settings.get(L5R5E.systemName, "token-reverseFatigueBar");
// Bar value // Bar value
const pct = Math.clamped(Number(data.value), 0, data.max) / data.max; const pct = Math.clamped(Number(data.value), 0, data.max) / data.max;

View File

@@ -14,7 +14,7 @@ export class MigrationL5r5e {
* @return {boolean} * @return {boolean}
*/ */
static needUpdate(version) { static needUpdate(version) {
const currentVersion = game.settings.get("l5r5e", "systemMigrationVersion"); const currentVersion = game.settings.get(CONFIG.l5r5e.systemName, "systemMigrationVersion");
return !currentVersion || foundry.utils.isNewerVersion(version, currentVersion); return !currentVersion || foundry.utils.isNewerVersion(version, currentVersion);
} }
@@ -113,7 +113,7 @@ export class MigrationL5r5e {
} }
// Set the migration as complete // Set the migration as complete
await game.settings.set("l5r5e", "systemMigrationVersion", game.system.version); await game.settings.set(CONFIG.l5r5e.systemName, "systemMigrationVersion", game.system.version);
ui.notifications.info(`L5R5e System Migration to version ${game.system.version} completed!`, { ui.notifications.info(`L5R5e System Migration to version ${game.system.version} completed!`, {
permanent: true, permanent: true,
}); });

View File

@@ -5,7 +5,7 @@ export const RegisterSettings = function () {
/* ------------------------------------ */ /* ------------------------------------ */
/* User settings */ /* User settings */
/* ------------------------------------ */ /* ------------------------------------ */
game.settings.register("l5r5e", "rnk-deleteOldMessage", { game.settings.register(CONFIG.l5r5e.systemName, "rnk-deleteOldMessage", {
name: "SETTINGS.RollNKeep.DeleteOldMessage", name: "SETTINGS.RollNKeep.DeleteOldMessage",
hint: "SETTINGS.RollNKeep.DeleteOldMessageHint", hint: "SETTINGS.RollNKeep.DeleteOldMessageHint",
scope: "world", scope: "world",
@@ -13,7 +13,7 @@ export const RegisterSettings = function () {
default: true, default: true,
type: Boolean, type: Boolean,
}); });
game.settings.register("l5r5e", "initiative-setTn1OnTypeChange", { game.settings.register(CONFIG.l5r5e.systemName, "initiative-setTn1OnTypeChange", {
name: "SETTINGS.Initiative.SetTn1OnTypeChange", name: "SETTINGS.Initiative.SetTn1OnTypeChange",
hint: "SETTINGS.Initiative.SetTn1OnTypeChangeHint", hint: "SETTINGS.Initiative.SetTn1OnTypeChangeHint",
scope: "world", scope: "world",
@@ -21,14 +21,14 @@ export const RegisterSettings = function () {
type: Boolean, type: Boolean,
default: true, default: true,
}); });
game.settings.register("l5r5e", "token-reverseFatigueBar", { game.settings.register(CONFIG.l5r5e.systemName, "token-reverseFatigueBar", {
name: "SETTINGS.ReverseFatigueBar", name: "SETTINGS.ReverseFatigueBar",
scope: "world", scope: "world",
config: true, config: true,
type: Boolean, type: Boolean,
default: false, default: false,
}); });
game.settings.register("l5r5e", "techniques-customs", { game.settings.register(CONFIG.l5r5e.systemName, "techniques-customs", {
name: "SETTINGS.CustomTechniques.Title", name: "SETTINGS.CustomTechniques.Title",
hint: "SETTINGS.CustomTechniques.Hint", hint: "SETTINGS.CustomTechniques.Hint",
scope: "world", scope: "world",
@@ -40,7 +40,7 @@ export const RegisterSettings = function () {
/* ------------------------------------ */ /* ------------------------------------ */
/* Update */ /* Update */
/* ------------------------------------ */ /* ------------------------------------ */
game.settings.register("l5r5e", "systemMigrationVersion", { game.settings.register(CONFIG.l5r5e.systemName, "systemMigrationVersion", {
name: "System Migration Version", name: "System Migration Version",
scope: "world", scope: "world",
config: false, config: false,
@@ -51,7 +51,7 @@ export const RegisterSettings = function () {
/* ------------------------------------ */ /* ------------------------------------ */
/* Initiative Roll Dialog (GM only) */ /* Initiative Roll Dialog (GM only) */
/* ------------------------------------ */ /* ------------------------------------ */
game.settings.register("l5r5e", "initiative-difficulty-hidden", { game.settings.register(CONFIG.l5r5e.systemName, "initiative-difficulty-hidden", {
name: "Initiative difficulty is hidden", name: "Initiative difficulty is hidden",
scope: "world", scope: "world",
config: false, config: false,
@@ -59,7 +59,7 @@ export const RegisterSettings = function () {
default: false, default: false,
onChange: () => game.l5r5e.HelpersL5r5e.notifyDifficultyChange(), onChange: () => game.l5r5e.HelpersL5r5e.notifyDifficultyChange(),
}); });
game.settings.register("l5r5e", "initiative-difficulty-value", { game.settings.register(CONFIG.l5r5e.systemName, "initiative-difficulty-value", {
name: "Initiative difficulty value", name: "Initiative difficulty value",
scope: "world", scope: "world",
config: false, config: false,
@@ -67,20 +67,20 @@ export const RegisterSettings = function () {
default: 2, default: 2,
onChange: () => game.l5r5e.HelpersL5r5e.notifyDifficultyChange(), onChange: () => game.l5r5e.HelpersL5r5e.notifyDifficultyChange(),
}); });
game.settings.register("l5r5e", "initiative-encounter", { game.settings.register(CONFIG.l5r5e.systemName, "initiative-encounter", {
name: "Initiative encounter type", name: "Initiative encounter type",
scope: "world", scope: "world",
config: false, config: false,
type: String, type: String,
default: "skirmish", default: "skirmish",
onChange: () => { onChange: () => {
if (game.settings.get("l5r5e", "initiative-setTn1OnTypeChange")) { if (game.settings.get(CONFIG.l5r5e.systemName, "initiative-setTn1OnTypeChange")) {
game.settings.set("l5r5e", "initiative-difficulty-value", 1); game.settings.set(CONFIG.l5r5e.systemName, "initiative-difficulty-value", 1);
} }
ui.combat.render(true); ui.combat.render(true);
}, },
}); });
game.settings.register("l5r5e", "initiative-prepared-character", { game.settings.register(CONFIG.l5r5e.systemName, "initiative-prepared-character", {
name: "Initiative PC prepared or not", name: "Initiative PC prepared or not",
scope: "world", scope: "world",
config: false, config: false,
@@ -91,7 +91,7 @@ export const RegisterSettings = function () {
ui.combat.render(true); ui.combat.render(true);
}, },
}); });
game.settings.register("l5r5e", "initiative-prepared-adversary", { game.settings.register(CONFIG.l5r5e.systemName, "initiative-prepared-adversary", {
name: "Initiative NPC adversary are prepared or not", name: "Initiative NPC adversary are prepared or not",
scope: "world", scope: "world",
config: false, config: false,
@@ -102,7 +102,7 @@ export const RegisterSettings = function () {
ui.combat.render(true); ui.combat.render(true);
}, },
}); });
game.settings.register("l5r5e", "initiative-prepared-minion", { game.settings.register(CONFIG.l5r5e.systemName, "initiative-prepared-minion", {
name: "Initiative NPC minion are prepared or not", name: "Initiative NPC minion are prepared or not",
scope: "world", scope: "world",
config: false, config: false,
@@ -117,7 +117,7 @@ export const RegisterSettings = function () {
/* ------------------------------------ */ /* ------------------------------------ */
/* GM Monitor windows (GM only) */ /* GM Monitor windows (GM only) */
/* ------------------------------------ */ /* ------------------------------------ */
game.settings.register("l5r5e", "gm-monitor-actors", { game.settings.register(CONFIG.l5r5e.systemName, "gm-monitor-actors", {
name: "Gm Monitor", name: "Gm Monitor",
scope: "world", scope: "world",
config: false, config: false,

View File

@@ -54,7 +54,7 @@ export class SocketHandlerL5r5e {
_onDeleteChatMessage(payload) { _onDeleteChatMessage(payload) {
// Only delete the message if the user is a GM (otherwise it has no real effect) // Only delete the message if the user is a GM (otherwise it has no real effect)
// Currently only used in RnK // Currently only used in RnK
if (!game.user.isFirstGM || !game.settings.get("l5r5e", "rnk-deleteOldMessage")) { if (!game.user.isFirstGM || !game.settings.get(CONFIG.l5r5e.systemName, "rnk-deleteOldMessage")) {
return; return;
} }
game.messages.get(payload.messageId)?.delete(); game.messages.get(payload.messageId)?.delete();