fixes kinks in equipping weapons
parent
321ba7d3d6
commit
89d427b711
|
|
@ -174,13 +174,14 @@ export default {
|
||||||
const {itemId} = target.dataset
|
const {itemId} = target.dataset
|
||||||
const item = thisObject.document.items.get(itemId)
|
const item = thisObject.document.items.get(itemId)
|
||||||
console.log(item.system.category)
|
console.log(item.system.category)
|
||||||
return !thisObject.document.isWorn(itemId)
|
return !thisObject.document.isWorn(itemId) && item.system.category.indexOf("Munition") != -1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Ausrüsten",
|
name: "Ausrüsten",
|
||||||
callback: (target) => {
|
callback: (target) => {
|
||||||
//thisObject.deleteEmbeddedDocuments('Item', [event.dataset.id])
|
const updateObject = thisObject.document.getEquipmentSetUpdateObject()
|
||||||
|
|
||||||
},
|
},
|
||||||
condition: (target) => {
|
condition: (target) => {
|
||||||
const {itemId} = target.dataset
|
const {itemId} = target.dataset
|
||||||
|
|
@ -231,11 +232,11 @@ export default {
|
||||||
name: "Aus dem Inventar entfernen",
|
name: "Aus dem Inventar entfernen",
|
||||||
icon: '<i class="fa-solid fa-trash"></i>',
|
icon: '<i class="fa-solid fa-trash"></i>',
|
||||||
callback: (target) => {
|
callback: (target) => {
|
||||||
thisObject.deleteEmbeddedDocuments('Item', [target.dataset.id])
|
thisObject.document.deleteEmbeddedDocuments('Item', [target.dataset.itemId])
|
||||||
},
|
},
|
||||||
condition: (target) => {
|
condition: (target) => {
|
||||||
const {itemId} = target.dataset
|
const {itemId} = target.dataset
|
||||||
!thisObject.document.isWorn(itemId)
|
return !thisObject.document.isWorn(itemId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
], {jQuery: false});
|
], {jQuery: false});
|
||||||
|
|
|
||||||
|
|
@ -248,9 +248,9 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
name: obj.name,
|
name: obj.name,
|
||||||
using: links.name,
|
using: links.name,
|
||||||
atroll: `1d20cs<${this.document.system.at.links.aktuell + obj.system.at + links.system.attackModifier}`, // TODO consider adding W/M
|
atroll: `1d20cs<${this.document.system.at.links.aktuell + obj.system.at + links.system.attackModifier}`, // TODO consider adding W/M
|
||||||
at: `${object.system.at.links.aktuell + obj.system.at + links.system.attackModifier}`,
|
at: `${this.document.system.at.links.aktuell + obj.system.at + links.system.attackModifier}`,
|
||||||
paroll: `1d20cs<${this.document.system.pa.links.aktuell + obj.system.pa + links.system.parryModifier}`, // TODO consider adding W/M
|
paroll: `1d20cs<${this.document.system.pa.links.aktuell + obj.system.pa + links.system.parryModifier}`, // TODO consider adding W/M
|
||||||
pa: `${object.system.pa.links.aktuell + obj.system.pa + links.system.parryModifier}`,
|
pa: `${this.document.system.pa.links.aktuell + obj.system.pa + links.system.parryModifier}`,
|
||||||
tproll: `${links.system.meleeAttackDamage}`, // TODO consider adding TP/KK mod
|
tproll: `${links.system.meleeAttackDamage}`, // TODO consider adding TP/KK mod
|
||||||
tp: `${links.system.meleeAttackDamage}`,
|
tp: `${links.system.meleeAttackDamage}`,
|
||||||
iniroll: `(${context.inidice})d6 + ${context.inivalue + links.system.iniModifier ?? 0}`,
|
iniroll: `(${context.inidice})d6 + ${context.inivalue + links.system.iniModifier ?? 0}`,
|
||||||
|
|
@ -272,9 +272,9 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
name: obj.name,
|
name: obj.name,
|
||||||
using: rechts.name,
|
using: rechts.name,
|
||||||
atroll: `1d20cs<${this.document.system.at.rechts.aktuell + obj.system.at + rechts.system.attackModifier}`, // TODO consider adding W/M
|
atroll: `1d20cs<${this.document.system.at.rechts.aktuell + obj.system.at + rechts.system.attackModifier}`, // TODO consider adding W/M
|
||||||
at: `${object.system.at.rechts.aktuell + obj.system.at + rechts.system.attackModifier}`,
|
at: `${this.document.system.at.rechts.aktuell + obj.system.at + rechts.system.attackModifier}`,
|
||||||
paroll: `1d20cs<${this.document.system.pa.rechts.aktuell + obj.system.pa + rechts.system.parryModifier}`, // TODO consider adding W/M
|
paroll: `1d20cs<${this.document.system.pa.rechts.aktuell + obj.system.pa + rechts.system.parryModifier}`, // TODO consider adding W/M
|
||||||
pa: `${object.system.pa.rechts.aktuell + obj.system.pa + rechts.system.parryModifier}`,
|
pa: `${this.document.system.pa.rechts.aktuell + obj.system.pa + rechts.system.parryModifier}`,
|
||||||
tproll: `${rechts.system.meleeAttackDamage}`, // TODO consider adding TP/KK mod
|
tproll: `${rechts.system.meleeAttackDamage}`, // TODO consider adding TP/KK mod
|
||||||
tp: `${rechts.system.meleeAttackDamage}`,
|
tp: `${rechts.system.meleeAttackDamage}`,
|
||||||
iniroll: `(${context.inidice})d6 + ${context.inivalue + rechts.system.iniModifier ?? 0}`,
|
iniroll: `(${context.inidice})d6 + ${context.inivalue + rechts.system.iniModifier ?? 0}`,
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,20 @@
|
||||||
|
|
||||||
.inventory {
|
.inventory {
|
||||||
grid-area: inventory;
|
grid-area: inventory;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
flex: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inventory-table {
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
.equipment {
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.equipment:hover {
|
.equipment:hover {
|
||||||
.item-name {
|
.item-name {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue