Prepare for version 0.9 #8
No files matched your search
+7
-13
@@ -28,7 +28,8 @@
|
||||
},
|
||||
"Gegenstand": {
|
||||
"wert": "Wert",
|
||||
"gewicht": "Gewicht"
|
||||
"gewicht": "Gewicht",
|
||||
"anzahl": "Anzahl"
|
||||
},
|
||||
"Skills": {
|
||||
"gruppen": {
|
||||
@@ -125,17 +126,9 @@
|
||||
"singular": "Zauber",
|
||||
"plural": "Zauber"
|
||||
},
|
||||
"gunst": {
|
||||
"singular": "Gunst",
|
||||
"plural": "Günste"
|
||||
},
|
||||
"makel": {
|
||||
"singular": "Makel",
|
||||
"plural": "Makel"
|
||||
},
|
||||
"schicksalsgabe": {
|
||||
"singular": "Schicksalsgabe",
|
||||
"plural": "Schicksalsgaben"
|
||||
"münze": {
|
||||
"singular": "Münze",
|
||||
"plural": "Münzen"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -173,7 +166,8 @@
|
||||
"gunst": "Gunst",
|
||||
"makel": "Makel",
|
||||
"schicksalsgabe": "Schicksalsgabe",
|
||||
"legende": "Legende"
|
||||
"legende": "Legende",
|
||||
"geld": "Geld"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ function defineSchema() {
|
||||
nullable: false,
|
||||
integer: true,
|
||||
initial: 1,
|
||||
step: 1,
|
||||
min: 0
|
||||
}),
|
||||
gewicht: new fields.NumberField({
|
||||
|
||||
@@ -29,7 +29,9 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
|
||||
rollSpell: this.#rollSpell,
|
||||
cycleEquip: this.#cycleEquip,
|
||||
addSpezialisierung: addSpezialisierung,
|
||||
editSepzialisierung: editSepzialisierung
|
||||
editSepzialisierung: editSepzialisierung,
|
||||
increaseDoc: this.#increaseDoc,
|
||||
decreaseDoc: this.#decreaseDoc
|
||||
},
|
||||
form: {
|
||||
submitOnChange: true
|
||||
@@ -384,6 +386,22 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
|
||||
/* Event handlers */
|
||||
/* -------------------------------------------------- */
|
||||
|
||||
static async #increaseDoc(event, target) {
|
||||
const item = this.actor.items.get(target.dataset.itemId);
|
||||
if (event.shiftKey || event.ctrlKey) {
|
||||
return item.update({ ["system.anzahl"]: (item.system.anzahl += 10) });
|
||||
}
|
||||
return item.update({ ["system.anzahl"]: (item.system.anzahl += 1) });
|
||||
}
|
||||
|
||||
static async #decreaseDoc(event, target) {
|
||||
const item = this.actor.items.get(target.dataset.itemId);
|
||||
if (event.shiftKey || event.ctrlKey) {
|
||||
return item.update({ ["system.anzahl"]: (item.system.anzahl -= 10) });
|
||||
}
|
||||
return item.update({ ["system.anzahl"]: (item.system.anzahl -= 1) });
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders an embedded document's sheet.
|
||||
*
|
||||
|
||||
+8
-4
@@ -26,6 +26,7 @@ Hooks.once("init", () => {
|
||||
}
|
||||
};
|
||||
CONFIG.Item.dataModels.item = ItemData;
|
||||
CONFIG.Item.dataModels.geld = ItemData;
|
||||
CONFIG.Item.dataModels.weapon = WeaponData;
|
||||
CONFIG.Item.dataModels.armor = ArmorData;
|
||||
CONFIG.Item.dataModels.zauber = ZauberData;
|
||||
@@ -39,6 +40,9 @@ Hooks.once("init", () => {
|
||||
types: ["item"],
|
||||
makeDefault: true
|
||||
});
|
||||
foundry.applications.apps.DocumentSheetConfig.registerSheet(Item, "midgard6-lvd", M6ItemSheet, {
|
||||
types: ["geld"]
|
||||
});
|
||||
foundry.applications.apps.DocumentSheetConfig.registerSheet(Item, "midgard6-lvd", M6WeaponSheet, {
|
||||
types: ["weapon"]
|
||||
});
|
||||
@@ -53,7 +57,7 @@ Hooks.once("init", () => {
|
||||
"midgard6-lvd",
|
||||
M6HintergrundSheet,
|
||||
{
|
||||
types: ["gunst"]
|
||||
types: ["hintergrund", "gunst"]
|
||||
}
|
||||
);
|
||||
foundry.applications.apps.DocumentSheetConfig.registerSheet(
|
||||
@@ -61,7 +65,7 @@ Hooks.once("init", () => {
|
||||
"midgard6-lvd",
|
||||
M6HintergrundSheet,
|
||||
{
|
||||
types: ["makel"]
|
||||
types: ["hintergrund", "makel"]
|
||||
}
|
||||
);
|
||||
foundry.applications.apps.DocumentSheetConfig.registerSheet(
|
||||
@@ -69,7 +73,7 @@ Hooks.once("init", () => {
|
||||
"midgard6-lvd",
|
||||
M6HintergrundSheet,
|
||||
{
|
||||
types: ["schicksalsgabe"]
|
||||
types: ["hintergrund", "schicksalsgabe"]
|
||||
}
|
||||
);
|
||||
foundry.applications.apps.DocumentSheetConfig.registerSheet(
|
||||
@@ -77,7 +81,7 @@ Hooks.once("init", () => {
|
||||
"midgard6-lvd",
|
||||
M6HintergrundSheet,
|
||||
{
|
||||
types: ["legende"]
|
||||
types: ["hintergrund", "legende"]
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -3,6 +3,70 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<fieldset >
|
||||
<legend>{{localize "Midgard6.Item.type.münze.plural" }}</legend>
|
||||
<ul class="itemTypes">
|
||||
{{#with itemTypes.geld}}
|
||||
<li class="itemHeader">
|
||||
<div class="document-controls">
|
||||
{{#if @root.editable}}
|
||||
<a
|
||||
class="item-control item-create"
|
||||
title="{{localize 'DOCUMENT.Create' type=this.label}}"
|
||||
data-action="createDoc"
|
||||
data-document-class="Item"
|
||||
data-type="geld"
|
||||
>
|
||||
<i class="fas fa-plus"></i>
|
||||
{{localize "DOCUMENT.Create" type=this.label}}
|
||||
</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</li>
|
||||
<ul class="items">
|
||||
{{#each this.items as |item|}}
|
||||
<li class="item flexrow draggable" data-item-id="{{item._id}}" data-type="Item" data-document-class="Item">
|
||||
<img src="{{item.img}}" alt="{{item.name}}" width="24" height="24" />
|
||||
<div class="item-name">{{item.system.anzahl}}x {{item.name}}</div>
|
||||
<div class="document-controls">
|
||||
<a
|
||||
class="item-control"
|
||||
data-action="decreaseDoc"
|
||||
data-item-id="{{item._id}}"
|
||||
>
|
||||
<i class="fas fa-minus"></i>
|
||||
</a>
|
||||
<a
|
||||
class="item-control"
|
||||
data-action="increaseDoc"
|
||||
data-item-id="{{item._id}}"
|
||||
>
|
||||
<i class="fas fa-plus"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="document-controls">
|
||||
<a
|
||||
class="item-control item-edit"
|
||||
title="{{localize 'DOCUMENT.Update' type=item.name}}"
|
||||
data-action="viewDoc"
|
||||
>
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
{{#if @root.editable}}
|
||||
<a
|
||||
class="item-control item-delete"
|
||||
title="{{localize 'DOCUMENT.Delete' type=item.name}}"
|
||||
data-action="deleteDoc"
|
||||
>
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/with}}
|
||||
</fieldset>
|
||||
<fieldset >
|
||||
<legend>{{localize "Midgard6.Item.type.item.plural" }}</legend>
|
||||
<ul class="itemTypes">
|
||||
|
||||
+2
-1
@@ -40,7 +40,8 @@
|
||||
"gunst": {},
|
||||
"makel": {},
|
||||
"schicksalsgabe": {},
|
||||
"legende": {}
|
||||
"legende": {},
|
||||
"geld": {}
|
||||
}
|
||||
},
|
||||
"compatibility": {
|
||||
|
||||
Reference in new issue
Block a user