Enhance sheets and add skill+effects
This commit is contained in:
@@ -42,7 +42,9 @@ Hooks.once("init", async function () {
|
|||||||
background: models.AwEBackground,
|
background: models.AwEBackground,
|
||||||
kit: models.AwEKit,
|
kit: models.AwEKit,
|
||||||
weapon: models.AwEWeapon,
|
weapon: models.AwEWeapon,
|
||||||
equipment: models.AwEEquipment
|
equipment: models.AwEEquipment,
|
||||||
|
skill: models.AwESkill,
|
||||||
|
effect: models.AwEEffect
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register actor sheets
|
// Register actor sheets
|
||||||
@@ -80,6 +82,12 @@ Hooks.once("init", async function () {
|
|||||||
foundry.documents.collections.Items.registerSheet("fvtt-adventures-with-emmy", applications.AwEEquipmentSheet, {
|
foundry.documents.collections.Items.registerSheet("fvtt-adventures-with-emmy", applications.AwEEquipmentSheet, {
|
||||||
types: ["equipment"], makeDefault: true
|
types: ["equipment"], makeDefault: true
|
||||||
})
|
})
|
||||||
|
foundry.documents.collections.Items.registerSheet("fvtt-adventures-with-emmy", applications.AwESkillSheet, {
|
||||||
|
types: ["skill"], makeDefault: true
|
||||||
|
})
|
||||||
|
foundry.documents.collections.Items.registerSheet("fvtt-adventures-with-emmy", applications.AwEEffectSheet, {
|
||||||
|
types: ["effect"], makeDefault: true
|
||||||
|
})
|
||||||
|
|
||||||
CONFIG.ChatMessage.documentClass = documents.AwEChatMessage
|
CONFIG.ChatMessage.documentClass = documents.AwEChatMessage
|
||||||
CONFIG.Dice.rolls.push(documents.AwERoll)
|
CONFIG.Dice.rolls.push(documents.AwERoll)
|
||||||
|
|||||||
+8
-10
@@ -7,6 +7,8 @@
|
|||||||
"TYPES.Item.kit": "Kit",
|
"TYPES.Item.kit": "Kit",
|
||||||
"TYPES.Item.weapon": "Weapon",
|
"TYPES.Item.weapon": "Weapon",
|
||||||
"TYPES.Item.equipment": "Equipment",
|
"TYPES.Item.equipment": "Equipment",
|
||||||
|
"TYPES.Item.skill": "Skill",
|
||||||
|
"TYPES.Item.effect": "Effect",
|
||||||
"TYPES.Actor.character": "Hero",
|
"TYPES.Actor.character": "Hero",
|
||||||
"TYPES.Actor.creature": "Creature",
|
"TYPES.Actor.creature": "Creature",
|
||||||
"AWEMMY.Actor.Character": "Hero",
|
"AWEMMY.Actor.Character": "Hero",
|
||||||
@@ -31,7 +33,6 @@
|
|||||||
"AWEMMY.Condition.Slowed": "Slowed",
|
"AWEMMY.Condition.Slowed": "Slowed",
|
||||||
"AWEMMY.Condition.Vulnerable": "Vulnerable",
|
"AWEMMY.Condition.Vulnerable": "Vulnerable",
|
||||||
"AWEMMY.Condition.Panel": "Conditions",
|
"AWEMMY.Condition.Panel": "Conditions",
|
||||||
"AWEMMY.Roll.ConditionBonus": "Condition",
|
|
||||||
"AWEMMY.Item.Description": "Description",
|
"AWEMMY.Item.Description": "Description",
|
||||||
"AWEMMY.Item.RollBonus": "Roll Bonus",
|
"AWEMMY.Item.RollBonus": "Roll Bonus",
|
||||||
"AWEMMY.Error.TraitPasteFailed": "Failed to update traits — please try again.",
|
"AWEMMY.Error.TraitPasteFailed": "Failed to update traits — please try again.",
|
||||||
@@ -55,6 +56,10 @@
|
|||||||
"AWEMMY.Item.Kit": "Kit",
|
"AWEMMY.Item.Kit": "Kit",
|
||||||
"AWEMMY.Item.Weapon": "Weapon",
|
"AWEMMY.Item.Weapon": "Weapon",
|
||||||
"AWEMMY.Item.Equipment": "Equipment",
|
"AWEMMY.Item.Equipment": "Equipment",
|
||||||
|
"AWEMMY.Item.Skill": "Skill",
|
||||||
|
"AWEMMY.Skill.Label": "Skills",
|
||||||
|
"AWEMMY.Item.Effect": "Effect",
|
||||||
|
"AWEMMY.Effect.Label": "Active Effects",
|
||||||
"AWEMMY.Roll.CriticalSuccess": "Critical Success",
|
"AWEMMY.Roll.CriticalSuccess": "Critical Success",
|
||||||
"AWEMMY.Roll.Success": "Success",
|
"AWEMMY.Roll.Success": "Success",
|
||||||
"AWEMMY.Roll.Failure": "Failure",
|
"AWEMMY.Roll.Failure": "Failure",
|
||||||
@@ -76,6 +81,7 @@
|
|||||||
"AWEMMY.Sheet.Tab.Main": "Main",
|
"AWEMMY.Sheet.Tab.Main": "Main",
|
||||||
"AWEMMY.Sheet.Tab.Biography": "Biography",
|
"AWEMMY.Sheet.Tab.Biography": "Biography",
|
||||||
"AWEMMY.Sheet.Tab.Equipment": "Equipment",
|
"AWEMMY.Sheet.Tab.Equipment": "Equipment",
|
||||||
|
"AWEMMY.Sheet.Tab.Inventory": "Inventory",
|
||||||
"AWEMMY.Sheet.Tab.Description": "Description",
|
"AWEMMY.Sheet.Tab.Description": "Description",
|
||||||
"AWEMMY.Sheet.Tab.Eureka": "Eureka",
|
"AWEMMY.Sheet.Tab.Eureka": "Eureka",
|
||||||
"AWEMMY.Sheet.EditMode": "Edit",
|
"AWEMMY.Sheet.EditMode": "Edit",
|
||||||
@@ -91,14 +97,12 @@
|
|||||||
"AWEMMY.Character.Mod": "MOD",
|
"AWEMMY.Character.Mod": "MOD",
|
||||||
"AWEMMY.Character.DC": "DC",
|
"AWEMMY.Character.DC": "DC",
|
||||||
"AWEMMY.Character.Bonus": "+/−",
|
"AWEMMY.Character.Bonus": "+/−",
|
||||||
"AWEMMY.Character.Field": "Field",
|
|
||||||
"AWEMMY.Character.Attribute": "Attribute",
|
"AWEMMY.Character.Attribute": "Attribute",
|
||||||
"AWEMMY.Character.Attributes": "Attributes",
|
"AWEMMY.Character.Attributes": "Attributes",
|
||||||
"AWEMMY.Character.Identity": "Identity",
|
"AWEMMY.Character.Identity": "Identity",
|
||||||
"AWEMMY.Character.Description": "Description",
|
"AWEMMY.Character.Description": "Description",
|
||||||
"AWEMMY.Character.Notes": "Notes",
|
"AWEMMY.Character.Notes": "Notes",
|
||||||
"AWEMMY.Character.Pronouns": "Pronouns",
|
"AWEMMY.Character.Pronouns": "Pronouns",
|
||||||
"AWEMMY.Character.Specialization": "Specialization",
|
|
||||||
"AWEMMY.Character.DropField": "Drag & drop a Field item here",
|
"AWEMMY.Character.DropField": "Drag & drop a Field item here",
|
||||||
"AWEMMY.Character.DropSpecialization": "Drag & drop a Specialization item here",
|
"AWEMMY.Character.DropSpecialization": "Drag & drop a Specialization item here",
|
||||||
"AWEMMY.Character.DropArchetype": "Drag & drop Archetype items here",
|
"AWEMMY.Character.DropArchetype": "Drag & drop Archetype items here",
|
||||||
@@ -106,13 +110,10 @@
|
|||||||
"AWEMMY.Specialization.FieldName": "Parent Field",
|
"AWEMMY.Specialization.FieldName": "Parent Field",
|
||||||
"AWEMMY.Specialization.KeyAttributeOverride": "Key Attribute Override",
|
"AWEMMY.Specialization.KeyAttributeOverride": "Key Attribute Override",
|
||||||
"AWEMMY.Specialization.Traits": "Traits",
|
"AWEMMY.Specialization.Traits": "Traits",
|
||||||
"AWEMMY.Creature.EurekaRubric": "Eureka Rubric",
|
|
||||||
"AWEMMY.Creature.Claims": "Claims",
|
"AWEMMY.Creature.Claims": "Claims",
|
||||||
"AWEMMY.Creature.Evidence": "Evidence",
|
"AWEMMY.Creature.Evidence": "Evidence",
|
||||||
"AWEMMY.Creature.Hints": "Hints",
|
"AWEMMY.Creature.Hints": "Hints",
|
||||||
"AWEMMY.Creature.Threshold1": "Threshold 1",
|
"AWEMMY.Creature.Thresholds": "Thresholds",
|
||||||
"AWEMMY.Creature.Threshold2": "Threshold 2",
|
|
||||||
"AWEMMY.Creature.Threshold3": "Threshold 3",
|
|
||||||
"AWEMMY.Ability.CostLabel": "Cost",
|
"AWEMMY.Ability.CostLabel": "Cost",
|
||||||
"AWEMMY.Ability.Frequency": "Frequency",
|
"AWEMMY.Ability.Frequency": "Frequency",
|
||||||
"AWEMMY.Ability.Requirements": "Requirements",
|
"AWEMMY.Ability.Requirements": "Requirements",
|
||||||
@@ -141,8 +142,6 @@
|
|||||||
"AWEMMY.Weapon.CriticalHit": "Critical Hit!",
|
"AWEMMY.Weapon.CriticalHit": "Critical Hit!",
|
||||||
"AWEMMY.Field.KeyAttribute": "Key Attribute",
|
"AWEMMY.Field.KeyAttribute": "Key Attribute",
|
||||||
"AWEMMY.Field.KeyAttribute2": "Secondary Key Attribute",
|
"AWEMMY.Field.KeyAttribute2": "Secondary Key Attribute",
|
||||||
"AWEMMY.Field.Specializations": "Specializations",
|
|
||||||
"AWEMMY.Field.AddSpecialization": "Add specialization...",
|
|
||||||
"AWEMMY.Field.KnowledgeBonus": "Knowledge Bonus",
|
"AWEMMY.Field.KnowledgeBonus": "Knowledge Bonus",
|
||||||
"AWEMMY.Background.AttributeBoosts": "Attribute Boosts",
|
"AWEMMY.Background.AttributeBoosts": "Attribute Boosts",
|
||||||
"AWEMMY.Kit.Field": "Field",
|
"AWEMMY.Kit.Field": "Field",
|
||||||
@@ -159,7 +158,6 @@
|
|||||||
"AWEMMY.Rest.HPRestored": "Recovered {amount} HP (now {max}/{max})",
|
"AWEMMY.Rest.HPRestored": "Recovered {amount} HP (now {max}/{max})",
|
||||||
"AWEMMY.Rest.AbilitiesReset": "{count} daily ability(ies) reset",
|
"AWEMMY.Rest.AbilitiesReset": "{count} daily ability(ies) reset",
|
||||||
"AWEMMY.Rest.AlreadyRested": "Already at full health — no recovery needed.",
|
"AWEMMY.Rest.AlreadyRested": "Already at full health — no recovery needed.",
|
||||||
|
|
||||||
"AWEMMY.TAH.Stats": "Stats",
|
"AWEMMY.TAH.Stats": "Stats",
|
||||||
"AWEMMY.TAH.Combat": "Combat",
|
"AWEMMY.TAH.Combat": "Combat",
|
||||||
"AWEMMY.TAH.Items": "Items",
|
"AWEMMY.TAH.Items": "Items",
|
||||||
|
|||||||
@@ -8,3 +8,5 @@ export { default as AwEBackgroundSheet } from "./sheets/background-sheet.mjs"
|
|||||||
export { default as AwEKitSheet } from "./sheets/kit-sheet.mjs"
|
export { default as AwEKitSheet } from "./sheets/kit-sheet.mjs"
|
||||||
export { default as AwEWeaponSheet } from "./sheets/weapon-sheet.mjs"
|
export { default as AwEWeaponSheet } from "./sheets/weapon-sheet.mjs"
|
||||||
export { default as AwEEquipmentSheet } from "./sheets/equipment-sheet.mjs"
|
export { default as AwEEquipmentSheet } from "./sheets/equipment-sheet.mjs"
|
||||||
|
export { default as AwESkillSheet } from "./sheets/skill-sheet.mjs"
|
||||||
|
export { default as AwEEffectSheet } from "./sheets/effect-sheet.mjs"
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ export default class AwECharacterSheet extends AwEActorSheet {
|
|||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
createAbility: AwECharacterSheet.#onCreateAbility,
|
createAbility: AwECharacterSheet.#onCreateAbility,
|
||||||
|
createSkill: AwECharacterSheet.#onCreateSkill,
|
||||||
|
createEffect: AwECharacterSheet.#onCreateEffect,
|
||||||
createWeapon: AwECharacterSheet.#onCreateWeapon,
|
createWeapon: AwECharacterSheet.#onCreateWeapon,
|
||||||
createKit: AwECharacterSheet.#onCreateKit,
|
createKit: AwECharacterSheet.#onCreateKit,
|
||||||
createEquipment: AwECharacterSheet.#onCreateEquipment,
|
createEquipment: AwECharacterSheet.#onCreateEquipment,
|
||||||
@@ -94,6 +96,20 @@ export default class AwECharacterSheet extends AwEActorSheet {
|
|||||||
usedToday: item.system.usedToday
|
usedToday: item.system.usedToday
|
||||||
}))
|
}))
|
||||||
context.hasUsedAbilities = context.abilities.some(a => a.usedToday)
|
context.hasUsedAbilities = context.abilities.some(a => a.usedToday)
|
||||||
|
context.skills = doc.itemTypes.skill.map(item => ({
|
||||||
|
id: item.id,
|
||||||
|
uuid: item.uuid,
|
||||||
|
name: item.name,
|
||||||
|
img: item.img,
|
||||||
|
system: item.system
|
||||||
|
}))
|
||||||
|
context.effects = doc.itemTypes.effect.map(item => ({
|
||||||
|
id: item.id,
|
||||||
|
uuid: item.uuid,
|
||||||
|
name: item.name,
|
||||||
|
img: item.img,
|
||||||
|
system: item.system
|
||||||
|
}))
|
||||||
context.conditions = Object.values(SYSTEM.CONDITIONS).map(c => ({
|
context.conditions = Object.values(SYSTEM.CONDITIONS).map(c => ({
|
||||||
...c,
|
...c,
|
||||||
label: game.i18n.localize(c.label),
|
label: game.i18n.localize(c.label),
|
||||||
@@ -188,6 +204,26 @@ export default class AwECharacterSheet extends AwEActorSheet {
|
|||||||
this.document.createEmbeddedDocuments("Item", [{ name: CONFIG.Item.documentClass.defaultName({ type }), type }])
|
this.document.createEmbeddedDocuments("Item", [{ name: CONFIG.Item.documentClass.defaultName({ type }), type }])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new skill item.
|
||||||
|
* @param {Event} event - The triggering event.
|
||||||
|
* @param {HTMLElement} target - The target element.
|
||||||
|
*/
|
||||||
|
static #onCreateSkill(event, target) {
|
||||||
|
const type = "skill"
|
||||||
|
this.document.createEmbeddedDocuments("Item", [{ name: CONFIG.Item.documentClass.defaultName({ type }), type }])
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new effect item.
|
||||||
|
* @param {Event} event - The triggering event.
|
||||||
|
* @param {HTMLElement} target - The target element.
|
||||||
|
*/
|
||||||
|
static #onCreateEffect(event, target) {
|
||||||
|
const type = "effect"
|
||||||
|
this.document.createEmbeddedDocuments("Item", [{ name: CONFIG.Item.documentClass.defaultName({ type }), type }])
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new weapon item.
|
* Create a new weapon item.
|
||||||
* @param {Event} event - The triggering event.
|
* @param {Event} event - The triggering event.
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import AwEActorSheet from "./base-actor-sheet.mjs"
|
import AwEActorSheet from "./base-actor-sheet.mjs"
|
||||||
|
import { SYSTEM } from "../../config/system.mjs"
|
||||||
|
|
||||||
export default class AwECreatureSheet extends AwEActorSheet {
|
export default class AwECreatureSheet extends AwEActorSheet {
|
||||||
/** @override */
|
/** @override */
|
||||||
@@ -10,6 +11,16 @@ export default class AwECreatureSheet extends AwEActorSheet {
|
|||||||
},
|
},
|
||||||
window: {
|
window: {
|
||||||
contentClasses: ["creature-content"]
|
contentClasses: ["creature-content"]
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
createAbility: AwECreatureSheet.#onCreateAbility,
|
||||||
|
createSkill: AwECreatureSheet.#onCreateSkill,
|
||||||
|
createEffect: AwECreatureSheet.#onCreateEffect,
|
||||||
|
createWeapon: AwECreatureSheet.#onCreateWeapon,
|
||||||
|
createKit: AwECreatureSheet.#onCreateKit,
|
||||||
|
createEquipment: AwECreatureSheet.#onCreateEquipment,
|
||||||
|
rollWeapon: AwECreatureSheet.#onRollWeapon,
|
||||||
|
rollDamage: AwECreatureSheet.#onRollDamage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24,6 +35,9 @@ export default class AwECreatureSheet extends AwEActorSheet {
|
|||||||
main: {
|
main: {
|
||||||
template: "systems/fvtt-adventures-with-emmy/templates/creature-main.hbs"
|
template: "systems/fvtt-adventures-with-emmy/templates/creature-main.hbs"
|
||||||
},
|
},
|
||||||
|
inventory: {
|
||||||
|
template: "systems/fvtt-adventures-with-emmy/templates/creature-inventory.hbs"
|
||||||
|
},
|
||||||
description: {
|
description: {
|
||||||
template: "systems/fvtt-adventures-with-emmy/templates/creature-description.hbs"
|
template: "systems/fvtt-adventures-with-emmy/templates/creature-description.hbs"
|
||||||
},
|
},
|
||||||
@@ -39,9 +53,10 @@ export default class AwECreatureSheet extends AwEActorSheet {
|
|||||||
|
|
||||||
#getTabs() {
|
#getTabs() {
|
||||||
const tabs = {
|
const tabs = {
|
||||||
main: { id: "main", group: "sheet", icon: "fa-solid fa-dragon", label: "AWEMMY.Sheet.Tab.Main" },
|
main: { id: "main", group: "sheet", icon: "fa-solid fa-dragon", label: "AWEMMY.Sheet.Tab.Main" },
|
||||||
description: { id: "description", group: "sheet", icon: "fa-solid fa-scroll", label: "AWEMMY.Sheet.Tab.Description" },
|
inventory: { id: "inventory", group: "sheet", icon: "fa-solid fa-backpack", label: "AWEMMY.Sheet.Tab.Inventory" },
|
||||||
eureka: { id: "eureka", group: "sheet", icon: "fa-solid fa-lightbulb", label: "AWEMMY.Sheet.Tab.Eureka" }
|
description: { id: "description", group: "sheet", icon: "fa-solid fa-scroll", label: "AWEMMY.Sheet.Tab.Description" },
|
||||||
|
eureka: { id: "eureka", group: "sheet", icon: "fa-solid fa-lightbulb", label: "AWEMMY.Sheet.Tab.Eureka" }
|
||||||
}
|
}
|
||||||
for (const v of Object.values(tabs)) {
|
for (const v of Object.values(tabs)) {
|
||||||
v.active = this.tabGroups[v.group] === v.id
|
v.active = this.tabGroups[v.group] === v.id
|
||||||
@@ -65,6 +80,34 @@ export default class AwECreatureSheet extends AwEActorSheet {
|
|||||||
switch (partId) {
|
switch (partId) {
|
||||||
case "main":
|
case "main":
|
||||||
context.tab = context.tabs.main
|
context.tab = context.tabs.main
|
||||||
|
context.abilities = this.document.itemTypes.ability.map(item => ({
|
||||||
|
id: item.id,
|
||||||
|
uuid: item.uuid,
|
||||||
|
name: item.name,
|
||||||
|
img: item.img,
|
||||||
|
system: item.system,
|
||||||
|
costLabel: game.i18n.localize(SYSTEM.ABILITY_COST[item.system.cost]?.label ?? item.system.cost)
|
||||||
|
}))
|
||||||
|
context.skills = this.document.itemTypes.skill.map(item => ({
|
||||||
|
id: item.id,
|
||||||
|
uuid: item.uuid,
|
||||||
|
name: item.name,
|
||||||
|
img: item.img,
|
||||||
|
system: item.system
|
||||||
|
}))
|
||||||
|
context.effects = this.document.itemTypes.effect.map(item => ({
|
||||||
|
id: item.id,
|
||||||
|
uuid: item.uuid,
|
||||||
|
name: item.name,
|
||||||
|
img: item.img,
|
||||||
|
system: item.system
|
||||||
|
}))
|
||||||
|
break
|
||||||
|
case "inventory":
|
||||||
|
context.tab = context.tabs.inventory
|
||||||
|
context.kits = this.document.itemTypes.kit
|
||||||
|
context.weapons = this.document.itemTypes.weapon
|
||||||
|
context.equipments = this.document.itemTypes.equipment
|
||||||
break
|
break
|
||||||
case "description":
|
case "description":
|
||||||
context.tab = context.tabs.description
|
context.tab = context.tabs.description
|
||||||
@@ -75,4 +118,64 @@ export default class AwECreatureSheet extends AwEActorSheet {
|
|||||||
}
|
}
|
||||||
return context
|
return context
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
async _onDrop(event) {
|
||||||
|
if (!this.isEditable) return
|
||||||
|
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event)
|
||||||
|
if (data.type === "Item") {
|
||||||
|
const item = await fromUuid(data.uuid)
|
||||||
|
return this._onDropItem(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
async _onDropItem(item) {
|
||||||
|
if (!item) return
|
||||||
|
return super._onDropItem(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
static #onCreateAbility(event, target) {
|
||||||
|
const type = "ability"
|
||||||
|
this.document.createEmbeddedDocuments("Item", [{ name: CONFIG.Item.documentClass.defaultName({ type }), type }])
|
||||||
|
}
|
||||||
|
|
||||||
|
static #onCreateSkill(event, target) {
|
||||||
|
const type = "skill"
|
||||||
|
this.document.createEmbeddedDocuments("Item", [{ name: CONFIG.Item.documentClass.defaultName({ type }), type }])
|
||||||
|
}
|
||||||
|
|
||||||
|
static #onCreateEffect(event, target) {
|
||||||
|
const type = "effect"
|
||||||
|
this.document.createEmbeddedDocuments("Item", [{ name: CONFIG.Item.documentClass.defaultName({ type }), type }])
|
||||||
|
}
|
||||||
|
|
||||||
|
static #onCreateWeapon(event, target) {
|
||||||
|
const type = "weapon"
|
||||||
|
this.document.createEmbeddedDocuments("Item", [{ name: CONFIG.Item.documentClass.defaultName({ type }), type }])
|
||||||
|
}
|
||||||
|
|
||||||
|
static #onCreateKit(event, target) {
|
||||||
|
const type = "kit"
|
||||||
|
this.document.createEmbeddedDocuments("Item", [{ name: CONFIG.Item.documentClass.defaultName({ type }), type }])
|
||||||
|
}
|
||||||
|
|
||||||
|
static #onCreateEquipment(event, target) {
|
||||||
|
const type = "equipment"
|
||||||
|
this.document.createEmbeddedDocuments("Item", [{ name: CONFIG.Item.documentClass.defaultName({ type }), type }])
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #onRollWeapon(event, target) {
|
||||||
|
const itemId = target.closest("[data-item-id]")?.dataset.itemId
|
||||||
|
const item = this.document.items.get(itemId)
|
||||||
|
if (!item) return
|
||||||
|
await this.document.rollWeapon(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #onRollDamage(event, target) {
|
||||||
|
const itemId = target.closest("[data-item-id]")?.dataset.itemId
|
||||||
|
const item = this.document.items.get(itemId)
|
||||||
|
if (!item) return
|
||||||
|
await this.document.rollDamage(item)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import AwEItemSheet from "./base-item-sheet.mjs"
|
||||||
|
|
||||||
|
export default class AwEEffectSheet extends AwEItemSheet {
|
||||||
|
/** @override */
|
||||||
|
static DEFAULT_OPTIONS = {
|
||||||
|
classes: ["effect"],
|
||||||
|
position: { width: 500 },
|
||||||
|
window: { contentClasses: ["effect-content"] }
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static PARTS = {
|
||||||
|
main: {
|
||||||
|
template: "systems/fvtt-adventures-with-emmy/templates/effect.hbs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import AwEItemSheet from "./base-item-sheet.mjs"
|
||||||
|
|
||||||
|
export default class AwESkillSheet extends AwEItemSheet {
|
||||||
|
/** @override */
|
||||||
|
static DEFAULT_OPTIONS = {
|
||||||
|
classes: ["skill"],
|
||||||
|
position: { width: 500 },
|
||||||
|
window: { contentClasses: ["skill-content"] }
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static PARTS = {
|
||||||
|
main: {
|
||||||
|
template: "systems/fvtt-adventures-with-emmy/templates/skill.hbs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,3 +8,5 @@ export { default as AwEBackground } from "./background.mjs"
|
|||||||
export { default as AwEKit } from "./kit.mjs"
|
export { default as AwEKit } from "./kit.mjs"
|
||||||
export { default as AwEWeapon } from "./weapon.mjs"
|
export { default as AwEWeapon } from "./weapon.mjs"
|
||||||
export { default as AwEEquipment } from "./equipment.mjs"
|
export { default as AwEEquipment } from "./equipment.mjs"
|
||||||
|
export { default as AwESkill } from "./skill.mjs"
|
||||||
|
export { default as AwEEffect } from "./effect.mjs"
|
||||||
|
|||||||
@@ -37,11 +37,16 @@ export default class AwECreature extends foundry.abstract.TypeDataModel {
|
|||||||
// Eureka Rubric
|
// Eureka Rubric
|
||||||
schema.eurekaClaims = new fields.StringField({ initial: "", required: false, nullable: true })
|
schema.eurekaClaims = new fields.StringField({ initial: "", required: false, nullable: true })
|
||||||
schema.eurekaEvidence = new fields.StringField({ initial: "", required: false, nullable: true })
|
schema.eurekaEvidence = new fields.StringField({ initial: "", required: false, nullable: true })
|
||||||
schema.eurekaThreshold1 = new fields.StringField({ initial: "", required: false, nullable: true })
|
schema.eurekaThresholds = new fields.StringField({ initial: "", required: false, nullable: true })
|
||||||
schema.eurekaThreshold2 = new fields.StringField({ initial: "", required: false, nullable: true })
|
|
||||||
schema.eurekaThreshold3 = new fields.StringField({ initial: "", required: false, nullable: true })
|
|
||||||
schema.eurekaHints = new fields.StringField({ initial: "", required: false, nullable: true })
|
schema.eurekaHints = new fields.StringField({ initial: "", required: false, nullable: true })
|
||||||
|
|
||||||
return schema
|
return schema
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prepareDerivedData() {
|
||||||
|
super.prepareDerivedData()
|
||||||
|
for (const attr of Object.values(this.attributes)) {
|
||||||
|
attr.dc = 10 + attr.mod
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
export default class AwEEffect extends foundry.abstract.TypeDataModel {
|
||||||
|
static defineSchema() {
|
||||||
|
const fields = foundry.data.fields
|
||||||
|
const schema = {}
|
||||||
|
|
||||||
|
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||||
|
|
||||||
|
return schema
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
export default class AwESkill extends foundry.abstract.TypeDataModel {
|
||||||
|
static defineSchema() {
|
||||||
|
const fields = foundry.data.fields
|
||||||
|
const schema = {}
|
||||||
|
|
||||||
|
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||||
|
|
||||||
|
return schema
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
-1
@@ -25,7 +25,9 @@
|
|||||||
"background": { "htmlFields": ["description"] },
|
"background": { "htmlFields": ["description"] },
|
||||||
"kit": { "htmlFields": ["description"] },
|
"kit": { "htmlFields": ["description"] },
|
||||||
"weapon": { "htmlFields": ["description"] },
|
"weapon": { "htmlFields": ["description"] },
|
||||||
"equipment": { "htmlFields": ["description"] }
|
"equipment": { "htmlFields": ["description"] },
|
||||||
|
"skill": { "htmlFields": ["description"] },
|
||||||
|
"effect": { "htmlFields": ["description"] }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"grid": { "distance": 1, "units": "m" },
|
"grid": { "distance": 1, "units": "m" },
|
||||||
|
|||||||
@@ -84,6 +84,52 @@
|
|||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
{{!-- Skills --}}
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize "AWEMMY.Skill.Label"}}</legend>
|
||||||
|
<div class="item-list">
|
||||||
|
{{#each skills as |item|}}
|
||||||
|
<div class="item-row" data-drag="true" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{itemTooltip item}}">
|
||||||
|
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
|
||||||
|
<div class="item-name">{{item.name}}</div>
|
||||||
|
<div class="item-controls">
|
||||||
|
<a data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.EditItem'}}"><i class="fas fa-edit"></i></a>
|
||||||
|
{{#if ../isEditMode}}
|
||||||
|
<a data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.DeleteItem'}}"><i class="fas fa-trash"></i></a>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
{{#if isEditMode}}
|
||||||
|
<div class="item-add">
|
||||||
|
<button type="button" data-action="createSkill"><i class="fas fa-plus"></i> {{localize "AWEMMY.Item.Skill"}}</button>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
{{!-- Active Effects --}}
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize "AWEMMY.Effect.Label"}}</legend>
|
||||||
|
<div class="item-list">
|
||||||
|
{{#each effects as |item|}}
|
||||||
|
<div class="item-row" data-drag="true" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{itemTooltip item}}">
|
||||||
|
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
|
||||||
|
<div class="item-name">{{item.name}}</div>
|
||||||
|
<div class="item-controls">
|
||||||
|
<a data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.EditItem'}}"><i class="fas fa-edit"></i></a>
|
||||||
|
<a data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.DeleteItem'}}"><i class="fas fa-trash"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
{{#if isEditMode}}
|
||||||
|
<div class="item-add">
|
||||||
|
<button type="button" data-action="createEffect"><i class="fas fa-plus"></i> {{localize "AWEMMY.Item.Effect"}}</button>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
{{!-- Conditions --}}
|
{{!-- Conditions --}}
|
||||||
<fieldset class="conditions-fieldset">
|
<fieldset class="conditions-fieldset">
|
||||||
<legend>{{localize "AWEMMY.Condition.Panel"}}</legend>
|
<legend>{{localize "AWEMMY.Condition.Panel"}}</legend>
|
||||||
|
|||||||
@@ -12,19 +12,9 @@
|
|||||||
<textarea name="system.eurekaEvidence" rows="4" placeholder="{{localize 'AWEMMY.Creature.Evidence'}}…">{{system.eurekaEvidence}}</textarea>
|
<textarea name="system.eurekaEvidence" rows="4" placeholder="{{localize 'AWEMMY.Creature.Evidence'}}…">{{system.eurekaEvidence}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="eureka-columns">
|
<div class="eureka-field">
|
||||||
<div class="eureka-field">
|
<label>{{localize "AWEMMY.Creature.Thresholds"}}</label>
|
||||||
<label>{{localize "AWEMMY.Creature.Threshold1"}}</label>
|
<textarea name="system.eurekaThresholds" rows="4" placeholder="{{localize 'AWEMMY.Creature.Thresholds'}}…">{{system.eurekaThresholds}}</textarea>
|
||||||
<textarea name="system.eurekaThreshold1" rows="3" placeholder="{{localize 'AWEMMY.Creature.Threshold1'}}…">{{system.eurekaThreshold1}}</textarea>
|
|
||||||
</div>
|
|
||||||
<div class="eureka-field">
|
|
||||||
<label>{{localize "AWEMMY.Creature.Threshold2"}}</label>
|
|
||||||
<textarea name="system.eurekaThreshold2" rows="3" placeholder="{{localize 'AWEMMY.Creature.Threshold2'}}…">{{system.eurekaThreshold2}}</textarea>
|
|
||||||
</div>
|
|
||||||
<div class="eureka-field">
|
|
||||||
<label>{{localize "AWEMMY.Creature.Threshold3"}}</label>
|
|
||||||
<textarea name="system.eurekaThreshold3" rows="3" placeholder="{{localize 'AWEMMY.Creature.Threshold3'}}…">{{system.eurekaThreshold3}}</textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="eureka-field">
|
<div class="eureka-field">
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
<section class="tab creature-inventory {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
|
||||||
|
|
||||||
|
{{!-- Weapons --}}
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize "AWEMMY.Item.Weapon"}}</legend>
|
||||||
|
<div class="item-list">
|
||||||
|
{{#each weapons as |item|}}
|
||||||
|
<div class="item-row" data-drag="true" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{itemTooltip item}}">
|
||||||
|
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
|
||||||
|
<div class="item-name">{{item.name}}</div>
|
||||||
|
<div class="item-damage">{{item.system.damageFormula}} ({{item.system.damageType}})</div>
|
||||||
|
<div class="item-range">{{localize "AWEMMY.Weapon.Range"}}: {{item.system.range}}</div>
|
||||||
|
<div class="item-controls">
|
||||||
|
<a data-action="rollWeapon" data-item-id="{{item.id}}" data-tooltip="{{localize 'AWEMMY.Weapon.AttackRoll'}}"><i class="fas fa-dice-d20"></i></a>
|
||||||
|
<a data-action="rollDamage" data-item-id="{{item.id}}" data-tooltip="{{localize 'AWEMMY.Weapon.DamageRoll'}}"><i class="fas fa-burst"></i></a>
|
||||||
|
<a data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.EditItem'}}"><i class="fas fa-edit"></i></a>
|
||||||
|
{{#if ../isEditMode}}
|
||||||
|
<a data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.DeleteItem'}}"><i class="fas fa-trash"></i></a>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
{{#if isEditMode}}
|
||||||
|
<div class="item-add">
|
||||||
|
<button type="button" data-action="createWeapon"><i class="fas fa-plus"></i> {{localize "AWEMMY.Item.Weapon"}}</button>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
{{!-- Kits --}}
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize "AWEMMY.Item.Kit"}}</legend>
|
||||||
|
<div class="item-list">
|
||||||
|
{{#each kits as |item|}}
|
||||||
|
<div class="item-row" data-drag="true" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{itemTooltip item}}">
|
||||||
|
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
|
||||||
|
<div class="item-name">{{item.name}}</div>
|
||||||
|
<div class="item-controls">
|
||||||
|
<a data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.EditItem'}}"><i class="fas fa-edit"></i></a>
|
||||||
|
{{#if ../isEditMode}}
|
||||||
|
<a data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.DeleteItem'}}"><i class="fas fa-trash"></i></a>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
{{#if isEditMode}}
|
||||||
|
<div class="item-add">
|
||||||
|
<button type="button" data-action="createKit"><i class="fas fa-plus"></i> {{localize "AWEMMY.Item.Kit"}}</button>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
{{!-- Equipment --}}
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize "AWEMMY.Item.Equipment"}}</legend>
|
||||||
|
<div class="item-list">
|
||||||
|
{{#each equipments as |item|}}
|
||||||
|
<div class="item-row" data-drag="true" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{itemTooltip item}}">
|
||||||
|
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
|
||||||
|
<div class="item-name">{{item.name}}</div>
|
||||||
|
<div class="item-qty">x{{item.system.quantity}}</div>
|
||||||
|
<div class="item-controls">
|
||||||
|
<a data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.EditItem'}}"><i class="fas fa-edit"></i></a>
|
||||||
|
{{#if ../isEditMode}}
|
||||||
|
<a data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.DeleteItem'}}"><i class="fas fa-trash"></i></a>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
{{#if isEditMode}}
|
||||||
|
<div class="item-add">
|
||||||
|
<button type="button" data-action="createEquipment"><i class="fas fa-plus"></i> {{localize "AWEMMY.Item.Equipment"}}</button>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
</section>
|
||||||
@@ -15,25 +15,95 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="attr-label rollable" data-attribute-id="agility">{{localize "AWEMMY.Attribute.Agility"}} <i class="fa-solid fa-dice-d20"></i></td>
|
<td class="attr-label rollable" data-attribute-id="agility">{{localize "AWEMMY.Attribute.Agility"}} <i class="fa-solid fa-dice-d20"></i></td>
|
||||||
<td>{{formInput systemFields.attributes.fields.agility.fields.mod value=system.attributes.agility.mod}}</td>
|
<td>{{formInput systemFields.attributes.fields.agility.fields.mod value=system.attributes.agility.mod}}</td>
|
||||||
<td>{{formInput systemFields.attributes.fields.agility.fields.dc value=system.attributes.agility.dc}}</td>
|
<td class="attr-dc">{{system.attributes.agility.dc}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="attr-label rollable" data-attribute-id="fitness">{{localize "AWEMMY.Attribute.Fitness"}} <i class="fa-solid fa-dice-d20"></i></td>
|
<td class="attr-label rollable" data-attribute-id="fitness">{{localize "AWEMMY.Attribute.Fitness"}} <i class="fa-solid fa-dice-d20"></i></td>
|
||||||
<td>{{formInput systemFields.attributes.fields.fitness.fields.mod value=system.attributes.fitness.mod}}</td>
|
<td>{{formInput systemFields.attributes.fields.fitness.fields.mod value=system.attributes.fitness.mod}}</td>
|
||||||
<td>{{formInput systemFields.attributes.fields.fitness.fields.dc value=system.attributes.fitness.dc}}</td>
|
<td class="attr-dc">{{system.attributes.fitness.dc}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="attr-label rollable" data-attribute-id="awareness">{{localize "AWEMMY.Attribute.Awareness"}} <i class="fa-solid fa-dice-d20"></i></td>
|
<td class="attr-label rollable" data-attribute-id="awareness">{{localize "AWEMMY.Attribute.Awareness"}} <i class="fa-solid fa-dice-d20"></i></td>
|
||||||
<td>{{formInput systemFields.attributes.fields.awareness.fields.mod value=system.attributes.awareness.mod}}</td>
|
<td>{{formInput systemFields.attributes.fields.awareness.fields.mod value=system.attributes.awareness.mod}}</td>
|
||||||
<td>{{formInput systemFields.attributes.fields.awareness.fields.dc value=system.attributes.awareness.dc}}</td>
|
<td class="attr-dc">{{system.attributes.awareness.dc}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="attr-label rollable" data-attribute-id="influence">{{localize "AWEMMY.Attribute.Influence"}} <i class="fa-solid fa-dice-d20"></i></td>
|
<td class="attr-label rollable" data-attribute-id="influence">{{localize "AWEMMY.Attribute.Influence"}} <i class="fa-solid fa-dice-d20"></i></td>
|
||||||
<td>{{formInput systemFields.attributes.fields.influence.fields.mod value=system.attributes.influence.mod}}</td>
|
<td>{{formInput systemFields.attributes.fields.influence.fields.mod value=system.attributes.influence.mod}}</td>
|
||||||
<td>{{formInput systemFields.attributes.fields.influence.fields.dc value=system.attributes.influence.dc}}</td>
|
<td class="attr-dc">{{system.attributes.influence.dc}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
{{!-- Abilities --}}
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize "AWEMMY.Character.Repertoire"}}</legend>
|
||||||
|
<div class="item-list">
|
||||||
|
{{#each abilities as |item|}}
|
||||||
|
<div class="item-row" data-drag="true" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{itemTooltip item}}">
|
||||||
|
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
|
||||||
|
<div class="item-name">{{item.name}}</div>
|
||||||
|
<div class="item-cost">{{item.costLabel}}</div>
|
||||||
|
{{#if item.system.frequency}}<div class="item-frequency">{{item.system.frequency}}</div>{{/if}}
|
||||||
|
<div class="item-controls">
|
||||||
|
<a data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.EditItem'}}"><i class="fas fa-edit"></i></a>
|
||||||
|
{{#if ../isEditMode}}
|
||||||
|
<a data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.DeleteItem'}}"><i class="fas fa-trash"></i></a>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
{{#if isEditMode}}
|
||||||
|
<div class="item-add">
|
||||||
|
<button type="button" data-action="createAbility"><i class="fas fa-plus"></i> {{localize "AWEMMY.Item.Ability"}}</button>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
{{!-- Skills --}}
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize "AWEMMY.Skill.Label"}}</legend>
|
||||||
|
<div class="item-list">
|
||||||
|
{{#each skills as |item|}}
|
||||||
|
<div class="item-row" data-drag="true" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{itemTooltip item}}">
|
||||||
|
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
|
||||||
|
<div class="item-name">{{item.name}}</div>
|
||||||
|
<div class="item-controls">
|
||||||
|
<a data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.EditItem'}}"><i class="fas fa-edit"></i></a>
|
||||||
|
{{#if ../isEditMode}}
|
||||||
|
<a data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.DeleteItem'}}"><i class="fas fa-trash"></i></a>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
{{#if isEditMode}}
|
||||||
|
<div class="item-add">
|
||||||
|
<button type="button" data-action="createSkill"><i class="fas fa-plus"></i> {{localize "AWEMMY.Item.Skill"}}</button>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
{{!-- Active Effects --}}
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize "AWEMMY.Effect.Label"}}</legend>
|
||||||
|
<div class="item-list">
|
||||||
|
{{#each effects as |item|}}
|
||||||
|
<div class="item-row" data-drag="true" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{itemTooltip item}}">
|
||||||
|
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
|
||||||
|
<div class="item-name">{{item.name}}</div>
|
||||||
|
<div class="item-controls">
|
||||||
|
<a data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.EditItem'}}"><i class="fas fa-edit"></i></a>
|
||||||
|
<a data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'AWEMMY.Sheet.DeleteItem'}}"><i class="fas fa-trash"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
{{#if isEditMode}}
|
||||||
|
<div class="item-add">
|
||||||
|
<button type="button" data-action="createEffect"><i class="fas fa-plus"></i> {{localize "AWEMMY.Item.Effect"}}</button>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<section>
|
||||||
|
<div class="item-header">
|
||||||
|
<img class="item-img" src="{{item.img}}" data-edit="img" data-action="editImage" data-tooltip="{{item.name}}" />
|
||||||
|
{{formInput fields.name value=source.name}}
|
||||||
|
</div>
|
||||||
|
<div class="item-body">
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize "AWEMMY.Item.Description"}}</legend>
|
||||||
|
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<section>
|
||||||
|
<div class="item-header">
|
||||||
|
<img class="item-img" src="{{item.img}}" data-edit="img" data-action="editImage" data-tooltip="{{item.name}}" />
|
||||||
|
{{formInput fields.name value=source.name}}
|
||||||
|
</div>
|
||||||
|
<div class="item-body">
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize "AWEMMY.Item.Description"}}</legend>
|
||||||
|
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
Reference in New Issue
Block a user