Compare commits
No commits in common. "5104f43e2fe3533dc44eaebd02d62faac49d79a3" and "223ea9e26b79e8611c874b24dd449d484a73450f" have entirely different histories.
5104f43e2f
...
223ea9e26b
|
|
@ -82,7 +82,7 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
},
|
},
|
||||||
equipment: {
|
equipment: {
|
||||||
template: Equipment.template,
|
template: Equipment.template,
|
||||||
scrollable: ['.inventory']
|
scrollable: ['']
|
||||||
},
|
},
|
||||||
skills: {
|
skills: {
|
||||||
template: Skills.template
|
template: Skills.template
|
||||||
|
|
@ -260,14 +260,14 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
static async #onSubmitForm(event, form, formData) {
|
static async #onSubmitForm(event, form, formData) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
await this.document.update(formData.object)
|
await this.document.update(formData.object) // Note: formData.object
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_getTabsConfig(group) {
|
_getTabsConfig(group) {
|
||||||
const tabs = foundry.utils.deepClone(super._getTabsConfig(group))
|
const tabs = foundry.utils.deepClone(super._getTabsConfig(group))
|
||||||
Meta._getTabConfig(tabs, this)
|
Meta._getTabConfig(tabs, this);
|
||||||
Social._getTabConfig(tabs, this)
|
Social._getTabConfig(tabs, this);
|
||||||
Advsf._getTabConfig(tabs, this)
|
Advsf._getTabConfig(tabs, this)
|
||||||
Combat._getTabConfig(tabs, this)
|
Combat._getTabConfig(tabs, this)
|
||||||
Equipment._getTabConfig(tabs, this)
|
Equipment._getTabConfig(tabs, this)
|
||||||
|
|
@ -362,12 +362,16 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
|
|
||||||
if (fernkampf) {
|
if (fernkampf) {
|
||||||
const fkitems = fernkampf.system.rangedSkills.map((skillInQuestion) => actorData.items.find(p => p.name === skillInQuestion))
|
const fkitems = fernkampf.system.rangedSkills.map((skillInQuestion) => actorData.items.find(p => p.name === skillInQuestion))
|
||||||
fkitems.forEach(skill => {
|
fkitems.forEach(async skill => {
|
||||||
|
const obj = await skill
|
||||||
context.attacks.push({
|
context.attacks.push({
|
||||||
name: skill.name,
|
name: obj.name,
|
||||||
using: fernkampf.name,
|
using: fernkampf.name,
|
||||||
at: `${this.document.system.fk.aktuell + skill.system.at}`,
|
atroll: `1d20cs<${this.document.system.fk.aktuell + obj.system.at}`,
|
||||||
|
at: `${this.document.system.fk.aktuell + obj.system.at}`,
|
||||||
|
tproll: `${fernkampf.system.rangedAttackDamage}`, // TODO consider adding TP/KK mod and Range mod
|
||||||
tp: `${fernkampf.system.rangedAttackDamage}`,
|
tp: `${fernkampf.system.rangedAttackDamage}`,
|
||||||
|
iniroll: `(${context.inidice})d6 + ${context.inivalue + fernkampf.system.iniModifier ?? 0}`,
|
||||||
ini: `${context.inidice}w6 + ${context.inivalue + fernkampf.system.iniModifier ?? 0}`,
|
ini: `${context.inidice}w6 + ${context.inivalue + fernkampf.system.iniModifier ?? 0}`,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
@ -385,9 +389,13 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
context.attacks.push({
|
context.attacks.push({
|
||||||
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
|
||||||
at: `${this.document.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
|
||||||
pa: `${this.document.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
|
||||||
tp: `${links.system.meleeAttackDamage}`,
|
tp: `${links.system.meleeAttackDamage}`,
|
||||||
|
iniroll: `(${context.inidice})d6 + ${context.inivalue + links.system.iniModifier ?? 0}`,
|
||||||
ini: `${context.inidice}w6 + ${context.inivalue + links.system.iniModifier ?? 0}`,
|
ini: `${context.inidice}w6 + ${context.inivalue + links.system.iniModifier ?? 0}`,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
@ -405,9 +413,13 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
context.attacks.push({
|
context.attacks.push({
|
||||||
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
|
||||||
at: `${this.document.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
|
||||||
pa: `${this.document.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
|
||||||
tp: `${rechts.system.meleeAttackDamage}`,
|
tp: `${rechts.system.meleeAttackDamage}`,
|
||||||
|
iniroll: `(${context.inidice})d6 + ${context.inivalue + rechts.system.iniModifier ?? 0}`,
|
||||||
ini: `${context.inidice}w6 + ${context.inivalue + rechts.system.iniModifier ?? 0}`,
|
ini: `${context.inidice}w6 + ${context.inivalue + rechts.system.iniModifier ?? 0}`,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
@ -535,13 +547,16 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
|
|
||||||
|
|
||||||
async _onDrop(event) {
|
async _onDrop(event) {
|
||||||
const data = TextEditor.implementation.getDragEventData(event)
|
const data = TextEditor.implementation.getDragEventData(event);
|
||||||
|
const actor = this.actor;
|
||||||
const targetDocument = this.actor.itemTypes["Equipment"].find(p => p._id === event.target.dataset['itemId'])
|
const targetDocument = this.actor.itemTypes["Equipment"].find(p => p._id === event.target.dataset['itemId'])
|
||||||
|
//const allowed = Hooks.call("dropActorSheetData", actor, this, data);
|
||||||
|
//if (allowed === false) return;
|
||||||
|
|
||||||
// Dropped Documents
|
// Dropped Documents
|
||||||
const documentClass = foundry.utils.getDocumentClass(data.type)
|
const documentClass = foundry.utils.getDocumentClass(data.type);
|
||||||
if (documentClass) {
|
if (documentClass) {
|
||||||
const document = await documentClass.fromDropData(data)
|
const document = await documentClass.fromDropData(data);
|
||||||
|
|
||||||
if (document.type === "Equipment" || document.type === "Advantage" || document.type === "Spell" || document.type === "Liturgy" || document.type === "ActiveEffect" || document.type === "SpecialAbility") {
|
if (document.type === "Equipment" || document.type === "Advantage" || document.type === "Spell" || document.type === "Liturgy" || document.type === "ActiveEffect" || document.type === "SpecialAbility") {
|
||||||
// No duplication by moving items from one actor to another
|
// No duplication by moving items from one actor to another
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ export class CreatureSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
static async #onSubmitForm(event, form, formData) {
|
static async #onSubmitForm(event, form, formData) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
await this.document.update(formData.object)
|
await this.document.update(formData.object) // Note: formData.object
|
||||||
}
|
}
|
||||||
|
|
||||||
static #openEmbeddedDocument(event, target) {
|
static #openEmbeddedDocument(event, target) {
|
||||||
|
|
@ -100,8 +100,8 @@ export class CreatureSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
|
|
||||||
static async #removeAttack(evt) {
|
static async #removeAttack(evt) {
|
||||||
const {index} = evt.srcElement.dataset;
|
const {index} = evt.srcElement.dataset;
|
||||||
let sans = Array.from(this.document.system.attacks)
|
let sans = Array.from(this.document.system.attacks);
|
||||||
sans.splice(index, 1)
|
sans.splice(index, 1);
|
||||||
await this.document.update({'system.attacks': sans})
|
await this.document.update({'system.attacks': sans})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -113,7 +113,7 @@ export class CreatureSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
speaker: ChatMessage.getSpeaker({actor: this.document}),
|
speaker: ChatMessage.getSpeaker({actor: this.document}),
|
||||||
flavor: label,
|
flavor: label,
|
||||||
rollMode: game.settings.get('core', 'rollMode'),
|
rollMode: game.settings.get('core', 'rollMode'),
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #addAttack() {
|
static async #addAttack() {
|
||||||
|
|
@ -140,11 +140,11 @@ export class CreatureSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
/** @override */
|
/** @override */
|
||||||
async _prepareContext(options) {
|
async _prepareContext(options) {
|
||||||
|
|
||||||
const context = await super._prepareContext(options)
|
const context = await super._prepareContext(options);
|
||||||
const actorData = context.document
|
const actorData = context.document;
|
||||||
|
|
||||||
context.attacks = []
|
context.attacks = [];
|
||||||
context.actor = actorData
|
context.actor = actorData;
|
||||||
|
|
||||||
actorData.system.attacks.forEach((attack, index) => {
|
actorData.system.attacks.forEach((attack, index) => {
|
||||||
context.attacks.push({
|
context.attacks.push({
|
||||||
|
|
@ -180,7 +180,7 @@ export class CreatureSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
return context
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -199,7 +199,7 @@ export class CreatureSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
//const allowed = Hooks.call("dropActorSheetData", actor, this, data);
|
//const allowed = Hooks.call("dropActorSheetData", actor, this, data);
|
||||||
// if (allowed === false) return;
|
// if (allowed === false) return;
|
||||||
// Dropped Documents
|
// Dropped Documents
|
||||||
const documentClass = foundry.utils.getDocumentClass(data.type)
|
const documentClass = foundry.utils.getDocumentClass(data.type);
|
||||||
if (documentClass) {
|
if (documentClass) {
|
||||||
const document = await documentClass.fromDropData(data);
|
const document = await documentClass.fromDropData(data);
|
||||||
|
|
||||||
|
|
@ -209,7 +209,7 @@ export class CreatureSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
document.parent.items.get(document._id).delete()
|
document.parent.items.get(document._id).delete()
|
||||||
}
|
}
|
||||||
|
|
||||||
await this._onDropDocument(event, document)
|
await this._onDropDocument(event, document);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -226,7 +226,7 @@ export class CreatureSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
dragstart: this._onDragStart.bind(this),
|
dragstart: this._onDragStart.bind(this),
|
||||||
drop: this._onDrop.bind(this)
|
drop: this._onDrop.bind(this)
|
||||||
}
|
}
|
||||||
}).bind(this.element)
|
}).bind(this.element);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ export class CultureSheet extends HandlebarsApplicationMixin(DocumentSheetV2) {
|
||||||
static async #onSubmitForm(event, form, formData) {
|
static async #onSubmitForm(event, form, formData) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
await this.document.update(formData.object)
|
await this.document.update(formData.object) // Note: formData.object
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @override */
|
/** @override */
|
||||||
|
|
|
||||||
|
|
@ -6,19 +6,13 @@
|
||||||
& > div {
|
& > div {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 320px;
|
grid-template-columns: 1fr 320px;
|
||||||
grid-template-rows: 32px 32px 32px 1fr;
|
grid-template-rows: 74px 1fr;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"capacity capacity"
|
"capacity capacity"
|
||||||
"coinage coinage"
|
|
||||||
"inventory-header equipment-header"
|
|
||||||
"inventory equipment";
|
"inventory equipment";
|
||||||
|
|
||||||
.coinage {
|
|
||||||
grid-area: coinage;
|
|
||||||
}
|
|
||||||
|
|
||||||
.capacity {
|
.capacity {
|
||||||
|
|
||||||
grid-area: capacity;
|
grid-area: capacity;
|
||||||
|
|
@ -41,30 +35,24 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
h3.inventory-header {
|
|
||||||
line-height: 32px;
|
|
||||||
grid-area: inventory-header;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.inventory {
|
.inventory {
|
||||||
grid-area: inventory;
|
grid-area: inventory;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
flex: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inventory-table {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow-x: hidden;
|
|
||||||
overflow-y: auto;
|
|
||||||
border: 1px inset #ccc;
|
|
||||||
background-color: rgba(0, 0, 0, 0.2);
|
|
||||||
|
|
||||||
|
|
||||||
.equipment {
|
.equipment {
|
||||||
@include equipment.equipment
|
@include equipment.equipment
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -9,14 +9,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="coinage">
|
|
||||||
<label>Geldmittel: {{currency this.wealth}}</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 class="inventory-header">Inventar </h3>
|
|
||||||
<div class="inventory">
|
<div class="inventory">
|
||||||
|
<h3>Inventar </h3>
|
||||||
|
<label>Geldmittel: {{currency this.wealth}}</label>
|
||||||
{{> "systems/DSA_4-1/templates/ui/partial-equipment-button.hbs" equipments}}
|
{{> "systems/DSA_4-1/templates/ui/partial-equipment-button.hbs" equipments}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- TODO: fix paperdoll
|
<!-- TODO: fix paperdoll
|
||||||
<div class="paperdoll">
|
<div class="paperdoll">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue