Compare commits
4 Commits
f5248c57aa
...
cc460eb06c
| Author | SHA1 | Date |
|---|---|---|
|
|
cc460eb06c | |
|
|
2814fabbbe | |
|
|
65fcc13822 | |
|
|
e92de1a9b0 |
Binary file not shown.
|
After Width: | Height: | Size: 484 B |
Binary file not shown.
|
After Width: | Height: | Size: 545 B |
|
|
@ -21,6 +21,7 @@ async function preloadHandlebarsTemplates() {
|
|||
'systems/DSA_4-1/templates/ui/partial-die.hbs',
|
||||
'systems/DSA_4-1/templates/ui/partial-advantage-button.hbs',
|
||||
'systems/DSA_4-1/templates/ui/partial-equipment-button.hbs',
|
||||
'systems/DSA_4-1/templates/ui/partial-equipment-group-button.hbs',
|
||||
'systems/DSA_4-1/templates/ui/partial-array-editor.hbs'
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,12 +132,22 @@ export class PlayerCharacterDataModel extends foundry.abstract.TypeDataModel {
|
|||
notiz: new StringField(),
|
||||
})),
|
||||
|
||||
heldenausruestung: new SchemaField({
|
||||
heldenausruestung: new ArrayField(
|
||||
new SchemaField({
|
||||
links: new DocumentIdField(),
|
||||
rechts: new DocumentIdField(),
|
||||
ruestung: new DocumentIdField(),
|
||||
munition: new DocumentIdField()
|
||||
})
|
||||
brust: new DocumentIdField(),
|
||||
ruecken: new DocumentIdField(),
|
||||
kopf: new DocumentIdField(),
|
||||
fernkampf: new DocumentIdField(),
|
||||
munition: new DocumentIdField(),
|
||||
armlinks: new DocumentIdField(),
|
||||
armrechts: new DocumentIdField(),
|
||||
bauch: new DocumentIdField(),
|
||||
beinlinks: new DocumentIdField(),
|
||||
beinrechts: new DocumentIdField(),
|
||||
}), {min: 0, max: 3}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -145,9 +155,52 @@ export class PlayerCharacterDataModel extends foundry.abstract.TypeDataModel {
|
|||
super._initialize(options);
|
||||
}
|
||||
|
||||
async _onCreate(data, options, userId) {
|
||||
_initializeSource(data, options) {
|
||||
|
||||
|
||||
|
||||
if (data.heldenausruestung.length === 0) {
|
||||
let sets = [];
|
||||
|
||||
for (let i = 0; i < 3; i++) {
|
||||
|
||||
const preppedSet = {}
|
||||
|
||||
PlayerCharacterDataModel.getSlots().forEach(slot => {
|
||||
preppedSet[slot] = null;
|
||||
})
|
||||
|
||||
sets.push(preppedSet);
|
||||
|
||||
}
|
||||
data.heldenausruestung = sets
|
||||
|
||||
}
|
||||
|
||||
console.log(data)
|
||||
return super._initializeSource(data, options);
|
||||
}
|
||||
|
||||
async _onCreate(data, options, userId) {
|
||||
|
||||
}
|
||||
|
||||
static getSlots() {
|
||||
return [
|
||||
"links",
|
||||
"rechts",
|
||||
"brust",
|
||||
"ruecken",
|
||||
"kopf",
|
||||
"fernkampf",
|
||||
"munition",
|
||||
"armlinks",
|
||||
"armrechts",
|
||||
"bauch",
|
||||
"beinlinks",
|
||||
"beinrechts",
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
import {Character} from "../documents/character.mjs";
|
||||
import {PlayerCharacterDataModel} from "../data/character.mjs";
|
||||
|
||||
export class CharacterSheet extends ActorSheet {
|
||||
/**@override */
|
||||
static get defaultOptions() {
|
||||
|
|
@ -153,6 +156,20 @@ export class CharacterSheet extends ActorSheet {
|
|||
|
||||
}
|
||||
|
||||
#isWorn(itemId, setId) {
|
||||
|
||||
const slots = PlayerCharacterDataModel.getSlots()
|
||||
const set = this.object.system.heldenausruestung[setId]
|
||||
for ( const slot of slots) {
|
||||
const equipmentSlotId = set[slot]
|
||||
if (equipmentSlotId === itemId) {
|
||||
return slot
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
#addEquipmentsToContext(context) {
|
||||
context.equipments = [];
|
||||
const actorData = context.data;
|
||||
|
|
@ -164,6 +181,9 @@ export class CharacterSheet extends ActorSheet {
|
|||
id: item._id,
|
||||
quantity: item.system.quantity,
|
||||
name: item.name,
|
||||
icon: item.img ?? "",
|
||||
weight: item.system.weight ?? 0,
|
||||
worn: this.#isWorn(item._id, 0)
|
||||
})
|
||||
context.carryingweight += item.system.quantity * item.system.weight;
|
||||
}
|
||||
|
|
@ -171,27 +191,90 @@ export class CharacterSheet extends ActorSheet {
|
|||
context.maxcarryingcapacity = actorData.system.attribute.kk.aktuell
|
||||
context.carryingpercentage = Math.min((context.carryingweight / context.maxcarryingcapacity)*100, 100);
|
||||
|
||||
context.heldenausruestung = {
|
||||
links: {
|
||||
id: this.object.system.heldenausruestung.links,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung.links)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung.links)?.img
|
||||
const maxSets = 3
|
||||
const romanNumerals = ["I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X"]
|
||||
context.sets = []
|
||||
for (let setIndex = 0; setIndex<maxSets; setIndex++) {
|
||||
|
||||
context.sets.push({
|
||||
tab: "set" + (setIndex+1),
|
||||
name: romanNumerals[setIndex],
|
||||
index: setIndex,
|
||||
slots: [
|
||||
{
|
||||
target: "links",
|
||||
id: this.object.system.heldenausruestung[setIndex]?.links,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.links)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.links)?.img
|
||||
},
|
||||
rechts: {
|
||||
id: this.object.system.heldenausruestung.rechts,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung.rechts)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung.rechts)?.img
|
||||
{
|
||||
target: "rechts",
|
||||
id: this.object.system.heldenausruestung[setIndex]?.rechts,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.rechts)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.rechts)?.img
|
||||
},
|
||||
ruestung: {
|
||||
id: this.object.system.heldenausruestung.ruestung,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung.ruestung)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung.ruestung)?.img
|
||||
{
|
||||
target: "brust",
|
||||
id: this.object.system.heldenausruestung[setIndex]?.brust,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.brust)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.brust)?.img
|
||||
},
|
||||
munition: {
|
||||
id: this.object.system.heldenausruestung.munition,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung.munition)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung.munition)?.img
|
||||
{
|
||||
target: "ruecken",
|
||||
id: this.object.system.heldenausruestung[setIndex]?.ruecken,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.ruecken)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.ruecken)?.img
|
||||
},
|
||||
{
|
||||
target: "kopf",
|
||||
id: this.object.system.heldenausruestung[setIndex]?.kopf,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.kopf)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.kopf)?.img
|
||||
},
|
||||
{
|
||||
target: "fernkampf",
|
||||
id: this.object.system.heldenausruestung[setIndex]?.fernkampf,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.fernkampf)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.fernkampf)?.img
|
||||
},
|
||||
{
|
||||
target: "munition",
|
||||
id: this.object.system.heldenausruestung[setIndex]?.munition,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.munition)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.munition)?.img
|
||||
},
|
||||
{
|
||||
target: "armlinks",
|
||||
id: this.object.system.heldenausruestung[setIndex]?.armlinks,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.armlinks)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.armlinks)?.img
|
||||
},
|
||||
{
|
||||
target: "armrechts",
|
||||
id: this.object.system.heldenausruestung[setIndex]?.armrechts,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.armrechts)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.armrechts)?.img
|
||||
},
|
||||
{
|
||||
target: "bauch",
|
||||
id: this.object.system.heldenausruestung[setIndex]?.bauch,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.bauch)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.bauch)?.img
|
||||
},
|
||||
{
|
||||
target: "beinlinks",
|
||||
id: this.object.system.heldenausruestung[setIndex]?.beinlinks,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.beinlinks)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.beinlinks)?.img
|
||||
},
|
||||
{
|
||||
target: "beinrechts",
|
||||
id: this.object.system.heldenausruestung[setIndex]?.beinrechts,
|
||||
name: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.beinrechts)?.name,
|
||||
icon: this.object.items.get(actorData.system.heldenausruestung[setIndex]?.beinrechts)?.img
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -324,9 +407,31 @@ export class CharacterSheet extends ActorSheet {
|
|||
|
||||
}
|
||||
|
||||
#getEquipmentset(setId) {
|
||||
const equipmentSet = this.object.system.heldenausruestung[setId]
|
||||
const updateObject = {}
|
||||
// TODO: there's got to be a better angle!
|
||||
updateObject[`system.heldenausruestung.${setId}.links`] = equipmentSet.links;
|
||||
updateObject[`system.heldenausruestung.${setId}.rechts`] = equipmentSet.rechts;
|
||||
updateObject[`system.heldenausruestung.${setId}.brust`] = equipmentSet.brust;
|
||||
updateObject[`system.heldenausruestung.${setId}.bauch`] = equipmentSet.bauch;
|
||||
updateObject[`system.heldenausruestung.${setId}.ruecken`] = equipmentSet.ruecken;
|
||||
updateObject[`system.heldenausruestung.${setId}.kopf`] = equipmentSet.kopf;
|
||||
updateObject[`system.heldenausruestung.${setId}.fernkampf`] = equipmentSet.fernkampf;
|
||||
updateObject[`system.heldenausruestung.${setId}.munition`] = equipmentSet.munition;
|
||||
updateObject[`system.heldenausruestung.${setId}.armlinks`] = equipmentSet.armlinks;
|
||||
updateObject[`system.heldenausruestung.${setId}.armrechts`] = equipmentSet.armrechts;
|
||||
updateObject[`system.heldenausruestung.${setId}.beinlinks`] = equipmentSet.beinlinks;
|
||||
updateObject[`system.heldenausruestung.${setId}.beinrechts`] = equipmentSet.beinrechts;
|
||||
return updateObject;
|
||||
}
|
||||
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
const tabs = new Tabs({navSelector: ".paperdoll-tabs.tabs", contentSelector: ".sheet-body.paperdoll-sets", initial: "set1"});
|
||||
tabs.bind(html[0]);
|
||||
|
||||
html.on('click', '.attribute.rollable', (evt) => {
|
||||
this._onAttributeRoll(evt);
|
||||
});
|
||||
|
|
@ -355,55 +460,28 @@ export class CharacterSheet extends ActorSheet {
|
|||
})
|
||||
|
||||
html.on('dragstart', '.equipment', (evt) => {
|
||||
evt.originalEvent.dataTransfer.setData("text/plain", evt.currentTarget.dataset.id);
|
||||
evt.originalEvent.dataTransfer.setData("application/json", JSON.stringify({
|
||||
documentId: evt.currentTarget.dataset.id
|
||||
}));
|
||||
})
|
||||
|
||||
html.on('drop', '.equipped', async (evt) => {
|
||||
const {actor, target} = evt.currentTarget.dataset;
|
||||
const documentId = evt.originalEvent.dataTransfer.getData("text");
|
||||
const {actor, target, setId} = evt.currentTarget.dataset;
|
||||
try {
|
||||
const {documentId} = JSON.parse(evt.originalEvent.dataTransfer.getData("application/json"));
|
||||
|
||||
|
||||
if (actor === this.object._id && documentId) { // managing equipped items
|
||||
switch(target) {
|
||||
case "links":
|
||||
this.object.update({
|
||||
system: {
|
||||
heldenausruestung: {
|
||||
links: documentId
|
||||
}
|
||||
}
|
||||
})
|
||||
break;
|
||||
case "rechts":
|
||||
this.object.update({
|
||||
system: {
|
||||
heldenausruestung: {
|
||||
rechts: documentId
|
||||
}
|
||||
}
|
||||
})
|
||||
break;
|
||||
case "ruestung":
|
||||
this.object.update({
|
||||
system: {
|
||||
heldenausruestung: {
|
||||
ruestung: documentId
|
||||
}
|
||||
}
|
||||
})
|
||||
break;
|
||||
case "munition":
|
||||
this.object.update({
|
||||
system: {
|
||||
heldenausruestung: {
|
||||
munition: documentId
|
||||
}
|
||||
}
|
||||
})
|
||||
break;
|
||||
}
|
||||
//const slot = this.#isWorn(documentId, setId)
|
||||
const updateObject = this.#getEquipmentset(setId)
|
||||
updateObject[`system.heldenausruestung.${setId}.${target}`] = documentId;
|
||||
console.log(updateObject);
|
||||
|
||||
await this.object.update(updateObject);
|
||||
}
|
||||
|
||||
evt.stopPropagation();
|
||||
} catch (e) {}
|
||||
})
|
||||
|
||||
new ContextMenu(html, '.talent.rollable', [
|
||||
|
|
@ -442,12 +520,28 @@ export class CharacterSheet extends ActorSheet {
|
|||
name: "Aus dem Inventar entfernen",
|
||||
icon: '<i class="fa-solid fa-trash"></i>',
|
||||
callback: (event) => {
|
||||
// TODO find id on heldenausruestung to remove the worn items as well
|
||||
this.object.deleteEmbeddedDocuments('Item', [event[0].dataset.id])
|
||||
},
|
||||
condition: () => true
|
||||
}
|
||||
]);
|
||||
|
||||
new ContextMenu(html, '.equipped', [
|
||||
{
|
||||
name: "Gegenstand vom Set entfernen",
|
||||
callback: (event) => {
|
||||
const {setId, target, actor} = event[0].dataset
|
||||
|
||||
const updateObject = this.#getEquipmentset(setId)
|
||||
updateObject[`system.heldenausruestung.${setId}.${target}`] = null;
|
||||
|
||||
this.object.update(updateObject);
|
||||
},
|
||||
condition: () => true
|
||||
}
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
#handleDroppedSkill(actor, skill) {
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ export class GroupSheet extends ActorSheet {
|
|||
id: item._id,
|
||||
quantity: item.system.quantity,
|
||||
name: item.name,
|
||||
icon: item.img
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"_id": "MeGrzCf8ljnWPq7U",
|
||||
"_key": "!items!MeGrzCf8ljnWPq7U",
|
||||
"type": "Equipment",
|
||||
"img": "systems/DSA_4-1/assets/arsenal/hammer1.png",
|
||||
"img": "systems/DSA_4-1/assets/arsenal/pickaxe.png",
|
||||
"name": "Spitzhacke",
|
||||
"system": {
|
||||
"name": "Spitzhacke",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Spitzhacke",
|
||||
"image": "systems/DSA_4-1/assets/arsenal/hammer1.png",
|
||||
"image": "systems/DSA_4-1/assets/arsenal/pickaxe.png",
|
||||
"category": ["Gegenstand", "Nahkampfwaffe"],
|
||||
"weight": 5,
|
||||
"price": 20,
|
||||
|
|
|
|||
|
|
@ -53,16 +53,12 @@
|
|||
}
|
||||
|
||||
.backpack.active {
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
padding: 8px;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 280px;
|
||||
grid-template-columns: 1fr 320px;
|
||||
grid-template-rows: 64px 1fr;
|
||||
gap: 0px 0px;
|
||||
gap: 10px;
|
||||
height: 100%;
|
||||
grid-template-areas:
|
||||
"capacity capacity"
|
||||
"inventory equipment";
|
||||
|
|
@ -98,51 +94,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.paperdoll {
|
||||
|
||||
grid-area: equipment;
|
||||
position: relative;
|
||||
|
||||
.paperdoll-image {
|
||||
fill: rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.equipped {
|
||||
|
||||
background-color: rgba(0,0,0,0.2);
|
||||
|
||||
border: 1px inset #ccc;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
|
||||
&.links {
|
||||
position: absolute;
|
||||
top: 230px;
|
||||
left: 250px;
|
||||
}
|
||||
|
||||
&.rechts {
|
||||
position: absolute;
|
||||
top: 230px;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
&.ruestung {
|
||||
position: absolute;
|
||||
top: 180px;
|
||||
left: 130px;
|
||||
}
|
||||
|
||||
&.munition {
|
||||
position: absolute;
|
||||
top: 270px;
|
||||
left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,114 @@
|
|||
.dsa41.sheet.actor.character .window-content {
|
||||
.sheet-tabs.paperdoll-tabs.tabs {
|
||||
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 26px;
|
||||
|
||||
.item.active[data-tab] {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 3px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.sheet-body.paperdoll-sets {
|
||||
left: 0;
|
||||
top: 55px;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
overflow: hidden;
|
||||
|
||||
div.tab {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.paperdoll {
|
||||
|
||||
grid-area: equipment;
|
||||
position: relative;
|
||||
|
||||
.paperdoll-image {
|
||||
fill: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.equipped {
|
||||
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
|
||||
border: 1px inset #ccc;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
|
||||
position: absolute !important;
|
||||
|
||||
&.links {
|
||||
top: 230px;
|
||||
left: 250px;
|
||||
}
|
||||
|
||||
&.rechts {
|
||||
top: 230px;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
&.brust {
|
||||
top: 120px;
|
||||
left: 110px;
|
||||
}
|
||||
|
||||
&.armlinks {
|
||||
top: 180px;
|
||||
left: 210px;
|
||||
}
|
||||
|
||||
&.armrechts {
|
||||
top: 180px;
|
||||
left: 60px;
|
||||
}
|
||||
|
||||
&.beinlinks {
|
||||
top: 380px;
|
||||
left: 210px;
|
||||
}
|
||||
|
||||
&.beinrechts {
|
||||
top: 380px;
|
||||
left: 60px;
|
||||
}
|
||||
|
||||
&.bauch {
|
||||
top: 200px;
|
||||
left: 136px;
|
||||
}
|
||||
|
||||
&.kopf {
|
||||
top: 40px;
|
||||
left: 136px
|
||||
}
|
||||
|
||||
&.fernkampf {
|
||||
top: 40px;
|
||||
left: 240px;
|
||||
}
|
||||
|
||||
&.ruecken {
|
||||
top: 120px;
|
||||
left: 160px;
|
||||
}
|
||||
|
||||
&.munition {
|
||||
top: 80px;
|
||||
left: 240px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,3 +6,4 @@
|
|||
@use "_group-sheet";
|
||||
@use "_tabs";
|
||||
@use "_equipment-sheet";
|
||||
@use "_paperdoll";
|
||||
|
|
|
|||
|
|
@ -22,10 +22,16 @@
|
|||
<div class="sidebar-element resource-bar">
|
||||
<label>AuP:</label><span class="resource-fill" style="width: 80%"></span></div>
|
||||
|
||||
<div class="sidebar-element rollable" data-roll="1d20+23" data-label="Attacke"><label>AT</label> <div class="formula">1W20+23</div></div>
|
||||
<div class="sidebar-element rollable" data-roll="1d20+23" data-label="Attacke"><label>AT</label>
|
||||
<div class="formula">1W20+23</div>
|
||||
</div>
|
||||
<div class="sidebar-element"><label>PA</label>: -</div>
|
||||
<div class="sidebar-element rollable" data-label="Ausweichen" data-roll="1d6+2"><label>Ausweichen</label> <div class="formula">1W6+2</div></div>
|
||||
<div class="sidebar-element rollable" data-label="Initiative" data-roll="1d6+6"><label>Initiative</label> <div class="formula">1W6+6</div></div>
|
||||
<div class="sidebar-element rollable" data-label="Ausweichen" data-roll="1d6+2"><label>Ausweichen</label>
|
||||
<div class="formula">1W6+2</div>
|
||||
</div>
|
||||
<div class="sidebar-element rollable" data-label="Initiative" data-roll="1d6+6"><label>Initiative</label>
|
||||
<div class="formula">1W6+6</div>
|
||||
</div>
|
||||
|
||||
<h2 class="sidebar-element header">Favouriten</h2>
|
||||
|
||||
|
|
@ -50,7 +56,8 @@
|
|||
<input type="text" name="system.meta.spezies.value" value="{{system.meta.spezies}}"/>
|
||||
</label>
|
||||
</div>
|
||||
<div><label>Kultur<input type="text" name="system.meta.kultur.value" value="{{system.meta.kultur}}"/></label>
|
||||
<div><label>Kultur<input type="text" name="system.meta.kultur.value"
|
||||
value="{{system.meta.kultur}}"/></label>
|
||||
</div>
|
||||
<div><label>Profession<input type="text" name="system.meta.profession.value"
|
||||
value="{{system.meta.profession}}"/></label>
|
||||
|
|
@ -154,32 +161,48 @@
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="inventory">
|
||||
<h3>Inventar</h3>
|
||||
{{#each equipments}}
|
||||
{{> "systems/DSA_4-1/templates/ui/partial-equipment-button.hbs" this}}
|
||||
{{/each}}
|
||||
|
||||
{{> "systems/DSA_4-1/templates/ui/partial-equipment-button.hbs" equipments}}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="paperdoll">
|
||||
<h3>Ausrüstung</h3>
|
||||
{{!-- Set Tab Navigation --}}
|
||||
<nav class="sheet-tabs paperdoll-tabs tabs" data-group="secondary">
|
||||
{{#each this.sets}}
|
||||
<a class="item" data-tab="{{this.tab}}">{{this.name}}</a>
|
||||
{{/each}}
|
||||
</nav>
|
||||
{{!-- Set Body --}}
|
||||
<section class="sheet-body paperdoll-sets">
|
||||
{{#each this.sets}}
|
||||
<div class="tab {{this.tab}}" data-group="secondary" data-tab="{{this.tab}}">
|
||||
|
||||
<div class="paperdoll">
|
||||
<svg
|
||||
width="280"
|
||||
height="530"
|
||||
viewBox="0 0 70 140"
|
||||
xmlns="http://www.w3.org/2000/svg"><path class="paperdoll-image"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path class="paperdoll-image"
|
||||
d="m 22.868053,0.6591628 0.658626,-0.52687462 6.270125,4.42573652 3.97809,0.5795595 0.605938,-4.58379633 11.828915,2.02846193 0.07905,2.3182421 3.556578,-0.9220267 6.691636,3.7671414 2.292014,3.7671454 -4.030787,0.05268 0.89573,3.951549 -1.106491,2.23921 -3.345818,-0.632247 0.869387,4.241332 v 2.476303 l 1.422627,-0.02634 0.500563,1.343527 h 3.29312 l 1.975878,3.424677 0.05267,2.818774 2.371046,6.243447 6.665292,14.72611 1.949534,0.658592 0.34249,4.794545 -0.289802,1.606966 0.922074,1.765023 -0.395167,2.897805 2.002222,6.743979 1.027449,1.949433 -0.737657,5.031644 -3.925413,4.399394 -0.922074,-0.553222 0.579595,-1.844054 -1.896847,1.264499 -0.526897,-0.790314 1.475315,-1.369869 -1.36994,-5.690236 -0.974762,4.083275 -1.053803,-0.342473 -0.790345,-3.108552 0.579584,-2.370933 0.526907,-0.658592 -0.263459,-0.500527 0.289803,-1.554277 0.948418,-2.739737 -0.447865,-2.212876 -1.106492,-0.974715 -1.554356,-1.501588 -2.423744,-4.030581 0.711314,-1.264496 -3.793683,-5.532171 -0.02638,-1.554275 -1.475326,-1.554276 -1.185522,-3.213929 -0.869387,-0.763967 -3.029682,4.820892 -1.159179,0.447843 0.447865,0.974716 -0.790345,0.974716 -0.21076,2.002118 0.368823,1.343527 -0.289792,1.923087 1.71243,2.397274 0.02638,1.791371 1.23821,1.975774 2.950651,13.013779 -0.421522,0.684934 2.713536,14.278264 7.113157,18.150786 1.132835,0.0791 3.767339,9.19394 -2.344701,0.73762 1.92318,7.42891 -1.738774,3.87253 1.001116,3.79348 2.687192,4.10961 -0.68497,2.44996 -10.643392,0.079 -0.684969,-8.42997 1.106491,-1.42257 -1.659742,-1.47524 0.07905,-2.00211 -1.949535,-2.18653 -0.55325,-3.84617 -1.422628,0.15805 -0.500553,-7.71869 1.02745,-1.05374 -2.133941,-4.21499 0.421521,-2.42362 -4.32059,-6.322483 -1.317252,-4.056921 -9.247098,-17.702946 -0.395178,0.210749 -3.609266,18.783038 -1.975878,3.635422 -0.289802,10.721871 0.764011,-0.0264 2.397389,7.71869 -4.663069,0.97472 -0.737658,6.74398 -2.212983,1.92309 1.422638,6.74397 -1.896847,3.10855 -4.504997,0.34248 -0.105385,-0.86934 -3.714641,1.2118 -8.140618,0.21075 -0.131729,-2.00212 8.483107,-5.47948 0.711314,-1.89674 -0.316146,-2.18653 0.869386,-0.71128 -1.027449,-1.36986 1.659732,-6.55958 -2.502775,-0.76396 1.317252,-3.42469 -0.289792,-1.2645 2.397389,-3.05585 2.107608,-12.592278 -0.948419,-7.349881 0.316136,-13.90946 -1.554356,-1.159119 4.504996,-21.153968 0.316147,-4.557454 0.948418,-3.345646 -2.160295,2.924147 -4.847487,4.135956 1.264565,1.080091 -3.42485,2.397275 -3.29313,2.766082 -0.68497,1.923087 -1.791461,-0.57956 -1.001116,1.633307 0.07905,4.87358 L 9.168636,68.889233 4.2948053,70.180074 1.5812697,67.466679 0.13228831,66.070468 2.9775532,60.801731 6.5868297,58.825953 6.692205,57.245334 8.0884885,56.059869 v -1.923064 l 2.9769935,-7.824067 2.897953,0.553216 7.323918,-8.166536 v -0.500531 l 3.872714,-4.689172 -0.263448,-2.028463 2.766234,-5.1897 5.163622,-1.448903 0.158063,-1.844055 -0.922074,-2.291899 0.948428,-5.95367 -0.658626,-4.294017 -4.926518,-3.9515498 z"/>
|
||||
</svg>
|
||||
|
||||
<img src="{{heldenausruestung.links.icon}}" class="equipped links" data-actor="{{actor.id}}" value="{{heldenausruestung.links.name}}" data-target="links"/>
|
||||
<img src="{{heldenausruestung.rechts.icon}}" class="equipped rechts" data-actor="{{actor.id}}" value="{{heldenausruestung.rechts.name}}" data-target="rechts"/>
|
||||
<img src="{{heldenausruestung.ruestung.icon}}" class="equipped ruestung" data-actor="{{actor.id}}" value="{{heldenausruestung.ruestung.name}}" data-target="ruestung"/>
|
||||
<img src="{{heldenausruestung.munition.icon}}" class="equipped munition" data-actor="{{actor.id}}" value="{{heldenausruestung.munition.name}}" data-target="munition"/>
|
||||
{{#each this.slots}}
|
||||
<div class="equipped {{this.target}}" data-set-id="{{../index}}" data-target="{{this.target}}" data-actor="{{../../actor.id}}"><img
|
||||
src="{{this.icon}}"/></div>
|
||||
{{/each}}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="tab spells" data-group="primary" data-tab="spells">
|
||||
|
|
|
|||
|
|
@ -68,11 +68,7 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
<div class="tab inventory" data-group="primary" data-tab="inventory">
|
||||
<ul>
|
||||
{{#each equipments}}
|
||||
{{> 'systems/DSA_4-1/templates/ui/partial-equipment-button.hbs' this}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{> 'systems/DSA_4-1/templates/ui/partial-equipment-group-button.hbs' equipments}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,22 @@
|
|||
<div class="equipment" data-id="{{this.id}}" draggable="true">
|
||||
<span class="quantity">{{this.quantity}}</span>
|
||||
<span class="item-name">{{this.name}}</span>
|
||||
</div>
|
||||
<table class="inventory-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"></th>
|
||||
<th>Anzahl</th>
|
||||
<th>Gewicht</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
{{#each this}}
|
||||
<tr class="equipment" data-id="{{this.id}}" draggable="true">
|
||||
<td class="icon"><img alt="" src="{{this.icon}}" width="16" height="16"></td>
|
||||
<td class="name">{{this.name}}</td>
|
||||
<td class="quantity">{{this.quantity}}</td>
|
||||
<td class="weight">{{this.weight}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
<table class="inventory-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"></th>
|
||||
<th>Anzahl</th>
|
||||
<th>Gewicht</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
{{#each this}}
|
||||
<tr class="equipment" data-id="{{this.id}}" draggable="true">
|
||||
<td class="icon"><img alt="" src="{{this.icon}}" width="16" height="16"></td>
|
||||
<td class="name">{{this.name}}</td>
|
||||
<td class="quantity">{{this.quantity}}</td>
|
||||
<td class="weight">{{this.weight}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
Loading…
Reference in New Issue