#55 Added default item height in settings
This commit is contained in:
@@ -238,7 +238,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
return e.type === "technique" && e.system.technique_type === itemData.system.technique_type;
|
||||
})
|
||||
) {
|
||||
ui.notifications.info(game.i18n.localize("l5r5e.techniques.only_one"));
|
||||
ui.notifications.info("l5r5e.techniques.only_one", {localize: true});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
} else {
|
||||
// Check if technique is allowed for this character
|
||||
// if (!game.user.isGM && !this.actor.system.techniques[itemData.system.technique_type]) {
|
||||
// ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
|
||||
// ui.notifications.info("l5r5e.techniques.not_allowed", {localize: true});
|
||||
// return;
|
||||
// }
|
||||
|
||||
@@ -625,11 +625,11 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
|
||||
if (isInitiative) {
|
||||
if (!game.combat) {
|
||||
ui.notifications.warn(game.i18n.localize("COMBAT.NoneActive"));
|
||||
ui.notifications.warn("COMBAT.NoneActive", {localize: true});
|
||||
return;
|
||||
}
|
||||
if (!this.actor.canDoInitiativeRoll) {
|
||||
ui.notifications.error(game.i18n.localize("l5r5e.conflict.initiative.already_set"));
|
||||
ui.notifications.error("l5r5e.conflict.initiative.already_set", {localize: true});
|
||||
return;
|
||||
}
|
||||
// Minion specific
|
||||
|
||||
@@ -292,7 +292,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
}
|
||||
// } else if (!this.object.data.step3.allowed_techniques?.[item.system.technique_type]) {
|
||||
// // Tech not allowed
|
||||
// ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
|
||||
// ui.notifications.info("l5r5e.techniques.not_allowed", {localize: true});
|
||||
// return;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -530,7 +530,7 @@ export class DicePickerDialog extends FormApplication {
|
||||
// If initiative roll, check if player already have
|
||||
if (this.object.isInitiativeRoll) {
|
||||
if (!game.combat) {
|
||||
ui.notifications.warn(game.i18n.localize("COMBAT.NoneActive"));
|
||||
ui.notifications.warn("COMBAT.NoneActive", {localize: true});
|
||||
return this.close();
|
||||
}
|
||||
|
||||
@@ -678,15 +678,15 @@ export class DicePickerDialog extends FormApplication {
|
||||
name = name + " - " + this.object.skill.name;
|
||||
}
|
||||
|
||||
let command = `new game.l5r5e.DicePickerDialog(${JSON.stringify(params)}).render(true);`;
|
||||
const command = `new game.l5r5e.DicePickerDialog(${JSON.stringify(params)}).render(true);`;
|
||||
|
||||
let macro = game.macros.contents.find((m) => m.name === name && m.command === command);
|
||||
let macro = game.macros.contents.find((m) => m.name === name && m.command === command && m.isAuthor);
|
||||
if (!macro) {
|
||||
macro = await Macro.create({
|
||||
name: name,
|
||||
name,
|
||||
type: "script",
|
||||
scope: "global",
|
||||
command: command,
|
||||
command,
|
||||
img: this._actor?.img ? this._actor.img : "systems/l5r5e/assets/dices/default/ring_et.svg",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ export class HelpDialog extends FormApplication {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
const name = $(event.currentTarget).data("type");
|
||||
ui.notifications.info(game.i18n.localize(`l5r5e.logo.${name}.info`));
|
||||
ui.notifications.info(`l5r5e.logo.${name}.info`, {localize: true});
|
||||
window.open(game.i18n.localize(`l5r5e.logo.${name}.link`), "_blank");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -14,9 +14,6 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r5e", "sheet", "advancement"],
|
||||
template: CONFIG.l5r5e.paths.templates + "items/advancement/advancement-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,6 @@ export class ArmorSheetL5r5e extends ItemSheetL5r5e {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r5e", "sheet", "armor"],
|
||||
template: CONFIG.l5r5e.paths.templates + "items/armor/armor-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,6 @@ export class ArmyCohortSheetL5r5e extends ItemSheetL5r5e {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r5e", "sheet", "army-cohort"],
|
||||
template: CONFIG.l5r5e.paths.templates + "items/army-cohort/army-cohort-sheet.html",
|
||||
width: 520,
|
||||
height: 520,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "infos" }],
|
||||
dragDrop: [{ dragSelector: ".item", dropSelector: null }],
|
||||
});
|
||||
|
||||
@@ -9,9 +9,6 @@ export class ArmyFortificationSheetL5r5e extends ItemSheetL5r5e {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r5e", "sheet", "army-fortification"],
|
||||
template: CONFIG.l5r5e.paths.templates + "items/army-fortification/army-fortification-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ export class BaseItemSheetL5r5e extends ItemSheet {
|
||||
classes: ["l5r5e", "sheet", "item"],
|
||||
//template: CONFIG.l5r5e.paths.templates + "items/item/item-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
height: game.settings.get(CONFIG.l5r5e.namespace, "custom-items-windows-height") || 800,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
|
||||
@@ -9,9 +9,6 @@ export class BondSheetL5r5e extends ItemSheetL5r5e {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r5e", "sheet", "bond"],
|
||||
template: CONFIG.l5r5e.paths.templates + "items/bond/bond-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,6 @@ export class ItemPatternSheetL5r5e extends ItemSheetL5r5e {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r5e", "sheet", "item-pattern"],
|
||||
template: CONFIG.l5r5e.paths.templates + "items/item-pattern/item-pattern-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -10,9 +10,6 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r5e", "sheet", "item"],
|
||||
template: CONFIG.l5r5e.paths.templates + "items/item/item-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -15,9 +15,6 @@ export class PeculiaritySheetL5r5e extends ItemSheetL5r5e {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r5e", "sheet", "peculiarity"],
|
||||
template: CONFIG.l5r5e.paths.templates + "items/peculiarity/peculiarity-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,6 @@ export class PropertySheetL5r5e extends ItemSheetL5r5e {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r5e", "sheet", "property"],
|
||||
template: CONFIG.l5r5e.paths.templates + "items/property/property-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,6 @@ export class SignatureScrollSheetL5r5e extends ItemSheetL5r5e {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r5e", "sheet", "signature-scroll"],
|
||||
template: CONFIG.l5r5e.paths.templates + "items/signature-scroll/signature-scroll-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,6 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r5e", "sheet", "technique"],
|
||||
template: CONFIG.l5r5e.paths.templates + "items/technique/technique-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,6 @@ export class TitleSheetL5r5e extends ItemSheetL5r5e {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r5e", "sheet", "title"],
|
||||
template: CONFIG.l5r5e.paths.templates + "items/title/title-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,6 @@ export class WeaponSheetL5r5e extends ItemSheetL5r5e {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r5e", "sheet", "weapon"],
|
||||
template: CONFIG.l5r5e.paths.templates + "items/weapon/weapon-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,24 @@ export const RegisterSettings = function () {
|
||||
}
|
||||
});
|
||||
|
||||
/* ------------------------------------ */
|
||||
/* Client preferences */
|
||||
/* ------------------------------------ */
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "custom-items-windows-height", {
|
||||
name: "SETTINGS.CustomItemsHeight.Title",
|
||||
hint: "SETTINGS.CustomItemsHeight.Hint",
|
||||
scope: "client",
|
||||
config: true,
|
||||
requiresReload: true,
|
||||
type: Number,
|
||||
range: {
|
||||
min: 400,
|
||||
max: 2000,
|
||||
step: 50
|
||||
},
|
||||
default: 800,
|
||||
});
|
||||
|
||||
/* ------------------------------------ */
|
||||
/* Update */
|
||||
/* ------------------------------------ */
|
||||
|
||||
Reference in New Issue
Block a user