#55 Added default item height in settings
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
Date format : day/month/year
|
Date format : day/month/year
|
||||||
|
|
||||||
## 1.11.1 - ??/02/2024 - Compendium fix
|
## 1.11.1 - ??/05/2024 - Little fixes again
|
||||||
|
- Added ability to players to set their default Item's windows height in settings (#55).
|
||||||
- Moved `The blade with no name: Ancestral sword of the Dragon [Blessed Treasure]` from items to weapons compendium.
|
- Moved `The blade with no name: Ancestral sword of the Dragon [Blessed Treasure]` from items to weapons compendium.
|
||||||
|
|
||||||
## 1.11.0 - 13/12/2023 - Little fixes
|
## 1.11.0 - 13/12/2023 - Little fixes
|
||||||
|
|||||||
@@ -22,6 +22,10 @@
|
|||||||
"Title": "Custom Compendium Name",
|
"Title": "Custom Compendium Name",
|
||||||
"Hint": "For advanced users that want to change the name of the custom compendiums (Used to disables the embedded ones).",
|
"Hint": "For advanced users that want to change the name of the custom compendiums (Used to disables the embedded ones).",
|
||||||
"Notification": "Unable set Custom Compendium: '{name}'. Is it activated and registered with Babele?"
|
"Notification": "Unable set Custom Compendium: '{name}'. Is it activated and registered with Babele?"
|
||||||
|
},
|
||||||
|
"CustomItemsHeight": {
|
||||||
|
"Title": "Default items windows height",
|
||||||
|
"Hint": "Set the default height for 'Items' windows types (techniques, weapons...), in pixels"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"TYPES": {
|
"TYPES": {
|
||||||
|
|||||||
@@ -22,6 +22,10 @@
|
|||||||
"Title": "Nom du CustomCompendium",
|
"Title": "Nom du CustomCompendium",
|
||||||
"Hint": "Pour les utilisateurs avancés qui souhaitent modifier le nom du compendium personnalisé (utilisé pour désactiver ceux intégrés).",
|
"Hint": "Pour les utilisateurs avancés qui souhaitent modifier le nom du compendium personnalisé (utilisé pour désactiver ceux intégrés).",
|
||||||
"Notification": "Impossible de définir le compendium personnalisé : '{name}'. Est-il activé et enregistré auprès de Babele ?"
|
"Notification": "Impossible de définir le compendium personnalisé : '{name}'. Est-il activé et enregistré auprès de Babele ?"
|
||||||
|
},
|
||||||
|
"CustomItemsHeight": {
|
||||||
|
"Title": "Hauteur par défaut des fenêtres d'objets",
|
||||||
|
"Hint": "Définir la hauteur par défaut des fenêtres de type Item (techniques, armes...) en pixels"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"TYPES": {
|
"TYPES": {
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
return e.type === "technique" && e.system.technique_type === itemData.system.technique_type;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
} else {
|
} else {
|
||||||
// Check if technique is allowed for this character
|
// Check if technique is allowed for this character
|
||||||
// if (!game.user.isGM && !this.actor.system.techniques[itemData.system.technique_type]) {
|
// 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;
|
// return;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@@ -625,11 +625,11 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
|
|
||||||
if (isInitiative) {
|
if (isInitiative) {
|
||||||
if (!game.combat) {
|
if (!game.combat) {
|
||||||
ui.notifications.warn(game.i18n.localize("COMBAT.NoneActive"));
|
ui.notifications.warn("COMBAT.NoneActive", {localize: true});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.actor.canDoInitiativeRoll) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
// Minion specific
|
// Minion specific
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
}
|
}
|
||||||
// } else if (!this.object.data.step3.allowed_techniques?.[item.system.technique_type]) {
|
// } else if (!this.object.data.step3.allowed_techniques?.[item.system.technique_type]) {
|
||||||
// // Tech not allowed
|
// // Tech not allowed
|
||||||
// ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
|
// ui.notifications.info("l5r5e.techniques.not_allowed", {localize: true});
|
||||||
// return;
|
// return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
// If initiative roll, check if player already have
|
// If initiative roll, check if player already have
|
||||||
if (this.object.isInitiativeRoll) {
|
if (this.object.isInitiativeRoll) {
|
||||||
if (!game.combat) {
|
if (!game.combat) {
|
||||||
ui.notifications.warn(game.i18n.localize("COMBAT.NoneActive"));
|
ui.notifications.warn("COMBAT.NoneActive", {localize: true});
|
||||||
return this.close();
|
return this.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -678,15 +678,15 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
name = name + " - " + this.object.skill.name;
|
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) {
|
if (!macro) {
|
||||||
macro = await Macro.create({
|
macro = await Macro.create({
|
||||||
name: name,
|
name,
|
||||||
type: "script",
|
type: "script",
|
||||||
scope: "global",
|
scope: "global",
|
||||||
command: command,
|
command,
|
||||||
img: this._actor?.img ? this._actor.img : "systems/l5r5e/assets/dices/default/ring_et.svg",
|
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.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
const name = $(event.currentTarget).data("type");
|
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");
|
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, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["l5r5e", "sheet", "advancement"],
|
classes: ["l5r5e", "sheet", "advancement"],
|
||||||
template: CONFIG.l5r5e.paths.templates + "items/advancement/advancement-sheet.html",
|
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, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["l5r5e", "sheet", "armor"],
|
classes: ["l5r5e", "sheet", "armor"],
|
||||||
template: CONFIG.l5r5e.paths.templates + "items/armor/armor-sheet.html",
|
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, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["l5r5e", "sheet", "army-cohort"],
|
classes: ["l5r5e", "sheet", "army-cohort"],
|
||||||
template: CONFIG.l5r5e.paths.templates + "items/army-cohort/army-cohort-sheet.html",
|
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" }],
|
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "infos" }],
|
||||||
dragDrop: [{ dragSelector: ".item", dropSelector: null }],
|
dragDrop: [{ dragSelector: ".item", dropSelector: null }],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,9 +9,6 @@ export class ArmyFortificationSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["l5r5e", "sheet", "army-fortification"],
|
classes: ["l5r5e", "sheet", "army-fortification"],
|
||||||
template: CONFIG.l5r5e.paths.templates + "items/army-fortification/army-fortification-sheet.html",
|
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"],
|
classes: ["l5r5e", "sheet", "item"],
|
||||||
//template: CONFIG.l5r5e.paths.templates + "items/item/item-sheet.html",
|
//template: CONFIG.l5r5e.paths.templates + "items/item/item-sheet.html",
|
||||||
width: 520,
|
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" }],
|
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,9 +9,6 @@ export class BondSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["l5r5e", "sheet", "bond"],
|
classes: ["l5r5e", "sheet", "bond"],
|
||||||
template: CONFIG.l5r5e.paths.templates + "items/bond/bond-sheet.html",
|
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, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["l5r5e", "sheet", "item-pattern"],
|
classes: ["l5r5e", "sheet", "item-pattern"],
|
||||||
template: CONFIG.l5r5e.paths.templates + "items/item-pattern/item-pattern-sheet.html",
|
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, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["l5r5e", "sheet", "item"],
|
classes: ["l5r5e", "sheet", "item"],
|
||||||
template: CONFIG.l5r5e.paths.templates + "items/item/item-sheet.html",
|
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, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["l5r5e", "sheet", "peculiarity"],
|
classes: ["l5r5e", "sheet", "peculiarity"],
|
||||||
template: CONFIG.l5r5e.paths.templates + "items/peculiarity/peculiarity-sheet.html",
|
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, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["l5r5e", "sheet", "property"],
|
classes: ["l5r5e", "sheet", "property"],
|
||||||
template: CONFIG.l5r5e.paths.templates + "items/property/property-sheet.html",
|
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, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["l5r5e", "sheet", "signature-scroll"],
|
classes: ["l5r5e", "sheet", "signature-scroll"],
|
||||||
template: CONFIG.l5r5e.paths.templates + "items/signature-scroll/signature-scroll-sheet.html",
|
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, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["l5r5e", "sheet", "technique"],
|
classes: ["l5r5e", "sheet", "technique"],
|
||||||
template: CONFIG.l5r5e.paths.templates + "items/technique/technique-sheet.html",
|
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, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["l5r5e", "sheet", "title"],
|
classes: ["l5r5e", "sheet", "title"],
|
||||||
template: CONFIG.l5r5e.paths.templates + "items/title/title-sheet.html",
|
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, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["l5r5e", "sheet", "weapon"],
|
classes: ["l5r5e", "sheet", "weapon"],
|
||||||
template: CONFIG.l5r5e.paths.templates + "items/weapon/weapon-sheet.html",
|
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 */
|
/* Update */
|
||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
|
|||||||
Reference in New Issue
Block a user