diff --git a/lang/en.json b/lang/en.json index c061d72..895df96 100644 --- a/lang/en.json +++ b/lang/en.json @@ -132,6 +132,9 @@ }, "Equipment": { "FIELDS": { + "encLoad": { + "label": "Load" + }, "cost": { "label": "Cost" }, @@ -238,7 +241,7 @@ "label": "Out of skill" } }, - "load": { + "encLoad": { "label": "Load" }, "cost": { @@ -256,22 +259,22 @@ "heavy": "Heavy" }, "FIELDS": { - "armortype": { + "armorType": { "label": "Category" }, "defense": { "label": "Defense" }, - "movementreduction": { - "label": "Movement reduction" + "maximumMovement": { + "label": "Maximum movement" }, "hp": { "label": "HP" }, - "damagereduction": { + "damageReduction": { "label": "Damage reduction" }, - "load": { + "encLoad": { "label": "Load" }, "cost": { @@ -334,7 +337,7 @@ "damagereduction": { "label": "Damage reduction" }, - "load": { + "encLoad": { "label": "Load" }, "cost": { diff --git a/lethal-fantasy.mjs b/lethal-fantasy.mjs index 37f201e..5ddcd19 100644 --- a/lethal-fantasy.mjs +++ b/lethal-fantasy.mjs @@ -46,7 +46,6 @@ Hooks.once("init", function () { armor: models.LethalFantasyArmor, shield: models.LethalFantasyShield, spell: models.LethalFantasySpell, - save: models.LethalFantasySave, vulnerability: models.LethalFantasyVulnerability, equipment: models.LethalFantasyEquipment, miracle: models.LethalFantasyMiracle @@ -61,7 +60,6 @@ Hooks.once("init", function () { Items.registerSheet("lethalFantasy", applications.LethalFantasySkillSheet, { types: ["skill"], makeDefault: true }) Items.registerSheet("lethalFantasy", applications.LethalFantasyGiftSheet, { types: ["gift"], makeDefault: true }) Items.registerSheet("lethalFantasy", applications.LethalFantasyVulnerabilitySheet, { types: ["vulnerability"], makeDefault: true }) - Items.registerSheet("lethalFantasy", applications.LethalFantasySaveSheet, { types: ["save"], makeDefault: true }) Items.registerSheet("lethalFantasy", applications.LethalFantasyWeaponSheet, { types: ["weapon"], makeDefault: true }) Items.registerSheet("lethalFantasy", applications.LethalFantasySpellSheet, { types: ["spell"], makeDefault: true }) Items.registerSheet("lethalFantasy", applications.LethalFantasyArmorSheet, { types: ["armor"], makeDefault: true }) diff --git a/module/applications/_module.mjs b/module/applications/_module.mjs index 2a93a30..bbd149e 100644 --- a/module/applications/_module.mjs +++ b/module/applications/_module.mjs @@ -4,7 +4,6 @@ export { default as LethalFantasyWeaponSheet } from "./sheets/weapon-sheet.mjs" export { default as LethalFantasySkillSheet } from "./sheets/skill-sheet.mjs" export { default as LethalFantasyGiftSheet } from "./sheets/gift-sheet.mjs" export { default as LethalFantasyVulnerabilitySheet } from "./sheets/vulnerability-sheet.mjs" -export { default as LethalFantasySaveSheet } from "./sheets/save-sheet.mjs" export { default as LethalFantasyArmorSheet } from "./sheets/armor-sheet.mjs" export { default as LethalFantasySpellSheet } from "./sheets/spell-sheet.mjs" export { default as LethalFantasyEquipmentSheet } from "./sheets/equipment-sheet.mjs" diff --git a/module/applications/sheets/armor-sheet.mjs b/module/applications/sheets/armor-sheet.mjs index 6be8a08..3119274 100644 --- a/module/applications/sheets/armor-sheet.mjs +++ b/module/applications/sheets/armor-sheet.mjs @@ -19,9 +19,12 @@ export default class LethalFantasyArmorSheet extends LethalFantasyItemSheet { }, } + /** @override */ async _prepareContext() { const context = await super._prepareContext() + context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true }) return context } + } diff --git a/module/applications/sheets/equipment-sheet.mjs b/module/applications/sheets/equipment-sheet.mjs index ea87928..dbeb156 100644 --- a/module/applications/sheets/equipment-sheet.mjs +++ b/module/applications/sheets/equipment-sheet.mjs @@ -22,6 +22,7 @@ export default class LethalFantasyEquipmentSheet extends LethalFantasyItemSheet /** @override */ async _prepareContext() { const context = await super._prepareContext() + context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true }) return context } } diff --git a/module/applications/sheets/miracle-sheet.mjs b/module/applications/sheets/miracle-sheet.mjs index d3816ce..e9b4afe 100644 --- a/module/applications/sheets/miracle-sheet.mjs +++ b/module/applications/sheets/miracle-sheet.mjs @@ -18,4 +18,12 @@ export default class LethalFantasyMiracleSheet extends LethalFantasyItemSheet { template: "systems/fvtt-lethal-fantasy/templates/miracle.hbs", }, } + + /** @override */ + async _prepareContext() { + const context = await super._prepareContext() + context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true }) + return context + } + } diff --git a/module/applications/sheets/save-sheet.mjs b/module/applications/sheets/save-sheet.mjs deleted file mode 100644 index b53767a..0000000 --- a/module/applications/sheets/save-sheet.mjs +++ /dev/null @@ -1,28 +0,0 @@ -import LethalFantasyItemSheet from "./base-item-sheet.mjs" - -export default class LethalFantasyGiftSheet extends LethalFantasyItemSheet { - /** @override */ - static DEFAULT_OPTIONS = { - classes: ["save"], - position: { - width: 600, - }, - window: { - contentClasses: ["save-content"], - }, - } - - /** @override */ - static PARTS = { - main: { - template: "systems/fvtt-lethal-fantasy/templates/save.hbs", - }, - } - - /** @override */ - async _prepareContext() { - const context = await super._prepareContext() - context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true }) - return context - } -} diff --git a/module/applications/sheets/shield-sheet.mjs b/module/applications/sheets/shield-sheet.mjs index 46e876e..30bc6df 100644 --- a/module/applications/sheets/shield-sheet.mjs +++ b/module/applications/sheets/shield-sheet.mjs @@ -22,6 +22,7 @@ export default class LethalFantasyShieldSheet extends LethalFantasyItemSheet { /** @override */ async _prepareContext() { const context = await super._prepareContext() + context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true }) return context } } diff --git a/module/applications/sheets/spell-sheet.mjs b/module/applications/sheets/spell-sheet.mjs index c5468d2..de7237c 100644 --- a/module/applications/sheets/spell-sheet.mjs +++ b/module/applications/sheets/spell-sheet.mjs @@ -18,4 +18,12 @@ export default class LethalFantasySpellSheet extends LethalFantasyItemSheet { template: "systems/fvtt-lethal-fantasy/templates/spell.hbs", }, } + + /** @override */ + async _prepareContext() { + const context = await super._prepareContext() + context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true }) + return context + } + } diff --git a/module/applications/sheets/weapon-sheet.mjs b/module/applications/sheets/weapon-sheet.mjs index 2c5d0f5..a8f8672 100644 --- a/module/applications/sheets/weapon-sheet.mjs +++ b/module/applications/sheets/weapon-sheet.mjs @@ -18,4 +18,12 @@ export default class LethalFantasyWeaponSheet extends LethalFantasyItemSheet { template: "systems/fvtt-lethal-fantasy/templates/weapon.hbs", }, } + + /** @override */ + async _prepareContext() { + const context = await super._prepareContext() + context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true }) + return context + } + } diff --git a/module/models/_module.mjs b/module/models/_module.mjs index fe0f8c3..3b6c0c9 100644 --- a/module/models/_module.mjs +++ b/module/models/_module.mjs @@ -7,6 +7,5 @@ export { default as LethalFantasyArmor } from "./armor.mjs" export { default as LethalFantasyShield } from "./shield.mjs" export { default as LethalFantasyGift } from "./gift.mjs" export { default as LethalFantasyVulnerability } from "./vulnerability.mjs" -export { default as LethalFantasySave } from "./save.mjs" export { default as LethalFantasyEquipment } from "./equipment.mjs" export { default as LethalFantasyMiracle } from "./miracle.mjs" diff --git a/module/models/armor.mjs b/module/models/armor.mjs index 00445c4..3d1839d 100644 --- a/module/models/armor.mjs +++ b/module/models/armor.mjs @@ -6,13 +6,13 @@ export default class LethalFantasyArmor extends foundry.abstract.TypeDataModel { const requiredInteger = { required: true, nullable: false, integer: true } schema.description = new fields.HTMLField({ required: true, textSearch: true }) - schema.armortype = new fields.StringField({ required: true, initial: "light", choices: SYSTEM.ARMOR_TYPE }) + schema.armorType = new fields.StringField({ required: true, initial: "light", choices: SYSTEM.ARMOR_TYPE }) schema.defense = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: -50 }) - schema.movementreduction = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) + schema.maximumMovement = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) schema.hp = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) - schema.damagereduction = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) + schema.damageReduction = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) - schema.load = new fields.StringField({ required: true, initial: "L" }) + schema.encLoad = new fields.NumberField({ required: true, initial: 0, min: 0 }) schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 }) schema.money = new fields.StringField({ required: true, initial: "tinbit", choices: SYSTEM.MONEY }) @@ -23,7 +23,4 @@ export default class LethalFantasyArmor extends foundry.abstract.TypeDataModel { /** @override */ static LOCALIZATION_PREFIXES = ["LETHALFANTASY.Armor"] - get weaponCategory() { - return game.i18n.localize(CATEGORY[this.category].label) - } } diff --git a/module/models/equipment.mjs b/module/models/equipment.mjs index c68dd3c..eea5455 100644 --- a/module/models/equipment.mjs +++ b/module/models/equipment.mjs @@ -9,7 +9,7 @@ export default class LethalFantasyEquipment extends foundry.abstract.TypeDataMod schema.description = new fields.HTMLField({ required: true, textSearch: true }) schema.category = new fields.StringField({ required: true, initial: "tinbit", choices: SYSTEM.EQUIPMENT_CATEGORIES }) - schema.load = new fields.StringField({ required: true, initial: "L" }) + schema.encLoad = new fields.NumberField({ required: true, initial: 0, min: 0 }) schema.hi = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) schema.medium = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) schema.lo = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) diff --git a/module/models/save.mjs b/module/models/save.mjs deleted file mode 100644 index 2bf2528..0000000 --- a/module/models/save.mjs +++ /dev/null @@ -1,17 +0,0 @@ -export default class LethalFantasySave extends foundry.abstract.TypeDataModel { - static defineSchema() { - const fields = foundry.data.fields - const requiredInteger = { required: true, nullable: false, integer: true } - const schema = {} - - schema.description = new fields.HTMLField({ required: true, textSearch: true }) - schema.cost = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) - schema.value = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) - - return schema - } - - /** @override */ - static LOCALIZATION_PREFIXES = ["LETHALFANTASY.Save"] - -} diff --git a/module/models/shield.mjs b/module/models/shield.mjs index c6f68bb..e0a0cee 100644 --- a/module/models/shield.mjs +++ b/module/models/shield.mjs @@ -28,7 +28,7 @@ export default class LethalFantasyShield extends foundry.abstract.TypeDataModel piercing: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) }) - schema.load = new fields.StringField({ required: true, initial: "L" }) + schema.encLoad = new fields.NumberField({ required: true, initial: 0, min: 0 }) schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 }) schema.money = new fields.StringField({ required: true, initial: "tinbit", choices: SYSTEM.MONEY }) diff --git a/module/models/weapon.mjs b/module/models/weapon.mjs index 20753fa..6c4be1b 100644 --- a/module/models/weapon.mjs +++ b/module/models/weapon.mjs @@ -40,7 +40,7 @@ export default class LethalFantasySkill extends foundry.abstract.TypeDataModel { outOfSkill: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) }) - schema.load = new fields.StringField({ required: true, initial: "L" }) + schema.encLoad = new fields.NumberField({ required: true, initial: 0, min: 0 }) schema.cost = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) schema.money = new fields.StringField({ required: true, initial: "tinbit", choices: SYSTEM.MONEY }) diff --git a/styles/fvtt-lethal-fantasy.less b/styles/fvtt-lethal-fantasy.less index ce3890d..c39bfba 100644 --- a/styles/fvtt-lethal-fantasy.less +++ b/styles/fvtt-lethal-fantasy.less @@ -10,7 +10,6 @@ @import "armor.less"; @import "spell.less"; @import "vulnerability.less"; - @import "save.less"; @import "chat.less"; @import "equipment.less"; @import "shield.less"; diff --git a/styles/save.less b/styles/save.less deleted file mode 100644 index ae03261..0000000 --- a/styles/save.less +++ /dev/null @@ -1,16 +0,0 @@ -.save-content { - .sheet-common(); - .item-sheet-common(); - - .header { - display: flex; - img { - width: 50px; - height: 50px; - } - } - - label { - flex: 10%; - } -} diff --git a/system.json b/system.json index 7c5ddaa..2e55e9b 100644 --- a/system.json +++ b/system.json @@ -6,7 +6,7 @@ "download": "#{DOWNLOAD}#", "url": "#{URL}#", "license": "LICENSE", - "version": "#{VERSION}#", + "version": "12.0.2", "authors": [ { "name": "Uberwald", @@ -35,7 +35,6 @@ "skill": { "htmlFields": ["description"] }, "gift": { "htmlFields": ["description"] }, "vulnerability": { "htmlFields": ["description"] }, - "save": { "htmlFields": ["description"] }, "weapon": { "htmlFields": ["description"] }, "armor": { "htmlFields": ["description"] }, "shield": { "htmlFields": ["description"] }, diff --git a/templates/armor.hbs b/templates/armor.hbs index 7ab06b3..a4f5be5 100644 --- a/templates/armor.hbs +++ b/templates/armor.hbs @@ -4,12 +4,12 @@ {{formInput fields.name value=source.name}} - {{formField systemFields.armortype value=system.armortype localize=true}} + {{formField systemFields.armorType value=system.armorType localize=true}} {{formField systemFields.defense value=system.defense}} - {{formField systemFields.movementreduction value=system.movementreduction}} + {{formField systemFields.maximumMovement value=system.maximumMovement}} {{formField systemFields.hp value=system.hp}} - {{formField systemFields.damagereduction value=system.damagereduction}} - {{formField systemFields.load value=system.load}} + {{formField systemFields.damageReduction value=system.damageReduction}} + {{formField systemFields.encLoad value=system.encLoad}} {{formField systemFields.cost value=system.cost}} {{formField systemFields.money value=system.money localize=true}} @@ -17,11 +17,11 @@
\ No newline at end of file diff --git a/templates/attack.hbs b/templates/attack.hbs deleted file mode 100644 index fabd4ba..0000000 --- a/templates/attack.hbs +++ /dev/null @@ -1,12 +0,0 @@ -