Compare commits
7 Commits
fvtt-warhe
...
fvtt-warhe
| Author | SHA1 | Date | |
|---|---|---|---|
| 09974cd323 | |||
| 6b8710b94c | |||
| 6b7d943649 | |||
| c2a7fbb4b5 | |||
| 36c9945886 | |||
| bfad3d1e5f | |||
| 7827e07e1c |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.history/
|
||||||
25
lang/en.json
25
lang/en.json
@@ -2,7 +2,8 @@
|
|||||||
"ACTOR": {
|
"ACTOR": {
|
||||||
"TypeCharacter": "Character",
|
"TypeCharacter": "Character",
|
||||||
"TypeNpc": "NPC",
|
"TypeNpc": "NPC",
|
||||||
"TypeMonster": "Monster"
|
"TypeMonster": "Monster",
|
||||||
|
"TypeParty": "Party"
|
||||||
},
|
},
|
||||||
"ITEM": {
|
"ITEM": {
|
||||||
"TypeWeapon": "Weapon",
|
"TypeWeapon": "Weapon",
|
||||||
@@ -15,7 +16,6 @@
|
|||||||
"TypeLanguage": "Language",
|
"TypeLanguage": "Language",
|
||||||
"TypeCondition": "Condition",
|
"TypeCondition": "Condition",
|
||||||
"TypeClass": "Class",
|
"TypeClass": "Class",
|
||||||
"TypeGenericitem": "Class",
|
|
||||||
"TypeMoney": "Money",
|
"TypeMoney": "Money",
|
||||||
"TypePotion": "Potion",
|
"TypePotion": "Potion",
|
||||||
"TypePoison": "Poison",
|
"TypePoison": "Poison",
|
||||||
@@ -54,6 +54,23 @@
|
|||||||
"WH.conf.beltpouch1": "Beltpouch 1",
|
"WH.conf.beltpouch1": "Beltpouch 1",
|
||||||
"WH.conf.beltpouch2": "Beltpouch 2",
|
"WH.conf.beltpouch2": "Beltpouch 2",
|
||||||
"WH.conf.beltpouch3": "Beltpouch 3",
|
"WH.conf.beltpouch3": "Beltpouch 3",
|
||||||
|
"WH.conf.scrollcase": "Scroll case",
|
||||||
|
"WH.conf.wandcase": "Wand case",
|
||||||
|
"WH.conf.potioncase": "Potion case",
|
||||||
|
"WH.conf.bagholding": "Bag of holding",
|
||||||
|
"WH.conf.quiverholding": "Quiver of holding",
|
||||||
|
"WH.conf.backpackholding": "Backpack of holding",
|
||||||
|
"WH.conf.smallchest": "Small chest",
|
||||||
|
"WH.conf.mediumchest": "Medium chest",
|
||||||
|
"WH.conf.largechest": "Large chest",
|
||||||
|
"WH.conf.hugechest": "Huge chest",
|
||||||
|
"WH.conf.partystorage": "Party chest/storage",
|
||||||
|
|
||||||
|
"WH.conf.unknown": "Unknown",
|
||||||
|
"WH.conf.yes": "Yes",
|
||||||
|
"WH.conf.no": "No",
|
||||||
|
"WH.conf.notapplicable": "Not applicable",
|
||||||
|
"WH.conf.undefined": "Not applicable",
|
||||||
|
|
||||||
"WH.ui.level": "Level",
|
"WH.ui.level": "Level",
|
||||||
"WH.ui.notes": "Notes",
|
"WH.ui.notes": "Notes",
|
||||||
@@ -185,6 +202,10 @@
|
|||||||
"WH.ui.diseaseduration": "Disease duration",
|
"WH.ui.diseaseduration": "Disease duration",
|
||||||
"WH.ui.ignoreeffect": "Ignore effect",
|
"WH.ui.ignoreeffect": "Ignore effect",
|
||||||
"WH.ui.raceSkills": "Race skills",
|
"WH.ui.raceSkills": "Race skills",
|
||||||
|
"WH.ui.identified": "Identified",
|
||||||
|
|
||||||
|
"WH.ui.bodyslots": "Body",
|
||||||
|
"WH.ui.containerslot": "Containers",
|
||||||
|
|
||||||
"WH.chat.save": "Save",
|
"WH.chat.save": "Save",
|
||||||
"WH.chat.mweaponmalus": "Multiple weapons malus ",
|
"WH.chat.mweaponmalus": "Multiple weapons malus ",
|
||||||
|
|||||||
@@ -52,13 +52,12 @@ export class WarheroActorSheet extends ActorSheet {
|
|||||||
armors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getArmors())),
|
armors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getArmors())),
|
||||||
shields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getShields())),
|
shields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getShields())),
|
||||||
powers: this.actor.sortPowers(),
|
powers: this.actor.sortPowers(),
|
||||||
equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsOnly()) ),
|
|
||||||
slotEquipments: this.actor.buildEquipmentsSlot(),
|
|
||||||
subActors: duplicate(this.actor.getSubActors()),
|
subActors: duplicate(this.actor.getSubActors()),
|
||||||
competency: this.actor.getCompetency(),
|
competency: this.actor.getCompetency(),
|
||||||
race: duplicate(race),
|
race: duplicate(race),
|
||||||
class: duplicate(this.actor.getClass()),
|
classes: duplicate(this.actor.getClasses()),
|
||||||
totalMoney: this.actor.computeTotalMoney(),
|
totalMoney: this.actor.computeTotalMoney(),
|
||||||
|
equipments: duplicate(this.actor.getEquipmentsOnly()),
|
||||||
//moneys: duplicate(this.actor.getMoneys()),
|
//moneys: duplicate(this.actor.getMoneys()),
|
||||||
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
||||||
notes: await TextEditor.enrichHTML(this.object.system.biodata.notes, {async: true}),
|
notes: await TextEditor.enrichHTML(this.object.system.biodata.notes, {async: true}),
|
||||||
@@ -67,6 +66,12 @@ export class WarheroActorSheet extends ActorSheet {
|
|||||||
editScore: this.options.editScore,
|
editScore: this.options.editScore,
|
||||||
isGM: game.user.isGM
|
isGM: game.user.isGM
|
||||||
}
|
}
|
||||||
|
if (this.actor.type == "party") {
|
||||||
|
formData.partySlots = this.actor.buildPartySlots()
|
||||||
|
} else {
|
||||||
|
formData.equipmentContainers = this.actor.buildEquipmentsSlot()
|
||||||
|
formData.bodyContainers = this.actor.buildBodySlot()
|
||||||
|
}
|
||||||
// Dynamic patch
|
// Dynamic patch
|
||||||
formData.system.secondary.counterspell.hasmax = false
|
formData.system.secondary.counterspell.hasmax = false
|
||||||
// Race mngt
|
// Race mngt
|
||||||
|
|||||||
@@ -162,6 +162,11 @@ export class WarheroActor extends Actor {
|
|||||||
let classWH = this.items.filter(item => item.type == 'class')
|
let classWH = this.items.filter(item => item.type == 'class')
|
||||||
return classWH[0] ?? [];
|
return classWH[0] ?? [];
|
||||||
}
|
}
|
||||||
|
getClasses() {
|
||||||
|
let comp = duplicate(this.items.filter(item => item.type == "class") || []);
|
||||||
|
WarheroUtility.sortArrayObjectsByName(comp)
|
||||||
|
return comp;
|
||||||
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
checkAndPrepareEquipment(item) {
|
checkAndPrepareEquipment(item) {
|
||||||
}
|
}
|
||||||
@@ -176,22 +181,22 @@ export class WarheroActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
computeTotalMoney() {
|
computeTotalMoney() {
|
||||||
let nbMoney = 0
|
let nbMoney = 0
|
||||||
this.items.forEach(it => {if (it.type == 'money') { nbMoney += it.system.quantity} } )
|
this.items.forEach(it => { if (it.type == 'money') { nbMoney += it.system.quantity } })
|
||||||
return nbMoney
|
return nbMoney
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
buildEquipmentsSlot() {
|
buildPartySlots() {
|
||||||
let containers = {}
|
let containers = {}
|
||||||
for (let slotName in game.system.warhero.config.slotNames) {
|
for (let slotName in game.system.warhero.config.partySlotNames) {
|
||||||
let slotDef = game.system.warhero.config.slotNames[slotName]
|
let slotDef = game.system.warhero.config.partySlotNames[slotName]
|
||||||
containers[slotName] = duplicate(slotDef)
|
containers[slotName] = duplicate(slotDef)
|
||||||
containers[slotName].content = this.items.filter(it => (it.type == 'money' || it.type == 'weapon' || it.type == 'armor' || it.type == 'shield' || it.type == 'equipment')
|
containers[slotName].content = this.items.filter(it => (it.type == 'money' || it.type == 'weapon' || it.type == 'armor' || it.type == 'shield' || it.type == 'equipment') )
|
||||||
&& it.system.slotlocation == slotName)
|
|
||||||
let slotUsed = 0
|
let slotUsed = 0
|
||||||
for (let item of containers[slotName].content) {
|
for (let item of containers[slotName].content) {
|
||||||
let q = (item.system.quantity) ? item.system.quantity : 1
|
let q = (item.system.quantity) ? item.system.quantity : 1
|
||||||
containers[slotName].nbslots += (item.system.providedslot?? 0) * q
|
containers[slotName].nbslots += (item.system.providedslot ?? 0) * q
|
||||||
if ( item.type == "money") {
|
if (item.type == "money") {
|
||||||
slotUsed += Math.ceil(item.system.quantity / 1000)
|
slotUsed += Math.ceil(item.system.quantity / 1000)
|
||||||
} else {
|
} else {
|
||||||
slotUsed += item.system.slotused * q
|
slotUsed += item.system.slotused * q
|
||||||
@@ -202,6 +207,59 @@ export class WarheroActor extends Actor {
|
|||||||
}
|
}
|
||||||
return containers
|
return containers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
buildBodySlot() {
|
||||||
|
let containers = {}
|
||||||
|
for (let slotName in game.system.warhero.config.slotNames) {
|
||||||
|
let slotDef = game.system.warhero.config.slotNames[slotName]
|
||||||
|
if (!slotDef.container) {
|
||||||
|
containers[slotName] = duplicate(slotDef)
|
||||||
|
containers[slotName].content = this.items.filter(it => (it.type == 'money' || it.type == 'weapon' || it.type == 'armor' || it.type == 'shield' || it.type == 'equipment')
|
||||||
|
&& it.system.slotlocation == slotName)
|
||||||
|
let slotUsed = 0
|
||||||
|
for (let item of containers[slotName].content) {
|
||||||
|
let q = (item.system.quantity) ? item.system.quantity : 1
|
||||||
|
containers[slotName].nbslots += (item.system.providedslot ?? 0) * q
|
||||||
|
if (item.type == "money") {
|
||||||
|
slotUsed += Math.ceil(item.system.quantity / 1000)
|
||||||
|
} else {
|
||||||
|
slotUsed += item.system.slotused * q
|
||||||
|
}
|
||||||
|
}
|
||||||
|
slotUsed = Math.ceil(slotUsed)
|
||||||
|
containers[slotName].slotUsed = slotUsed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return containers
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
buildEquipmentsSlot() {
|
||||||
|
let containers = {}
|
||||||
|
for (let slotName in game.system.warhero.config.slotNames) {
|
||||||
|
let slotDef = game.system.warhero.config.slotNames[slotName]
|
||||||
|
if (slotDef.container) {
|
||||||
|
containers[slotName] = duplicate(slotDef)
|
||||||
|
containers[slotName].content = this.items.filter(it => (it.type == 'money' || it.type == 'weapon' || it.type == 'armor' || it.type == 'shield' || it.type == 'equipment')
|
||||||
|
&& it.system.slotlocation == slotName)
|
||||||
|
let slotUsed = 0
|
||||||
|
for (let item of containers[slotName].content) {
|
||||||
|
let q = (item.system.quantity) ? item.system.quantity : 1
|
||||||
|
containers[slotName].nbslots += (item.system.providedslot ?? 0) * q
|
||||||
|
if (item.type == "money") {
|
||||||
|
slotUsed += Math.ceil(item.system.quantity / 1000)
|
||||||
|
} else {
|
||||||
|
slotUsed += item.system.slotused * q
|
||||||
|
}
|
||||||
|
}
|
||||||
|
slotUsed = Math.ceil(slotUsed)
|
||||||
|
containers[slotName].slotUsed = slotUsed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return containers
|
||||||
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getConditions() {
|
getConditions() {
|
||||||
let comp = duplicate(this.items.filter(item => item.type == 'condition') || []);
|
let comp = duplicate(this.items.filter(item => item.type == 'condition') || []);
|
||||||
@@ -254,7 +312,7 @@ export class WarheroActor extends Actor {
|
|||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getNormalSkills() {
|
getNormalSkills() {
|
||||||
let comp = this.items.filter(it => it.type == "skill" && !it.system.classskill)
|
let comp = this.items.filter(it => it.type == "skill" && !it.system.classskill && !it.system.raceskill)
|
||||||
WarheroUtility.sortArrayObjectsByName(comp)
|
WarheroUtility.sortArrayObjectsByName(comp)
|
||||||
return comp
|
return comp
|
||||||
}
|
}
|
||||||
@@ -317,7 +375,7 @@ export class WarheroActor extends Actor {
|
|||||||
|
|
||||||
/* ------------------------------------------- */
|
/* ------------------------------------------- */
|
||||||
getEquipments() {
|
getEquipments() {
|
||||||
return this.items.filter(item => item.type == 'shield' || item.type == 'armor' || item.type == "weapon" || item.type == "equipment" || item.type == "potion" || item.type == "poison"|| item.type == "trap" || item.type == "classitem");
|
return this.items.filter(item => item.type == 'shield' || item.type == 'armor' || item.type == "weapon" || item.type == "equipment" || item.type == "potion" || item.type == "poison" || item.type == "trap" || item.type == "classitem");
|
||||||
}
|
}
|
||||||
getCompetencyItems() {
|
getCompetencyItems() {
|
||||||
return duplicate(this.items.filter(item => item.type == "competency") || [])
|
return duplicate(this.items.filter(item => item.type == "competency") || [])
|
||||||
@@ -480,7 +538,7 @@ export class WarheroActor extends Actor {
|
|||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async getInitiativeScore(combatId, combatantId) {
|
async getInitiativeScore(combatId, combatantId) {
|
||||||
let roll = new Roll("1d20+"+this.system.attributes.ini.value).roll({async: false})
|
let roll = new Roll("1d20+" + this.system.attributes.ini.value).roll({ async: false })
|
||||||
await WarheroUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"))
|
await WarheroUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"))
|
||||||
return roll.total
|
return roll.total
|
||||||
}
|
}
|
||||||
@@ -668,7 +726,7 @@ export class WarheroActor extends Actor {
|
|||||||
incrementUse(rollData) {
|
incrementUse(rollData) {
|
||||||
let stat = duplicate(this.system[rollData.mode][rollData.statKey])
|
let stat = duplicate(this.system[rollData.mode][rollData.statKey])
|
||||||
stat.nbuse++
|
stat.nbuse++
|
||||||
this.update( { [`system.${rollData.mode}.${rollData.statKey}`]: stat })
|
this.update({ [`system.${rollData.mode}.${rollData.statKey}`]: stat })
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@@ -690,11 +748,10 @@ export class WarheroActor extends Actor {
|
|||||||
rollData.mode = rollType
|
rollData.mode = rollType
|
||||||
rollData.statKey = rollKey
|
rollData.statKey = rollKey
|
||||||
rollData.stat = stat
|
rollData.stat = stat
|
||||||
if (stat && stat.stat)
|
if (stat && stat.stat) {
|
||||||
{
|
|
||||||
rollData.statBonus = duplicate(this.system.statistics[stat.stat])
|
rollData.statBonus = duplicate(this.system.statistics[stat.stat])
|
||||||
}
|
}
|
||||||
if ( stat.hasuse && stat.nbuse >= stat.maxuse) {
|
if (stat.hasuse && stat.nbuse >= stat.maxuse) {
|
||||||
ui.notifications.warn(game.i18n.localize("WH.notif.toomanyuses"))
|
ui.notifications.warn(game.i18n.localize("WH.notif.toomanyuses"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,10 @@ export const WARHERO_CONFIG = {
|
|||||||
tower: {parry: "5", label: "WH.conf.towershield"},
|
tower: {parry: "5", label: "WH.conf.towershield"},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
partySlotNames : {
|
||||||
|
storage: {nbslots: 2000, itemtype:"equipment", label: "WH.conf.partystorage"}
|
||||||
|
},
|
||||||
|
|
||||||
slotNames : {
|
slotNames : {
|
||||||
head: {nbslots: 1, itemtype:"armor", label: "WH.conf.head"},
|
head: {nbslots: 1, itemtype:"armor", label: "WH.conf.head"},
|
||||||
cloak: {nbslots: 1, itemtype:"equipment", label: "WH.conf.cloak"},
|
cloak: {nbslots: 1, itemtype:"equipment", label: "WH.conf.cloak"},
|
||||||
@@ -31,14 +35,24 @@ export const WARHERO_CONFIG = {
|
|||||||
ring: {nbslots: 10, itemtype:"equipment",label: "WH.conf.ring"},
|
ring: {nbslots: 10, itemtype:"equipment",label: "WH.conf.ring"},
|
||||||
dress: {nbslots: 1, itemtype:"equipment",label: "WH.conf.dress"},
|
dress: {nbslots: 1, itemtype:"equipment",label: "WH.conf.dress"},
|
||||||
boots: {nbslots: 1, itemtype:"equipment",label: "WH.conf.boots"},
|
boots: {nbslots: 1, itemtype:"equipment",label: "WH.conf.boots"},
|
||||||
belt: {nbslots: 6, itemtype:"equipment",label: "WH.conf.belt"},
|
|
||||||
quiver: {nbslots: 20, itemtype:"equipment",label: "WH.conf.quiver"},
|
|
||||||
armor: {nbslots: 1, itemtype:"armor",label: "WH.conf.armor"},
|
armor: {nbslots: 1, itemtype:"armor",label: "WH.conf.armor"},
|
||||||
shield: {nbslots: 1, itemtype:"shield",label: "WH.conf.shield"},
|
shield: {nbslots: 1, itemtype:"shield",label: "WH.conf.shield"},
|
||||||
backpack: {nbslots: 12, itemtype:"equipment",label: "WH.conf.backpack"},
|
belt: {nbslots: 6, itemtype:"equipment", container: true, available: true, parent: undefined, label: "WH.conf.belt"},
|
||||||
beltpouch1: {nbslots: 4, itemtype:"equipment",label: "WH.conf.beltpouch1"},
|
quiver: {nbslots: 20, itemtype:"equipment",container: true, available: true, parent: undefined, label: "WH.conf.quiver"},
|
||||||
beltpouch2: {nbslots: 4, itemtype:"equipment", label: "WH.conf.beltpouch2"},
|
backpack: {nbslots: 12, itemtype:"equipment",container: true, available: true, parent: undefined, label: "WH.conf.backpack"},
|
||||||
beltpouch3: {nbslots: 4, itemtype:"equipment", label: "WH.conf.beltpouch3"},
|
beltpouch1: {nbslots: 4, itemtype:"equipment",container: true, available: true, parent: undefined, label: "WH.conf.beltpouch1"},
|
||||||
|
beltpouch2: {nbslots: 4, itemtype:"equipment", container: true, available: true, parent: undefined, label: "WH.conf.beltpouch2"},
|
||||||
|
beltpouch3: {nbslots: 4, itemtype:"equipment", container: true, available: true, parent: undefined, label: "WH.conf.beltpouch3"},
|
||||||
|
scrollcase: {nbslots: 17, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.scrollcase"},
|
||||||
|
wandcase: {nbslots: 10, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.wandcase"},
|
||||||
|
potioncase: {nbslots: 8, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.potioncase"},
|
||||||
|
bagholding: {nbslots: 30, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.bagholding"},
|
||||||
|
quiverholding: {nbslots: 9999, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.quiverholding"},
|
||||||
|
backpackholding: {nbslots: 90, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.backpackholding"},
|
||||||
|
smallchest: {nbslots: 6, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.smallchest"},
|
||||||
|
mediumchest: {nbslots: 12, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.mediumchest"},
|
||||||
|
largechest: {nbslots: 24, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.largechest"},
|
||||||
|
hugechest: {nbslots: 24, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.hugechest"},
|
||||||
},
|
},
|
||||||
|
|
||||||
progressionList: {
|
progressionList: {
|
||||||
@@ -81,6 +95,13 @@ export const WARHERO_CONFIG = {
|
|||||||
untilendcombat: "WH.ui.untilendcombat",
|
untilendcombat: "WH.ui.untilendcombat",
|
||||||
beginturn: "WH.ui.beginturn",
|
beginturn: "WH.ui.beginturn",
|
||||||
endturn: "WH.ui.endturn"
|
endturn: "WH.ui.endturn"
|
||||||
|
},
|
||||||
|
|
||||||
|
identifiedState: {
|
||||||
|
unknown: "WH.conf.unknown",
|
||||||
|
yes:"WH.conf.yes",
|
||||||
|
no:"WH.conf.no",
|
||||||
|
notapplicable:"WH.conf.notapplicable"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
import { WarheroActor } from "./warhero-actor.js";
|
import { WarheroActor } from "./warhero-actor.js";
|
||||||
import { WarheroItemSheet } from "./warhero-item-sheet.js";
|
import { WarheroItemSheet } from "./warhero-item-sheet.js";
|
||||||
import { WarheroActorSheet } from "./warhero-actor-sheet.js";
|
import { WarheroActorSheet } from "./warhero-actor-sheet.js";
|
||||||
|
import { WarheroPartySheet } from "./warhero-party-sheet.js";
|
||||||
import { WarheroNPCSheet } from "./warhero-npc-sheet.js";
|
import { WarheroNPCSheet } from "./warhero-npc-sheet.js";
|
||||||
import { WarheroMonsterSheet } from "./warhero-monster-sheet.js";
|
import { WarheroMonsterSheet } from "./warhero-monster-sheet.js";
|
||||||
import { WarheroUtility } from "./warhero-utility.js";
|
import { WarheroUtility } from "./warhero-utility.js";
|
||||||
@@ -56,7 +57,6 @@ Hooks.once("init", async function () {
|
|||||||
CONFIG.Combat.documentClass = WarheroCombat
|
CONFIG.Combat.documentClass = WarheroCombat
|
||||||
CONFIG.Actor.documentClass = WarheroActor
|
CONFIG.Actor.documentClass = WarheroActor
|
||||||
CONFIG.Item.documentClass = WarheroItem
|
CONFIG.Item.documentClass = WarheroItem
|
||||||
//CONFIG.Token.objectClass = WarheroToken
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
// Register sheet application classes
|
// Register sheet application classes
|
||||||
@@ -64,6 +64,7 @@ Hooks.once("init", async function () {
|
|||||||
Actors.registerSheet("fvtt-warhero", WarheroActorSheet, { types: ["character"], makeDefault: true });
|
Actors.registerSheet("fvtt-warhero", WarheroActorSheet, { types: ["character"], makeDefault: true });
|
||||||
Actors.registerSheet("fvtt-warhero", WarheroNPCSheet, { types: ["npc"], makeDefault: false });
|
Actors.registerSheet("fvtt-warhero", WarheroNPCSheet, { types: ["npc"], makeDefault: false });
|
||||||
Actors.registerSheet("fvtt-warhero", WarheroMonsterSheet, { types: ["monster"], makeDefault: false });
|
Actors.registerSheet("fvtt-warhero", WarheroMonsterSheet, { types: ["monster"], makeDefault: false });
|
||||||
|
Actors.registerSheet("fvtt-warhero", WarheroPartySheet, { types: ["party"], makeDefault: false });
|
||||||
|
|
||||||
Items.unregisterSheet("core", ItemSheet);
|
Items.unregisterSheet("core", ItemSheet);
|
||||||
Items.registerSheet("fvtt-warhero", WarheroItemSheet, { makeDefault: true });
|
Items.registerSheet("fvtt-warhero", WarheroItemSheet, { makeDefault: true });
|
||||||
@@ -79,28 +80,15 @@ Hooks.once("ready", function () {
|
|||||||
// User warning
|
// User warning
|
||||||
if (!game.user.isGM && game.user.character == undefined) {
|
if (!game.user.isGM && game.user.character == undefined) {
|
||||||
ui.notifications.info("Warning ! No character linked to your user !");
|
ui.notifications.info("Warning ! No character linked to your user !");
|
||||||
/*ChatMessage.create({
|
|
||||||
content: "<b>WARNING</b> The player " + game.user.name + " is not linked to a character !",
|
|
||||||
user: game.user._id
|
|
||||||
});*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// CSS patch for v9
|
|
||||||
/*if (game.version) {
|
|
||||||
let sidebar = document.getElementById("sidebar");
|
|
||||||
sidebar.style.width = "min-content";
|
|
||||||
}*/
|
|
||||||
|
|
||||||
//welcomeMessage();
|
|
||||||
WarheroUtility.ready()
|
WarheroUtility.ready()
|
||||||
//WarheroHotbar.initDropbar()
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/* Foundry VTT Initialization */
|
/* Foundry VTT Initialization */
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
Hooks.on("chatMessage", (html, content, msg) => {
|
/*Hooks.on("chatMessage", (html, content, msg) => {
|
||||||
if (content[0] == '/') {
|
if (content[0] == '/') {
|
||||||
let regExp = /(\S+)/g;
|
let regExp = /(\S+)/g;
|
||||||
let commands = content.match(regExp);
|
let commands = content.match(regExp);
|
||||||
@@ -109,5 +97,5 @@ Hooks.on("chatMessage", (html, content, msg) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});*/
|
||||||
|
|
||||||
|
|||||||
57
modules/warhero-party-sheet.js
Normal file
57
modules/warhero-party-sheet.js
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/**
|
||||||
|
* Extend the basic ActorSheet with some very simple modifications
|
||||||
|
* @extends {ActorSheet}
|
||||||
|
*/
|
||||||
|
import { WarheroActorSheet } from "./warhero-actor-sheet.js";
|
||||||
|
import { WarheroUtility } from "./warhero-utility.js";
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
export class WarheroPartySheet extends WarheroActorSheet {
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static get defaultOptions() {
|
||||||
|
|
||||||
|
return mergeObject(super.defaultOptions, {
|
||||||
|
classes: ["warhero-rpg", "sheet", "actor"],
|
||||||
|
template: "systems/fvtt-warhero/templates/party-sheet.html",
|
||||||
|
width: 640,
|
||||||
|
height: 720,
|
||||||
|
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }],
|
||||||
|
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
|
||||||
|
editScore: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async getData() {
|
||||||
|
|
||||||
|
const objectData = duplicate(this.object.system)
|
||||||
|
|
||||||
|
let formData = {
|
||||||
|
title: this.title,
|
||||||
|
id: this.actor.id,
|
||||||
|
type: this.actor.type,
|
||||||
|
img: this.actor.img,
|
||||||
|
name: this.actor.name,
|
||||||
|
editable: this.isEditable,
|
||||||
|
cssClass: this.isEditable ? "editable" : "locked",
|
||||||
|
system: objectData,
|
||||||
|
limited: this.object.limited,
|
||||||
|
totalMoney: this.actor.computeTotalMoney(),
|
||||||
|
equipments: duplicate(this.actor.getEquipmentsOnly()),
|
||||||
|
//moneys: duplicate(this.actor.getMoneys()),
|
||||||
|
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
||||||
|
notes: await TextEditor.enrichHTML(this.object.system.biodata.notes, {async: true}),
|
||||||
|
options: this.options,
|
||||||
|
owner: this.document.isOwner,
|
||||||
|
editScore: this.options.editScore,
|
||||||
|
isGM: game.user.isGM
|
||||||
|
}
|
||||||
|
formData.partySlots = this.actor.buildPartySlots()
|
||||||
|
|
||||||
|
this.formData = formData
|
||||||
|
console.log("PARTY : ", formData, this.object);
|
||||||
|
return formData;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -231,6 +231,7 @@ export class WarheroUtility {
|
|||||||
'systems/fvtt-warhero/templates/partial-item-description.html',
|
'systems/fvtt-warhero/templates/partial-item-description.html',
|
||||||
'systems/fvtt-warhero/templates/partial-item-common-equipment.html',
|
'systems/fvtt-warhero/templates/partial-item-common-equipment.html',
|
||||||
'systems/fvtt-warhero/templates/partial-actor-equipment.html',
|
'systems/fvtt-warhero/templates/partial-actor-equipment.html',
|
||||||
|
'systems/fvtt-warhero/templates/partial-container.html',
|
||||||
]
|
]
|
||||||
return loadTemplates(templatePaths);
|
return loadTemplates(templatePaths);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -899,11 +899,10 @@ li {
|
|||||||
#sidebar #sidebar-tabs i{
|
#sidebar #sidebar-tabs i{
|
||||||
width: 23px;
|
width: 23px;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
display: inline-block;
|
/*display: inline-block;*/
|
||||||
background-position:center;
|
background-position:center;
|
||||||
background-size:cover;
|
background-size:cover;
|
||||||
text-shadow: 1px 1px 0 rgba(0,0,0,0.75);
|
text-shadow: 1px 1px 0 rgba(0,0,0,0.75);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-tab .directory-list .entity {
|
.sidebar-tab .directory-list .entity {
|
||||||
@@ -916,6 +915,7 @@ li {
|
|||||||
background: rgba(0, 0, 0, 0.05);
|
background: rgba(0, 0, 0, 0.05);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-message-header {
|
.chat-message-header {
|
||||||
background: rgba(220, 220, 210, 0.5);
|
background: rgba(220, 220, 210, 0.5);
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
@@ -930,6 +930,7 @@ li {
|
|||||||
.chat-message .message-header .whisper-to {
|
.chat-message .message-header .whisper-to {
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-actor-name {
|
.chat-actor-name {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
}
|
}
|
||||||
@@ -1491,11 +1492,22 @@ li {
|
|||||||
max-width: 22rem;
|
max-width: 22rem;
|
||||||
min-width: 22rem;
|
min-width: 22rem;
|
||||||
}
|
}
|
||||||
|
.item-name-label-long3 {
|
||||||
|
flex-grow: 2;
|
||||||
|
max-width: 32rem;
|
||||||
|
min-width: 32rem;
|
||||||
|
}
|
||||||
.item-name-label-level2 {
|
.item-name-label-level2 {
|
||||||
flex-grow: 2;
|
flex-grow: 2;
|
||||||
max-width: 9rem;
|
max-width: 9rem;
|
||||||
min-width: 9rem;
|
min-width: 9rem;
|
||||||
}
|
}
|
||||||
|
.item-field-label-2rem {
|
||||||
|
flex-grow: 1;
|
||||||
|
margin-top: 4px;
|
||||||
|
max-width: 1.2rem;
|
||||||
|
min-width: 1.2rem;
|
||||||
|
}
|
||||||
.item-field-label-short {
|
.item-field-label-short {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
"styles": [
|
"styles": [
|
||||||
"styles/simple.css"
|
"styles/simple.css"
|
||||||
],
|
],
|
||||||
"version": "10.0.35",
|
"version": "10.0.41",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "10",
|
"verified": "10",
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
},
|
},
|
||||||
"title": "Warhero RPG",
|
"title": "Warhero RPG",
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-warhero/raw/branch/master/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/fvtt-warhero/raw/branch/master/system.json",
|
||||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.35.zip",
|
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.41.zip",
|
||||||
"url": "https://www.uberwald.me/gitea/public/fvtt-warhero",
|
"url": "https://www.uberwald.me/gitea/public/fvtt-warhero",
|
||||||
"background": "images/ui/warhero_welcome_page.webp",
|
"background": "images/ui/warhero_welcome_page.webp",
|
||||||
"id": "fvtt-warhero"
|
"id": "fvtt-warhero"
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
"types": [
|
"types": [
|
||||||
"character",
|
"character",
|
||||||
"npc",
|
"npc",
|
||||||
"monster"
|
"monster",
|
||||||
|
"party"
|
||||||
],
|
],
|
||||||
"templates": {
|
"templates": {
|
||||||
"biodata": {
|
"biodata": {
|
||||||
@@ -212,6 +213,11 @@
|
|||||||
"description": ""
|
"description": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"party": {
|
||||||
|
"templates": [
|
||||||
|
"biodata"
|
||||||
|
]
|
||||||
|
},
|
||||||
"character": {
|
"character": {
|
||||||
"templates": [
|
"templates": [
|
||||||
"biodata",
|
"biodata",
|
||||||
@@ -243,7 +249,6 @@
|
|||||||
"language",
|
"language",
|
||||||
"condition",
|
"condition",
|
||||||
"class",
|
"class",
|
||||||
"genericitem",
|
|
||||||
"money",
|
"money",
|
||||||
"potion",
|
"potion",
|
||||||
"poison",
|
"poison",
|
||||||
@@ -280,7 +285,8 @@
|
|||||||
"cost": 0,
|
"cost": 0,
|
||||||
"quantity": 1,
|
"quantity": 1,
|
||||||
"slotused": 1,
|
"slotused": 1,
|
||||||
"slotlocation": "armor",
|
"slotlocation": "backpack",
|
||||||
|
"isidentified": "unknown",
|
||||||
"alchemycost": "",
|
"alchemycost": "",
|
||||||
"preparetime": "",
|
"preparetime": "",
|
||||||
"durationround": 0,
|
"durationround": 0,
|
||||||
@@ -290,7 +296,8 @@
|
|||||||
"cost": 0,
|
"cost": 0,
|
||||||
"quantity": 1,
|
"quantity": 1,
|
||||||
"slotused": 1,
|
"slotused": 1,
|
||||||
"slotlocation": "armor",
|
"slotlocation": "backpack",
|
||||||
|
"isidentified": "unknown",
|
||||||
"application": "",
|
"application": "",
|
||||||
"preparecost": "",
|
"preparecost": "",
|
||||||
"preparetime": "",
|
"preparetime": "",
|
||||||
@@ -304,7 +311,8 @@
|
|||||||
"cost": 0,
|
"cost": 0,
|
||||||
"quantity": 1,
|
"quantity": 1,
|
||||||
"slotused": 1,
|
"slotused": 1,
|
||||||
"slotlocation": "armor",
|
"slotlocation": "backpack",
|
||||||
|
"isidentified": "unknown",
|
||||||
"dcfind": 0,
|
"dcfind": 0,
|
||||||
"dcdisable": 0,
|
"dcdisable": 0,
|
||||||
"throwtohit": 0,
|
"throwtohit": 0,
|
||||||
@@ -315,7 +323,8 @@
|
|||||||
"cost": 0,
|
"cost": 0,
|
||||||
"quantity": 1,
|
"quantity": 1,
|
||||||
"slotused": 1,
|
"slotused": 1,
|
||||||
"slotlocation": "armor",
|
"slotlocation": "backpack",
|
||||||
|
"isidentified": "unknown",
|
||||||
"class": "",
|
"class": "",
|
||||||
"mandatoryfor": "",
|
"mandatoryfor": "",
|
||||||
"description": ""
|
"description": ""
|
||||||
@@ -325,9 +334,6 @@
|
|||||||
"slotlocation": "backpack",
|
"slotlocation": "backpack",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"genericitem": {
|
|
||||||
"description": ""
|
|
||||||
},
|
|
||||||
"condition": {
|
"condition": {
|
||||||
"conditiontype": "",
|
"conditiontype": "",
|
||||||
"duration": "",
|
"duration": "",
|
||||||
@@ -382,6 +388,7 @@
|
|||||||
"quantity": 1,
|
"quantity": 1,
|
||||||
"slotused": 1,
|
"slotused": 1,
|
||||||
"slotlocation": "weapon1",
|
"slotlocation": "weapon1",
|
||||||
|
"isidentified": "unknown",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"armor": {
|
"armor": {
|
||||||
@@ -392,6 +399,7 @@
|
|||||||
"quantity": 1,
|
"quantity": 1,
|
||||||
"slotused": 1,
|
"slotused": 1,
|
||||||
"slotlocation": "armor",
|
"slotlocation": "armor",
|
||||||
|
"isidentified": "unknown",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"shield": {
|
"shield": {
|
||||||
@@ -402,6 +410,7 @@
|
|||||||
"quantity": 1,
|
"quantity": 1,
|
||||||
"slotused": 1,
|
"slotused": 1,
|
||||||
"slotlocation": "shield",
|
"slotlocation": "shield",
|
||||||
|
"isidentified": "unknown",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"equipment": {
|
"equipment": {
|
||||||
@@ -412,6 +421,7 @@
|
|||||||
"slotused": 1,
|
"slotused": 1,
|
||||||
"slotlocation": "backpack",
|
"slotlocation": "backpack",
|
||||||
"providedslot": 0,
|
"providedslot": 0,
|
||||||
|
"isidentified": "unknown",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"power": {
|
"power": {
|
||||||
|
|||||||
@@ -27,14 +27,16 @@
|
|||||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow list-item" data-item-id="{{class._id}}">
|
{{#each classes as |class idx|}}
|
||||||
<label class="item-field-label-medium">{{localize "WH.ui.class"}}</label>
|
<li class="item flexrow list-item" data-item-id="{{class._id}}">
|
||||||
<a class="item-edit"><img class="sheet-competence-img" src="{{class.img}}"></a>
|
<label class="item-field-label-medium">{{localize "WH.ui.class"}}</label>
|
||||||
<input type="text" class="item-field-label-medium" disabled value="{{class.name}}" data-dtype="String" />
|
<a class="item-edit"><img class="sheet-competence-img" src="{{class.img}}"></a>
|
||||||
<div class="item-controls item-controls-fixed">
|
<input type="text" class="item-field-label-medium" disabled value="{{class.name}}" data-dtype="String" />
|
||||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
<div class="item-controls item-controls-fixed">
|
||||||
</div>
|
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||||
</li>
|
</div>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
<li class="item flexrow list-item" >
|
<li class="item flexrow list-item" >
|
||||||
<label class="item-field-label-medium">{{localize "WH.ui.religion"}}</label>
|
<label class="item-field-label-medium">{{localize "WH.ui.religion"}}</label>
|
||||||
<input type="text" class="item-field-label-medium" name="system.biodata.religion" value="{{system.biodata.religion}}" data-dtype="String" />
|
<input type="text" class="item-field-label-medium" name="system.biodata.religion" value="{{system.biodata.religion}}" data-dtype="String" />
|
||||||
@@ -458,10 +460,10 @@
|
|||||||
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{power._id}}">
|
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{power._id}}">
|
||||||
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
||||||
src="{{power.img}}" /></a>
|
src="{{power.img}}" /></a>
|
||||||
<span class="item-name-label">
|
<span class="item-name-label-long3">
|
||||||
<a class="power-roll"><i class="fa-solid fa-dice-d20"></i>{{power.name}}</a>
|
<a class="power-roll"><i class="fa-solid fa-dice-d20"></i>{{power.name}}</a>
|
||||||
</span>
|
</span>
|
||||||
<span class="item-name-label">
|
<span class="item-name-label-medium">
|
||||||
<a class="power-roll">{{power.system.level}}</a>
|
<a class="power-roll">{{power.system.level}}</a>
|
||||||
</span>
|
</span>
|
||||||
<div class="item-filler"> </div>
|
<div class="item-filler"> </div>
|
||||||
@@ -484,54 +486,19 @@
|
|||||||
<label class="">{{localize "WH.ui.totalmoney"}} : {{totalMoney}}</label>
|
<label class="">{{localize "WH.ui.totalmoney"}} : {{totalMoney}}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#each slotEquipments as |slot slotKey|}}
|
<hr>
|
||||||
<ul class="item-list alternate-list">
|
<h3>{{localize "WH.ui.bodyslots"}} : </h3>
|
||||||
<li class="item flexrow list-item items-title-bg {{#if (gt slot.slotUsed slot.nbslots)}}items-title-bg-red{{/if}}">
|
|
||||||
<span class="item-name-label-header">
|
|
||||||
<h3><label class="items-title-text">{{localize slot.label}}</label></h3>
|
|
||||||
</span>
|
|
||||||
<span class="item-field-label-medium">
|
|
||||||
<label class="short-label">{{localize "WH.ui.Type"}}</label>
|
|
||||||
</span>
|
|
||||||
<span class="item-field-label-long">
|
|
||||||
<label class="short-label">{{localize "WH.ui.Qty"}}</label>
|
|
||||||
</span>
|
|
||||||
<span class="item-field-label-medium">
|
|
||||||
<label class="short-label">{{localize "WH.ui.maxslots"}}: {{slot.nbslots}}</label>
|
|
||||||
</span>
|
|
||||||
<span class="item-field-label-medium">
|
|
||||||
<label class="short-label">{{localize "WH.ui.slotsused"}}: {{slot.slotUsed}}</label>
|
|
||||||
</span>
|
|
||||||
<div class="item-filler"> </div>
|
|
||||||
<div class="item-controls item-controls-fixed">
|
|
||||||
<a class="item-control item-add" data-type="{{itemtype}}" data-slot="{{slotKey}}" title="Create Item"><i class="fas fa-plus"></i></a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{#each slot.content as |item itemKey|}}
|
|
||||||
<li class="item flexrow list-item list-item-shadow" data-item-id="{{item._id}}">
|
|
||||||
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
|
||||||
src="{{item.img}}" /></a>
|
|
||||||
<span class="item-name-label">{{item.name}}</span>
|
|
||||||
|
|
||||||
<span class="item-field-label-medium">
|
{{#each bodyContainers as |slot slotKey|}}
|
||||||
<label class="short-label">{{upperFirst item.type}}</label>
|
{{> systems/fvtt-warhero/templates/partial-container.html slot=slot slotKey=slotKey}}
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="item-field-label-long"><label>
|
|
||||||
{{item.system.quantity}}
|
|
||||||
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
|
|
||||||
</label>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<div class="item-filler"> </div>
|
|
||||||
<div class="item-controls item-controls-fixed">
|
|
||||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h3>{{localize "WH.ui.containerslot"}} : </h3>
|
||||||
|
|
||||||
|
{{#each equipmentContainers as |slot slotKey|}}
|
||||||
|
{{> systems/fvtt-warhero/templates/partial-container.html slot=slot slotKey=slotKey}}
|
||||||
|
{{/each}}
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if hasuse}}
|
{{#if hasuse}}
|
||||||
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.nbuse" value="{{stat.nbuse}}" data-dtype="Number"/>
|
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.nbuse" value="{{stat.nbuse}}" data-dtype="Number"/>
|
||||||
|
<label class="item-field-label-2rem"> / </label>
|
||||||
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.maxuse" value="{{stat.maxuse}}" data-dtype="Number"/>
|
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.maxuse" value="{{stat.maxuse}}" data-dtype="Number"/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|||||||
49
templates/partial-container.html
Normal file
49
templates/partial-container.html
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<ul class="item-list alternate-list">
|
||||||
|
<li class="item flexrow list-item items-title-bg {{#if (gt slot.slotUsed slot.nbslots)}}items-title-bg-red{{/if}}">
|
||||||
|
<span class="item-name-label-header">
|
||||||
|
<h3><label class="items-title-text">{{localize slot.label}}</label></h3>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-medium">
|
||||||
|
<label class="short-label">{{localize "WH.ui.Type"}}</label>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-long">
|
||||||
|
<label class="short-label">{{localize "WH.ui.Qty"}}</label>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-medium">
|
||||||
|
<label class="short-label">{{localize "WH.ui.maxslots"}}: {{slot.nbslots}}</label>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-medium">
|
||||||
|
<label class="short-label">{{localize "WH.ui.slotsused"}}: {{slot.slotUsed}}</label>
|
||||||
|
</span>
|
||||||
|
<div class="item-filler"> </div>
|
||||||
|
<div class="item-controls item-controls-fixed">
|
||||||
|
<a class="item-control item-add" data-type="{{itemtype}}" data-slot="{{slotKey}}" title="Create Item"><i class="fas fa-plus"></i></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{#each slot.content as |item itemKey|}}
|
||||||
|
<li class="item flexrow list-item list-item-shadow" data-item-id="{{item._id}}">
|
||||||
|
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
||||||
|
src="{{item.img}}" /></a>
|
||||||
|
<span class="item-name-label">{{item.name}}</span>
|
||||||
|
|
||||||
|
<span class="item-field-label-medium">
|
||||||
|
<label class="short-label">{{upperFirst item.type}}</label>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span class="item-field-label-long"><label>
|
||||||
|
{{item.system.quantity}}
|
||||||
|
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
|
||||||
|
</label>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span class="item-field-label-medium">
|
||||||
|
<label class="short-label">{{localize (concat "WH.conf." item.system.isidentified)}}</label>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div class="item-filler"> </div>
|
||||||
|
<div class="item-controls item-controls-fixed">
|
||||||
|
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
@@ -10,7 +10,18 @@
|
|||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.quantity"}}</label>
|
|
||||||
|
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.identified"}}</label>
|
||||||
|
<select class="item-field-label-long " type="text" name="system.isidentified" value="{{system.isidentified}}" data-dtype="String">
|
||||||
|
{{#select system.isidentified}}
|
||||||
|
{{#each config.identifiedState as |type key|}}
|
||||||
|
<option value="{{key}}">{{localize type}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.quantity"}}</label>
|
||||||
<input type="text" class="item-field-label-medium " name="system.quantity" value="{{system.quantity}}" data-dtype="Number"/>
|
<input type="text" class="item-field-label-medium " name="system.quantity" value="{{system.quantity}}" data-dtype="Number"/>
|
||||||
</li>
|
</li>
|
||||||
<li class="flexrow"><label class="item-field-label-medium">{{localize "WH.ui.cost"}}</label>
|
<li class="flexrow"><label class="item-field-label-medium">{{localize "WH.ui.cost"}}</label>
|
||||||
|
|||||||
100
templates/party-sheet.html
Normal file
100
templates/party-sheet.html
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
|
|
||||||
|
{{!-- Sheet Header --}}
|
||||||
|
<header class="sheet-header">
|
||||||
|
<div class="header-fields">
|
||||||
|
<h1 class="charname margin-right"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
|
||||||
|
<div class="flexrow">
|
||||||
|
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
|
||||||
|
<div class="flexcol">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{{!-- Sheet Tab Navigation --}}
|
||||||
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
|
<a class="item" data-tab="equipment">{{localize "WH.ui.equipment"}}</a>
|
||||||
|
<a class="item" data-tab="biodata">{{localize "WH.ui.biography"}}</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
{{!-- Sheet Body --}}
|
||||||
|
<section class="sheet-body">
|
||||||
|
|
||||||
|
|
||||||
|
{{!-- Equipement Tab --}}
|
||||||
|
<div class="tab equipment" data-group="primary" data-tab="equipment">
|
||||||
|
|
||||||
|
{{#each partySlots as |slot slotKey|}}
|
||||||
|
<ul class="item-list alternate-list">
|
||||||
|
<li class="item flexrow list-item items-title-bg {{#if (gt slot.slotUsed slot.nbslots)}}items-title-bg-red{{/if}}">
|
||||||
|
<span class="item-name-label-header">
|
||||||
|
<h3><label class="items-title-text">{{localize slot.label}}</label></h3>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-medium">
|
||||||
|
<label class="short-label">{{localize "WH.ui.Type"}}</label>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-long">
|
||||||
|
<label class="short-label">{{localize "WH.ui.Qty"}}</label>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-medium">
|
||||||
|
<label class="short-label">{{localize "WH.ui.maxslots"}}: {{slot.nbslots}}</label>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-medium">
|
||||||
|
<label class="short-label">{{localize "WH.ui.slotsused"}}: {{slot.slotUsed}}</label>
|
||||||
|
</span>
|
||||||
|
<div class="item-filler"> </div>
|
||||||
|
<div class="item-controls item-controls-fixed">
|
||||||
|
<a class="item-control item-add" data-type="{{itemtype}}" title="Create Item"><i class="fas fa-plus"></i></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{#each slot.content as |item itemKey|}}
|
||||||
|
<li class="item flexrow list-item list-item-shadow" data-item-id="{{item._id}}">
|
||||||
|
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
||||||
|
src="{{item.img}}" /></a>
|
||||||
|
<span class="item-name-label">{{item.name}}</span>
|
||||||
|
|
||||||
|
<span class="item-field-label-medium">
|
||||||
|
<label class="short-label">{{upperFirst item.type}}</label>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span class="item-field-label-long"><label>
|
||||||
|
{{item.system.quantity}}
|
||||||
|
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
|
||||||
|
</label>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div class="item-filler"> </div>
|
||||||
|
<div class="item-controls item-controls-fixed">
|
||||||
|
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
{{/each}}
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- Biography Tab --}}
|
||||||
|
<div class="tab biodata" data-group="primary" data-tab="biodata">
|
||||||
|
<hr>
|
||||||
|
<h3>{{localize "WH.ui.background"}} : </h3>
|
||||||
|
<div class="form-group editor">
|
||||||
|
{{editor description target="system.biodata.description" button=true owner=owner
|
||||||
|
editable=editable}}
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<h3>{{localize "WH.ui.notes"}} : </h3>
|
||||||
|
<div class="form-group editor">
|
||||||
|
{{editor notes target="system.biodata.notes" button=true owner=owner editable=editable}}
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</form>
|
||||||
Reference in New Issue
Block a user