Compare commits

...

6 Commits

Author SHA1 Message Date
Erebus a26cc89686 v0.1.2 2022-02-21 10:45:36 +01:00
Erebus 58c3fbcd42 v0.1.0 2022-02-21 10:12:27 +01:00
Erebus 6962d6fc04 Merge branch 'master' of ssh://pi.rikspolisen.se:2222/foundryvtt/kopparhavet 2021-07-28 13:10:53 +02:00
Erebus 3f044c0b97 fixed missing link 2021-07-28 13:10:40 +02:00
erebus cace9cc899 0.0.7 (#7)
finishing for version 0.0.7
Co-Authored-By: erebus <erebus@rikspolisen.se>
Co-Committed-By: erebus <erebus@rikspolisen.se>
2021-07-28 13:08:19 +02:00
erebus 0c1729a4b4 Uppdatera 'system.json' 2021-03-19 04:28:46 +00:00
36 changed files with 434 additions and 369 deletions

View File

@ -154,13 +154,13 @@ export class ActorSheetKH extends ActorSheet {
icon: '<i class="far dice"></i>', icon: '<i class="far dice"></i>',
callback: (li) => { callback: (li) => {
let itemId = li.data("itemId"); let itemId = li.data("itemId");
let _item = this.actor.items.find((element) => element._id == itemId); let _item = this.actor.items.find((element) => element.id == itemId);
// Retrieve skill based on name // Retrieve skill based on name
let skill = this.actor.items.find((element) => element.name === _item.data.data.skill.value); let skill = this.actor.items.find((element) => element.name === _item.data.skill.value);
let skillName = skill.name let skillName = skill.name
let skillValue = skill.data.data.value let skillValue = skill.data.value
let showValue = false let showValue = false
if(this.actor.data.type === "character") { if(this.actor.data.type === "character") {
@ -186,10 +186,10 @@ export class ActorSheetKH extends ActorSheet {
icon: '<i class="far dice"></i>', icon: '<i class="far dice"></i>',
callback: (li) => { callback: (li) => {
let itemId = li.data("itemId"); let itemId = li.data("itemId");
let _item = this.actor.items.find((element) => element._id == itemId); let _item = this.actor.items.find((element) => element.id == itemId);
let skillName = _item.name let skillName = _item.name
let skillValue = _item.data.data.value let skillValue = _item.data.value
let showValue = false let showValue = false
if(this.actor.data.type === "character") { if(this.actor.data.type === "character") {
@ -214,14 +214,14 @@ export class ActorSheetKH extends ActorSheet {
name: game.i18n.localize("MENU.SHOWROLLDIALOG"), name: game.i18n.localize("MENU.SHOWROLLDIALOG"),
icon: '<i class="far dice"></i>', icon: '<i class="far dice"></i>',
callback: (li) => { callback: (li) => {
let itemId = li.data("itemId"); let itemId = li.data("item-id");
let _item = this.actor.items.find((element) => element._id == itemId); let _item = this.actor.items.find((element) => element.id == itemId);
if (!_item) { if (!_item) {
_item = game.items.get(itemId); _item = game.items.get(itemId);
if (!_item) { if (!_item) {
console.log("IMPORT ERROR") console.log("IMPORT ERROR 1")
return return
} }
} }
@ -233,7 +233,7 @@ export class ActorSheetKH extends ActorSheet {
showValue = true showValue = true
} }
switch (_item.data.data.difficulty.value) { switch (_item.data.difficulty.value) {
case "simple": case "simple":
difficulty = 5 difficulty = 5
break; break;
@ -248,24 +248,24 @@ export class ActorSheetKH extends ActorSheet {
break; break;
} }
if(_item.data.data.roll.value === "roll" || _item.data.data.roll.value === "attackroll") { if(_item.data.roll.value === "roll" || _item.data.roll.value === "attackroll") {
// Retrieve skill based on name // Retrieve skill based on name
let skill = this.actor.items.find((element) => element.name === _item.data.data.roll.skill); let skill = this.actor.items.find((element) => element.name === _item.data.roll.skill);
let skillName = _item.name let skillName = _item.name
let skillValue = skill.data.data.value let skillValue = skill.data.value
if(this.actor.data.type === "character") { if(this.actor.data.type === "character") {
skillName = _item.name + " (" + skill.name + ")" skillName = _item.name + " (" + skill.name + ")"
} }
this.khRoller.rollSkillDialogInChat(skillName, skillValue, showValue, this.actor, difficulty) this.khRoller.rollSkillDialogInChat(skillName, skillValue, showValue, this.actor, difficulty)
} else if(_item.data.data.roll.value === "opposite") { } else if(_item.data.roll.value === "opposite") {
// Retrieve skill based on name // Retrieve skill based on name
let skill = this.actor.items.find((element) => element.name === _item.data.data.roll.skill); let skill = this.actor.items.find((element) => element.name === _item.data.roll.skill);
let skillName = _item.name let skillName = _item.name
let skillValue = skill.data.data.value let skillValue = skill.data.value
if(this.actor.data.type === "character") { if(this.actor.data.type === "character") {
skillName = _item.name + " (" + skill.name + ")" skillName = _item.name + " (" + skill.name + ")"
@ -274,62 +274,62 @@ export class ActorSheetKH extends ActorSheet {
let opposite = [] let opposite = []
// Retrieve skill based on name // Retrieve skill based on name
if(_item.data.data.roll.oppositeskill !== "") { if(_item.data.roll.oppositeskill !== "") {
let skill1 = this.actor.items.find((element) => element.name === _item.data.data.roll.oppositeskill); let skill1 = this.actor.items.find((element) => element.name === _item.data.roll.oppositeskill);
opposite.push(skill1.name) opposite.push(skill1.name)
} }
if(_item.data.data.roll.oppositeskilltwo !== "") { if(_item.data.roll.oppositeskilltwo !== "") {
let skill2 = this.actor.items.find((element) => element.name === _item.data.data.roll.oppositeskilltwo); let skill2 = this.actor.items.find((element) => element.name === _item.data.roll.oppositeskilltwo);
opposite.push(skill2.name) opposite.push(skill2.name)
} }
this.khRoller.rollSkillDialogInChat(skillName, skillValue, showValue, this.actor, difficulty, opposite) this.khRoller.rollSkillDialogInChat(skillName, skillValue, showValue, this.actor, difficulty, opposite)
} else if(_item.data.data.roll.value === "ritual") { } else if(_item.data.roll.value === "ritual") {
let skills = [] let skills = []
if(_item.data.data.roll.ritual.skillone !== "") { if(_item.data.roll.ritual.skillone !== "") {
let skill1 = this.actor.items.find((element) => element.name === _item.data.data.roll.ritual.skillone); let skill1 = this.actor.items.find((element) => element.name === _item.data.roll.ritual.skillone);
skills.push({ skills.push({
name: skill1.name, name: skill1.name,
value: skill1.data.data.value value: skill1.data.value
}); });
} }
if(_item.data.data.roll.ritual.skilltwo !== "") { if(_item.data.roll.ritual.skilltwo !== "") {
let skill2 = this.actor.items.find((element) => element.name === _item.data.data.roll.ritual.skilltwo); let skill2 = this.actor.items.find((element) => element.name === _item.data.roll.ritual.skilltwo);
skills.push({ skills.push({
name: skill2.name, name: skill2.name,
value: skill2.data.data.value value: skill2.data.value
}); });
} }
if(_item.data.data.roll.ritual.skillthree !== "") { if(_item.data.roll.ritual.skillthree !== "") {
let skill3 = this.actor.items.find((element) => element.name === _item.data.data.roll.ritual.skillthree); let skill3 = this.actor.items.find((element) => element.name === _item.data.roll.ritual.skillthree);
skills.push({ skills.push({
name: skill3.name, name: skill3.name,
value: skill3.data.data.value value: skill3.data.value
}); });
} }
if(_item.data.data.roll.ritual.skillfour !== "") { if(_item.data.roll.ritual.skillfour !== "") {
let skill4 = this.actor.items.find((element) => element.name === _item.data.data.roll.ritual.skillfour); let skill4 = this.actor.items.find((element) => element.name === _item.data.roll.ritual.skillfour);
skills.push({ skills.push({
name: skill4.name, name: skill4.name,
value: skill4.data.data.value value: skill4.data.value
}); });
} }
if(_item.data.data.roll.ritual.skillfive !== "") { if(_item.data.roll.ritual.skillfive !== "") {
let skill5 = this.actor.items.find((element) => element.name === _item.data.data.roll.ritual.skillfive); let skill5 = this.actor.items.find((element) => element.name === _item.data.roll.ritual.skillfive);
skills.push({ skills.push({
name: skill5.name, name: skill5.name,
value: skill5.data.data.value value: skill5.data.value
}); });
} }
@ -388,6 +388,7 @@ export class ActorSheetKH extends ActorSheet {
]); ]);
html.find(".feature").click(async (ev) => { html.find(".feature").click(async (ev) => {
console.log("feature")
const featureName = $(ev.currentTarget).data("feature"); const featureName = $(ev.currentTarget).data("feature");
const featureValue = this.actor.data.data.feature[featureName].value; const featureValue = this.actor.data.data.feature[featureName].value;
if (featureName === "one") { if (featureName === "one") {
@ -406,7 +407,7 @@ export class ActorSheetKH extends ActorSheet {
html.find(".item-delete").click((ev) => { html.find(".item-delete").click((ev) => {
let parent = $(ev.currentTarget).data("parent") let parent = $(ev.currentTarget).data("parent")
const li = $(ev.currentTarget).parents(parent); const li = $(ev.currentTarget).parents(parent);
const item = this.actor.getOwnedItem(li.data("itemId")); const item = this.actor.items.get(li.data("itemId"));
if(item) { if(item) {
if (item.type === "armor") { if (item.type === "armor") {
@ -417,10 +418,10 @@ export class ActorSheetKH extends ActorSheet {
this.actor.items.map((i) => { this.actor.items.map((i) => {
if (i.type === "armor") { if (i.type === "armor") {
if (i._id !== item._id && i.data.data.equipable.equipped && i.data?.data?.modifications) { if (i.id !== item.id && i.data.equipable.equipped && i.data?.data?.modifications) {
for (let k of Object.keys(i.data.data.modifications)) { for (let k of Object.keys(i.data.modifications)) {
if (i.data.data.modifications[k].modtype === "init") { if (i.data.modifications[k].modtype === "init") {
initValue = i.data.data.modifications[k].value; initValue = i.data.modifications[k].value;
} }
} }
} }
@ -434,23 +435,26 @@ export class ActorSheetKH extends ActorSheet {
} }
} }
this.actor.deleteOwnedItem(li.data("itemId")); this.actor.deleteEmbeddedDocuments("Item", [li.data("itemId")]);
//this.actor.deleteOwnedItem(li.data("itemId"));
li.slideUp(200, () => this.render(false)); li.slideUp(200, () => this.render(false));
}); });
// Edit Inventory Item // Edit Inventory Item
html.find(".item-edit").click(async (ev) => { html.find(".item-edit").click(async (ev) => {
console.log("item-edit")
let parent = $(ev.currentTarget).data("parent") let parent = $(ev.currentTarget).data("parent")
let li = $(ev.currentTarget).parents(parent); let li = $(ev.currentTarget).parents(parent);
let itemId = li.data("itemId"); let itemId = li.data("itemId");
let item = this.actor.getOwnedItem(itemId); let item = this.actor.items.get(itemId);
if (!item) { if (!item) {
item = game.items.get(itemId); item = game.items.get(itemId);
if (!item) { if (!item) {
console.log("IMPORT ERROR") console.log("IMPORT ERROR 2")
} }
} }
@ -463,13 +467,13 @@ export class ActorSheetKH extends ActorSheet {
html.find(".roll-spell-cost").click((ev) => { html.find(".roll-spell-cost").click((ev) => {
const li = $(ev.currentTarget).parents(".item-spell"); const li = $(ev.currentTarget).parents(".item-spell");
let itemId = li.data("itemId"); let itemId = li.data("itemId");
let spell = this.actor.getOwnedItem(itemId); let spell = this.actor.items.get(itemId);
if (!spell) { if (!spell) {
spell = game.items.get(itemId); spell = game.items.get(itemId);
if (!spell) { if (!spell) {
console.log("IMPORT ERROR") console.log("IMPORT ERROR 3")
return return
} }
} }
@ -486,14 +490,14 @@ export class ActorSheetKH extends ActorSheet {
html.find(".roll-spell-skill").click((ev) => { html.find(".roll-spell-skill").click((ev) => {
const li = $(ev.currentTarget).parents(".item-spell"); const li = $(ev.currentTarget).parents(".item-spell");
let itemId = li.data("itemId"); let itemId = li.data("item-id");
let spell = this.actor.getOwnedItem(itemId); let spell = this.actor.items.get(itemId);
if (!spell) { if (!spell) {
spell = game.items.get(itemId); spell = game.items.get(itemId);
if (!spell) { if (!spell) {
console.log("IMPORT ERROR") console.log("IMPORT ERROR 4")
return return
} }
} }
@ -614,8 +618,8 @@ export class ActorSheetKH extends ActorSheet {
/* Roll skill */ /* Roll skill */
html.find(".roll-skill").click((ev) => { html.find(".roll-skill").click((ev) => {
const li = $(ev.currentTarget).parents(".item-skill"); const li = $(ev.currentTarget).parents(".item-skill");
let itemId = li.data("itemId"); let itemId = li.data("item-id");
let _item = this.actor.items.find((element) => element._id == itemId); let _item = this.actor.items.find((element) => element.id === itemId);
let skillName = _item.name let skillName = _item.name
let skillValue = _item.data.data.value let skillValue = _item.data.data.value
@ -632,13 +636,13 @@ export class ActorSheetKH extends ActorSheet {
html.find(".roll-weapon-skill").click((ev) => { html.find(".roll-weapon-skill").click((ev) => {
const li = $(ev.currentTarget).parents(".item-weapon"); const li = $(ev.currentTarget).parents(".item-weapon");
let itemId = li.data("itemId"); let itemId = li.data("itemId");
let weapon = this.actor.getOwnedItem(itemId); let weapon = this.actor.items.get(itemId);
if (!weapon) { if (!weapon) {
weapon = game.items.get(itemId); weapon = game.items.get(itemId);
if (!weapon) { if (!weapon) {
console.log("IMPORT ERROR") console.log("IMPORT ERROR 5")
return return
} }
} }
@ -661,13 +665,13 @@ export class ActorSheetKH extends ActorSheet {
html.find(".roll-damage").click((ev) => { html.find(".roll-damage").click((ev) => {
const li = $(ev.currentTarget).parents(".item-weapon"); const li = $(ev.currentTarget).parents(".item-weapon");
let itemId = li.data("itemId"); let itemId = li.data("itemId");
let weapon = this.actor.getOwnedItem(itemId); let weapon = this.actor.items.get(itemId);
if (!weapon) { if (!weapon) {
weapon = game.items.get(itemId); weapon = game.items.get(itemId);
if (!weapon) { if (!weapon) {
console.log("IMPORT ERROR") console.log("IMPORT ERROR 6")
return return
} }
} }
@ -686,13 +690,13 @@ export class ActorSheetKH extends ActorSheet {
html.find(".roll-armor").click((ev) => { html.find(".roll-armor").click((ev) => {
const li = $(ev.currentTarget).parents(".item"); const li = $(ev.currentTarget).parents(".item");
let itemId = li.data("itemId"); let itemId = li.data("itemId");
let armor = this.actor.getOwnedItem(itemId); let armor = this.actor.items.get(itemId);
if (!armor) { if (!armor) {
armor = game.items.get(itemId); armor = game.items.get(itemId);
if (!armor) { if (!armor) {
console.log("IMPORT ERROR") console.log("IMPORT ERROR 7")
return return
} }
} }
@ -747,13 +751,13 @@ export class ActorSheetKH extends ActorSheet {
html.find(".roll-attack-damage").click((ev) => { html.find(".roll-attack-damage").click((ev) => {
const li = $(ev.currentTarget).parents(".item-attack"); const li = $(ev.currentTarget).parents(".item-attack");
let itemId = li.data("itemId"); let itemId = li.data("itemId");
let weapon = this.actor.getOwnedItem(itemId); let weapon = this.actor.items.get(itemId);
if (!weapon) { if (!weapon) {
weapon = game.items.get(itemId); weapon = game.items.get(itemId);
if (!weapon) { if (!weapon) {
console.log("IMPORT ERROR") console.log("IMPORT ERROR 8")
return return
} }
} }
@ -807,6 +811,12 @@ export class ActorSheetKH extends ActorSheet {
// Add or Remove relationship // Add or Remove relationship
html.find(".learning-control").click(this._onClickLearningControl.bind(this)); html.find(".learning-control").click(this._onClickLearningControl.bind(this));
html.find(".learning-delete").click(async (event) => {
event.preventDefault();
const a = event.currentTarget.closest(".learning");
const id = a.dataset["attribute"];
this.object.update({ "data.learning": { ["-=" + id]: null } });
});
html.find(".learning-click").click(this._onClickLearingLearned.bind(this)); html.find(".learning-click").click(this._onClickLearingLearned.bind(this));
/* Hjältarnas Tid specefic */ /* Hjältarnas Tid specefic */
@ -818,6 +828,7 @@ export class ActorSheetKH extends ActorSheet {
} }
async _onClickLearingLearned(event) { async _onClickLearingLearned(event) {
console.log("_onClickLearingLearned")
event.stopPropagation(); event.stopPropagation();
const li1 = $(event.currentTarget); const li1 = $(event.currentTarget);
const li2 = $(event.currentTarget).parents(".learning"); const li2 = $(event.currentTarget).parents(".learning");
@ -837,13 +848,11 @@ export class ActorSheetKH extends ActorSheet {
async _onClickLearningControl(event) { async _onClickLearningControl(event) {
event.preventDefault(); event.preventDefault();
const a = event.currentTarget; const action = event.currentTarget.dataset.action;
const action = a.dataset.action;
const attrs = this.object.data.data.learning;
const form = this.form;
// Add new modification // Add new modification
if (action === "create") { if (action === "create") {
const form = this.form;
const nk = new Date().getTime(); const nk = new Date().getTime();
let newKey = document.createElement("div"); let newKey = document.createElement("div");
@ -853,41 +862,43 @@ export class ActorSheetKH extends ActorSheet {
await this._onSubmit(event); await this._onSubmit(event);
} }
/*
// Remove existing modification // Remove existing modification
else if (action === "delete") { else if (action === "delete") {
const li = a.closest(".learning"); const a = event.currentTarget.closest(".learning");
li.parentElement.removeChild(li); const id = a.dataset["attribute"];
await this._onSubmit(event); this.object.update({ "data.learning": { ["-=" + id]: null } });
} }
*/
} }
async _onClickRelationshipControl(event) { async _onClickRelationshipControl(event) {
console.log("_onClickRelationshipControl")
event.preventDefault(); event.preventDefault();
const a = event.currentTarget; const action = event.currentTarget.dataset.action;
const action = a.dataset.action;
const attrs = this.object.data.data.relationships;
const form = this.form;
// Add new modification // Add new modification
if (action === "create") { if (action === "create") {
const form = this.form;
const nk = new Date().getTime(); const nk = new Date().getTime();
let newKey = document.createElement("div"); let newKey = document.createElement("div");
newKey.innerHTML = `<input class="relation-key" type="text" name="data.relationships.attr${nk}.key" value="attr${nk}" style="display: none;" /><input class="relation-key" type="text" name="data.relationships.attr${nk}.value" value="" style="display: none;" />`; newKey.innerHTML = `<input class="relation-key" type="text" name="data.relationships.attr${nk}.key" value="attr${nk}" style="display: none;" /><input class="relation-key" type="text" name="data.relationships.attr${nk}.value" value="" style="display: none;" />`;
form.appendChild(newKey); form.appendChild(newKey);
await this._onSubmit(event);
} }
// Remove existing modification // Remove existing modification
else if (action === "delete") { else if (action === "delete") {
const li = a.closest(".relation"); const ability = $(event.currentTarget).closest(".relation").data("attribute");
li.parentElement.removeChild(li); await this.object.update({ "data.relationships": { ["-=" + ability]: null } });
await this._onSubmit(event);
} }
await this._onSubmit(event);
} }
async _onClickRelationshipUsed(event) { async _onClickRelationshipUsed(event) {
console.log("_onClickRelationshipUsed")
event.stopPropagation(); event.stopPropagation();
const li = $(event.currentTarget).parents(".relation"); const li = $(event.currentTarget).parents(".relation");
@ -905,8 +916,9 @@ export class ActorSheetKH extends ActorSheet {
} }
async _toggleEquippedItem(event) { async _toggleEquippedItem(event) {
console.log("_toggleEquippedItem")
const li = $(event.currentTarget); const li = $(event.currentTarget);
const item = this.actor.getOwnedItem(li.data("itemId")); const item = this.actor.items.get(li.data("itemId"));
const actor = this.actor; const actor = this.actor;
if(item) { if(item) {
@ -918,7 +930,7 @@ export class ActorSheetKH extends ActorSheet {
actor.items.map((i) => { actor.items.map((i) => {
if(i.type === "armor") { if(i.type === "armor") {
if(i._id !== item._id && i.data.data.equipable.equipped && i.data?.data?.modifications) { if(i.id !== item.id && i.data.data.equipable.equipped && i.data?.data?.modifications) {
for(let k of Object.keys(i.data.data.modifications)) { for(let k of Object.keys(i.data.data.modifications)) {
if(i.data.data.modifications[k].modtype === "init") { if(i.data.data.modifications[k].modtype === "init") {
initValue = i.data.data.modifications[k].value; initValue = i.data.data.modifications[k].value;
@ -949,28 +961,30 @@ export class ActorSheetKH extends ActorSheet {
} }
async _increaseQuantity(event) { async _increaseQuantity(event) {
console.log("_increaseQuantity")
event.stopPropagation(); event.stopPropagation();
const li = $(event.currentTarget).parents(".item"); const li = $(event.currentTarget).parents(".item");
let itemId = li.data("itemId"); let itemId = li.data("itemId");
let item = this.actor.getOwnedItem(itemId); let item = this.actor.items.get(itemId);
if (!item) { if (!item) {
console.log("IMPORT ERROR") console.log("IMPORT ERROR 9")
} }
item.update({ ["data.quantity.value"]: item.data.data.quantity.value + 1 }); item.update({ ["data.quantity.value"]: item.data.data.quantity.value + 1 });
} }
async _decreaseQuantity(event) { async _decreaseQuantity(event) {
console.log("_decreaseQuantity")
event.stopPropagation(); event.stopPropagation();
const li = $(event.currentTarget).parents(".item"); const li = $(event.currentTarget).parents(".item");
let itemId = li.data("itemId"); let itemId = li.data("itemId");
let item = this.actor.getOwnedItem(itemId); let item = this.actor.items.get(itemId);
if (!item) { if (!item) {
console.log("IMPORT ERROR") console.log("IMPORT ERROR 10")
} }
let count = item.data.data.quantity.value - 1 > 0 ? item.data.data.quantity.value - 1 : 0; let count = item.data.data.quantity.value - 1 > 0 ? item.data.data.quantity.value - 1 : 0;
@ -979,25 +993,27 @@ export class ActorSheetKH extends ActorSheet {
} }
async _onChangeSkillValue(event) { async _onChangeSkillValue(event) {
console.log("_decreaseQuantity")
event.preventDefault(); event.preventDefault();
const itemId = $(event.currentTarget).data("item-id"); const itemId = $(event.currentTarget).data("item-id");
let _item = this.actor.items.find((element) => element._id == itemId); let _item = this.actor.items.find((element) => element.id == itemId);
if (_item) { if (_item) {
let update = { let update = {
_id: _item._id, _id: _item.id,
data: { value: $(event.currentTarget).val() }, data: { value: $(event.currentTarget).val() },
}; };
await this.actor.updateEmbeddedEntity("OwnedItem", update); await this.actor.updateEmbeddedDocuments("Item", [update]);
} }
} }
async _onClickSkill(event) { async _onClickSkill(event) {
console.log("_onClickSkill")
event.preventDefault(); event.preventDefault();
const itemId = $(event.currentTarget).data("item-id"); const itemId = $(event.currentTarget).data("item-id");
let _item = this.actor.items.find((element) => element._id == itemId); let _item = this.actor.items.find((element) => element.id == itemId);
if (_item) { if (_item) {
let newVal = true; let newVal = true;
@ -1007,10 +1023,10 @@ export class ActorSheetKH extends ActorSheet {
} }
let update = { let update = {
_id: _item._id, _id: _item.id,
data: { used: newVal }, data: { used: newVal },
}; };
await this.actor.updateEmbeddedEntity("OwnedItem", update); await this.actor.updateEmbeddedDocuments("Item", [update]);
} }
} }
@ -1026,14 +1042,15 @@ export class ActorSheetKH extends ActorSheet {
* @private * @private
*/ */
async _itemDetailsToChat(itemId) { async _itemDetailsToChat(itemId) {
let item = this.actor.getOwnedItem(itemId); console.log("_itemDetailsToChat")
let item = this.actor.items.get(itemId);
if (!item) { if (!item) {
item = game.items.get(itemId); item = game.items.get(itemId);
} }
if (!item) { if (!item) {
console.log("IMPORT ERROR") console.log("IMPORT ERROR 11")
return return
} }
@ -1041,11 +1058,11 @@ export class ActorSheetKH extends ActorSheet {
const html = await renderTemplate("systems/kopparhavet/templates/chat/item-card.html", itemDetails); const html = await renderTemplate("systems/kopparhavet/templates/chat/item-card.html", itemDetails);
const messageData = { const messageData = {
user: game.user._id, user: game.user.id,
type: CONST.CHAT_MESSAGE_TYPES.OTHER, type: CONST.CHAT_MESSAGE_TYPES.OTHER,
content: html, content: html,
speaker: { speaker: {
actor: this.actor._id, actor: this.actor.id,
token: this.actor.token, token: this.actor.token,
alias: this.actor.name, alias: this.actor.name,
}, },

View File

@ -13,8 +13,8 @@ export default class ActorHelpers {
}, {}); }, {});
// Remove modifications which are no longer used // Remove modifications which are no longer used
if (this.object.data?.data?.relationships) { if (this.object.data?.relationships) {
for (let k of Object.keys(this.object.data.data.relationships)) { for (let k of Object.keys(this.object.data.relationships)) {
if (!relationships.hasOwnProperty(k)) relationships[`-=${k}`] = null; if (!relationships.hasOwnProperty(k)) relationships[`-=${k}`] = null;
} }
} }
@ -36,8 +36,8 @@ export default class ActorHelpers {
}, {}); }, {});
// Remove modifications which are no longer used // Remove modifications which are no longer used
if (this.object.data?.data?.learning) { if (this.object.data?.learning) {
for (let k of Object.keys(this.object.data.data.learning)) { for (let k of Object.keys(this.object.data.learning)) {
if (!learning.hasOwnProperty(k)) learning[`-=${k}`] = null; if (!learning.hasOwnProperty(k)) learning[`-=${k}`] = null;
} }
} }

View File

@ -4,11 +4,11 @@ export default class KHDiceRoller {
const roll = new Roll(formula); const roll = new Roll(formula);
let res = roll.roll(); await roll.evaluate();
let rollData = { let rollData = {
name: "SPELL.COST", name: "SPELL.COST",
res: res, res: roll,
showFormula: true showFormula: true
}; };
@ -23,9 +23,9 @@ export default class KHDiceRoller {
await roll.toMessage({ await roll.toMessage({
create: true, create: true,
content: html, content: html,
user: game.user._id, user: game.user.id,
speaker: { speaker: {
actor: speaker._id, actor: speaker.id,
token: speaker.token, token: speaker.token,
alias: speaker.name, alias: speaker.name,
}, },
@ -37,11 +37,11 @@ export default class KHDiceRoller {
const roll = new Roll(formula); const roll = new Roll(formula);
let res = roll.roll(); await roll.evaluate();
let rollData = { let rollData = {
name: "ITEM.DAMAGE", name: "ITEM.DAMAGE",
res: res, res: roll,
showFormula: true showFormula: true
}; };
@ -50,9 +50,9 @@ export default class KHDiceRoller {
await roll.toMessage({ await roll.toMessage({
create: true, create: true,
content: html, content: html,
user: game.user._id, user: game.user.id,
speaker: { speaker: {
actor: speaker._id, actor: speaker.id,
token: speaker.token, token: speaker.token,
alias: speaker.name, alias: speaker.name,
}, },
@ -68,11 +68,11 @@ export default class KHDiceRoller {
const roll = new Roll(formula); const roll = new Roll(formula);
let res = roll.roll(); await roll.evaluate();
let rollData = { let rollData = {
name: "ITEM.DEFENCE", name: "ITEM.DEFENCE",
res: res, res: roll,
showFormula: true showFormula: true
}; };
@ -81,9 +81,9 @@ export default class KHDiceRoller {
await roll.toMessage({ await roll.toMessage({
create: true, create: true,
content: html, content: html,
user: game.user._id, user: game.user.id,
speaker: { speaker: {
actor: speaker._id, actor: speaker.id,
token: speaker.token, token: speaker.token,
alias: speaker.name, alias: speaker.name,
}, },
@ -93,7 +93,7 @@ export default class KHDiceRoller {
async rollSkillInChat(skillName, skillValue, showValue, speaker, openclosed, opposite) { async rollSkillInChat(skillName, skillValue, showValue, speaker, openclosed, opposite) {
const roll = new Roll(`1d100`); const roll = new Roll(`1d100`);
let res = roll.roll(); await roll.evaluate();
let computedName = skillName let computedName = skillName
@ -120,13 +120,13 @@ export default class KHDiceRoller {
let rollData = { let rollData = {
name: computedName, name: computedName,
res: res, res: roll,
opposite: oppositeValue opposite: oppositeValue
}; };
if(skillValue > 0) { if(skillValue > 0) {
let oneRes = Math.floor((res.total / 1) % 10); let oneRes = Math.floor((roll.total / 1) % 10);
let tenRes = Math.floor((res.total / 10) % 10); let tenRes = Math.floor((roll.total / 10) % 10);
if(openclosed < 0) { if(openclosed < 0) {
rollData.closed = Math.abs(openclosed) rollData.closed = Math.abs(openclosed)
@ -143,7 +143,7 @@ export default class KHDiceRoller {
// roll is opened // roll is opened
rollData.success = true rollData.success = true
} else { } else {
if (res.total <= skillValue) { if (roll.total <= skillValue) {
rollData.success = true rollData.success = true
} else { } else {
rollData.failure = true rollData.failure = true
@ -160,9 +160,9 @@ export default class KHDiceRoller {
await roll.toMessage({ await roll.toMessage({
create: true, create: true,
content: html, content: html,
user: game.user._id, user: game.user.id,
speaker: { speaker: {
actor: speaker._id, actor: speaker.id,
token: speaker.token, token: speaker.token,
alias: speaker.name, alias: speaker.name,
}, },
@ -295,7 +295,7 @@ export default class KHDiceRoller {
totalrolls++ totalrolls++
const roll = new Roll(`1d100`); const roll = new Roll(`1d100`);
let res = roll.roll(); await roll.evaluate();
let skillName = skill.name let skillName = skill.name
let success = false let success = false
@ -307,7 +307,7 @@ export default class KHDiceRoller {
let rollData2 = { let rollData2 = {
name: skillName, name: skillName,
res: res, res: roll,
}; };
if(openclosed < 0) { if(openclosed < 0) {
@ -319,7 +319,7 @@ export default class KHDiceRoller {
} }
if(skill.value > 0) { if(skill.value > 0) {
let oneRes = Math.floor((res.total / 1) % 10); let oneRes = Math.floor((roll.total / 1) % 10);
//let tenRes = Math.floor((res.total / 10) % 10); //let tenRes = Math.floor((res.total / 10) % 10);
if(openclosed < 0 && oneRes !== 0 && Math.abs(openclosed) >= oneRes) { if(openclosed < 0 && oneRes !== 0 && Math.abs(openclosed) >= oneRes) {
@ -330,7 +330,7 @@ export default class KHDiceRoller {
success = true success = true
successes++ successes++
} else { } else {
if (res.total <= skill.value) { if (roll.total <= skill.value) {
success = true success = true
successes++ successes++
} else { } else {
@ -343,7 +343,7 @@ export default class KHDiceRoller {
name: skillName, name: skillName,
failure: failure, failure: failure,
success: success, success: success,
result: res, result: roll,
}) })
rollData2.success = success rollData2.success = success
@ -354,9 +354,9 @@ export default class KHDiceRoller {
await roll.toMessage({ await roll.toMessage({
create: true, create: true,
content: html, content: html,
user: game.user._id, user: game.user.id,
speaker: { speaker: {
actor: speaker._id, actor: speaker.id,
token: speaker.token, token: speaker.token,
alias: speaker.name, alias: speaker.name,
}, },
@ -427,9 +427,9 @@ export default class KHDiceRoller {
await ChatMessage.create({ await ChatMessage.create({
create: true, create: true,
content: html, content: html,
user: game.user._id, user: game.user.id,
speaker: { speaker: {
actor: speaker._id, actor: speaker.id,
token: speaker.token, token: speaker.token,
alias: speaker.name, alias: speaker.name,
}, },

View File

@ -17,8 +17,8 @@ export default class ItemHelpers {
}, {}); }, {});
// Remove modifications which are no longer used // Remove modifications which are no longer used
if (this.object.data?.data?.modifications) { if (this.object.data?.modifications) {
for (let k of Object.keys(this.object.data.data.modifications)) { for (let k of Object.keys(this.object.data.modifications)) {
if (!modifications.hasOwnProperty(k)) modifications[`-=${k}`] = null; if (!modifications.hasOwnProperty(k)) modifications[`-=${k}`] = null;
} }
} }

View File

@ -28,7 +28,7 @@ export class ItemSheetKH extends ItemSheet {
data.dtypes = ["String", "Number", "Boolean"]; data.dtypes = ["String", "Number", "Boolean"];
if (data?.data?.modifications) { if (data?.data?.modifications) {
for (let attr of Object.values(data.data.modifications)) { for (let attr of Object.values(data.modifications)) {
attr.isCheckbox = attr.dtype === "Boolean"; attr.isCheckbox = attr.dtype === "Boolean";
} }
} }
@ -39,23 +39,32 @@ export class ItemSheetKH extends ItemSheet {
let skillList2 let skillList2
if(game.settings.get("kopparhavet", "gameSystem") === "hjaltarnas-tid") { if(game.settings.get("kopparhavet", "gameSystem") === "hjaltarnas-tid") {
skillList2 = await game.packs.get("kopparhavet.skills-ht").getContent(); skillList2 = await game.packs.get("kopparhavet.skills-ht").getDocuments();
} else { } else {
skillList2 = await game.packs.get("kopparhavet.skills").getContent(); skillList2 = await game.packs.get("kopparhavet.skills").getDocuments();
} }
for (let item of skillList2) { for (let item of skillList2) {
if(item.data.type === "skill" && item.data.data.type.value === "combat") { if(item.data.type === "skill" && item.data.data.type.value === "combat") {
skillList.push(item) skillList.push(item.data)
} }
} }
// Retrieve any created skills as well // Retrieve any created skills as well
for (let item of game.items.entities) { game.items.forEach((item) => {
if(item.data.type === "skill" && item.data.data.type.value === "combat") { if(item.data.type === "skill" && item.data.data.type.value === "combat") {
skillList.push(item) skillList.push(item.data)
}
});
/*
for (let item of game.items.entities) {
if(item.data.type === "skill" && item.data.type.value === "combat") {
skillList.push(item.data)
} }
} }
*/
this.position.width = 530; this.position.width = 530;
this.position.height = 750; this.position.height = 750;
break; break;
@ -77,23 +86,33 @@ export class ItemSheetKH extends ItemSheet {
let skillList3 let skillList3
if(game.settings.get("kopparhavet", "gameSystem") === "hjaltarnas-tid") { if(game.settings.get("kopparhavet", "gameSystem") === "hjaltarnas-tid") {
skillList3 = await game.packs.get("kopparhavet.skills-ht").getContent(); skillList3 = await game.packs.get("kopparhavet.skills-ht").getDocuments();
} else { } else {
skillList3 = await game.packs.get("kopparhavet.skills").getContent(); skillList3 = await game.packs.get("kopparhavet.skills").getDocuments();
} }
for (let item of skillList3) { for (let item of skillList3) {
if(item.data.type === "skill") { if(item.data.type === "skill") {
skillList.push(item) skillList.push(item.data)
} }
} }
// Retrieve any created skills as well
game.items.forEach((item) => {
if(item.data.type === "skill") {
skillList.push(item.data)
}
});
/*
// Retrieve any created skills as well // Retrieve any created skills as well
for (let item of game.items.entities) { for (let item of game.items.entities) {
if(item.data.type === "skill") { if(item.data.type === "skill") {
skillList.push(item) skillList.push(item.data)
} }
} }
*/
this.position.width = 450; this.position.width = 450;
this.position.height = 605; this.position.height = 605;
break; break;
@ -102,23 +121,32 @@ export class ItemSheetKH extends ItemSheet {
let skillList4 let skillList4
if(game.settings.get("kopparhavet", "gameSystem") === "hjaltarnas-tid") { if(game.settings.get("kopparhavet", "gameSystem") === "hjaltarnas-tid") {
skillList4 = await game.packs.get("kopparhavet.skills-ht").getContent(); skillList4 = await game.packs.get("kopparhavet.skills-ht").getDocuments();
} else { } else {
skillList4 = await game.packs.get("kopparhavet.skills").getContent(); skillList4 = await game.packs.get("kopparhavet.skills").getDocuments();
} }
for (let item of skillList4) { for (let item of skillList4) {
if(item.data.type === "skill" && item.data.data.type.value === "combat") { if(item.data.type === "skill" && item.data.data.type.value === "combat") {
skillList.push(item) skillList.push(item.data)
} }
} }
// Retrieve any created skills as well
game.items.forEach((item) => {
if(item.data.type === "skill" && item.data.data.type.value === "combat") {
skillList.push(item.data)
}
});
/*
// Retrieve any created skills as well // Retrieve any created skills as well
for (let item of game.items.entities) { for (let item of game.items.entities) {
if(item.data.type === "skill" && item.data.data.type.value === "combat") { if(item.data.type === "skill" && item.data.data.type.value === "combat") {
skillList.push(item) skillList.push(item.data)
} }
} }
*/
this.position.width = 530; this.position.width = 530;
this.position.height = 750; this.position.height = 750;
break; break;
@ -146,11 +174,11 @@ export class ItemSheetKH extends ItemSheet {
const clickedName = $(ev.currentTarget).data("name"); const clickedName = $(ev.currentTarget).data("name");
if(clickedName === "equipped") { if(clickedName === "equipped") {
const equppiedValue = this.item.data.data.equipable.equipped; const equppiedValue = this.item.data.equipable.equipped;
this.item.update({ "data.equipped.equipped": !equppiedValue }); this.item.update({ "data.equipped.equipped": !equppiedValue });
} else { } else {
const clickedValue = (this.item.data.data[clickedName].value == undefined ? false : this.item.data.data[clickedName].value); const clickedValue = (this.item.data[clickedName].value == undefined ? false : this.item.data[clickedName].value);
let dataName = "data." + clickedName + ".value" let dataName = "data." + clickedName + ".value"
let tempData = {} let tempData = {}
@ -174,7 +202,7 @@ export class ItemSheetKH extends ItemSheet {
event.preventDefault(); event.preventDefault();
const a = event.currentTarget; const a = event.currentTarget;
const action = a.dataset.action; const action = a.dataset.action;
const attrs = this.object.data.data.modifications; const attrs = this.object.data.modifications;
const form = this.form; const form = this.form;
// Add new modification // Add new modification

View File

@ -27,7 +27,7 @@ export class ItemKH extends Item {
const html = await renderTemplate("systems/kopparhavet/templates/chat/item-card.html", itemData); const html = await renderTemplate("systems/kopparhavet/templates/chat/item-card.html", itemData);
const chatData = { const chatData = {
user: game.user._id, user: game.user.id,
rollMode: game.settings.get("core", "rollMode"), rollMode: game.settings.get("core", "rollMode"),
content: html, content: html,
}; };

View File

@ -57,7 +57,7 @@ class KHDice {
const html2 = await renderTemplate("systems/kopparhavet/templates/dice/roll.html", rollData); const html2 = await renderTemplate("systems/kopparhavet/templates/dice/roll.html", rollData);
await r.toMessage({ await r.toMessage({
user: game.user._id, user: game.user.id,
create: true, create: true,
content: html2 content: html2
}); });

View File

@ -10,10 +10,10 @@ export default class KHHooks {
actor.update({ "data.currency.shekel.label": "CURRENCY.SILVER" }); actor.update({ "data.currency.shekel.label": "CURRENCY.SILVER" });
actorbaseSkills = CONFIG.KH.baseSkillsHT actorbaseSkills = CONFIG.KH.baseSkillsHT
skillIndex = await game.packs.get("kopparhavet.skills-ht").getContent(); skillIndex = await game.packs.get("kopparhavet.skills-ht").getDocuments();
} else { } else {
actorbaseSkills = CONFIG.KH.baseSkills; actorbaseSkills = CONFIG.KH.baseSkills;
skillIndex = await game.packs.get("kopparhavet.skills").getContent(); skillIndex = await game.packs.get("kopparhavet.skills").getDocuments();
} }
// Check if skill already exists by some chance // Check if skill already exists by some chance
@ -23,7 +23,15 @@ export default class KHHooks {
// Filter skillIndex array to include only skills for Actor Type. // Filter skillIndex array to include only skills for Actor Type.
let _skillsList = skillIndex.filter((i) => skillsToAdd.includes(i.data.name)); let _skillsList = skillIndex.filter((i) => skillsToAdd.includes(i.data.name));
await actor.createEmbeddedEntity("OwnedItem", _skillsList); let _sl = [];
_skillsList.forEach((s) => {
//s.data._source.data["creatureType"] = actor.data.type;
//s.data._source.data["coreSkill"] = true;
_sl.push(s.data);
});
await actor.createEmbeddedDocuments("Item", _sl);
//await actor.createEmbeddedDocuments("Item", [_skillsList.toObject()]);
} else { } else {
setTimeout(async function () { setTimeout(async function () {
await actor.sheet.render(true); await actor.sheet.render(true);

View File

@ -9,8 +9,8 @@ import * as migrations from "./helpers/migration-helper.js";
Hooks.once("init", () => { Hooks.once("init", () => {
CONFIG.Combat.initiative = { formula: "(@combat.init)d6kh2", decimals: 0 }; CONFIG.Combat.initiative = { formula: "(@combat.init)d6kh2", decimals: 0 };
CONFIG.Actor.entityClass = ActorKH; CONFIG.Actor.documentClass = ActorKH;
CONFIG.Item.entityClass = ItemKH; CONFIG.Item.documentClass = ItemKH;
// Give global access to FFG config. // Give global access to FFG config.
CONFIG.KH = KH; CONFIG.KH = KH;

View File

@ -2,9 +2,9 @@
"name": "kopparhavet", "name": "kopparhavet",
"title": "Kopparhavets Hjältar", "title": "Kopparhavets Hjältar",
"description": "The Molten Sea is a dangerous but exciting place, where pirates, sorcerers and secretive orders of knighthood struggle for power, wealth and ancient lore.", "description": "The Molten Sea is a dangerous but exciting place, where pirates, sorcerers and secretive orders of knighthood struggle for power, wealth and ancient lore.",
"version": "0.0.6", "version": "0.1.2",
"minimumCoreVersion": "0.7.5", "minimumCoreVersion": "9",
"compatibleCoreVersion": "0.7.9", "compatibleCoreVersion": "9",
"templateVersion": 4, "templateVersion": 4,
"author": "Erebus", "author": "Erebus",
"scripts": [], "scripts": [],
@ -95,6 +95,6 @@
"url": "https://pi.rikspolisen.se/foundryvtt/kopparhavet", "url": "https://pi.rikspolisen.se/foundryvtt/kopparhavet",
"socket": true, "socket": true,
"manifest": "https://pi.rikspolisen.se/foundryvtt/kopparhavet/raw/branch/master/system.json", "manifest": "https://pi.rikspolisen.se/foundryvtt/kopparhavet/raw/branch/master/system.json",
"download": "https://pi.rikspolisen.se/foundryvtt/kopparhavet/archive/v0.0.5.zip", "download": "https://pi.rikspolisen.se/foundryvtt/kopparhavet/archive/v0.1.2.zip",
"license": "LICENCE.txt" "license": "LICENCE.txt"
} }

View File

@ -8,25 +8,25 @@
<label style="margin: auto;">{{localize "BIO.NAME"}}:</label> <label style="margin: auto;">{{localize "BIO.NAME"}}:</label>
<h1 class="charname" style="margin-bottom: 0;grid-column: 3/6;"><input name="name" type="text" value="{{actor.name}}" placeholder="{{localize "BIO.NAME"}}" /></h1> <h1 class="charname" style="margin-bottom: 0;grid-column: 3/6;"><input name="name" type="text" value="{{actor.name}}" placeholder="{{localize "BIO.NAME"}}" /></h1>
<label style="margin: auto;">{{localize data.health.label}}:</label> <label style="margin: auto;">{{localize data.data.health.label}}:</label>
<div class="grid-container" style="grid-template-columns: auto 1fr auto;"> <div class="grid-container" style="grid-template-columns: auto 1fr auto;">
<input class="center-text" type="text" name="data.health.value" value="{{data.health.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.health.value" value="{{data.data.health.value}}" data-dtype="Number" />
<span> / </span> <span> / </span>
<input class="center-text" type="text" name="data.health.max" value="{{data.health.max}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.health.max" value="{{data.data.health.max}}" data-dtype="Number" />
</div> </div>
<label style="margin: auto;">{{localize data.stamina.label}}:</label> <label style="margin: auto;">{{localize data.data.stamina.label}}:</label>
<div class="grid-container" style="grid-template-columns: auto 1fr auto;"> <div class="grid-container" style="grid-template-columns: auto 1fr auto;">
<input class="center-text" type="text" name="data.stamina.value" value="{{data.stamina.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.stamina.value" value="{{data.data.stamina.value}}" data-dtype="Number" />
<span> / </span> <span> / </span>
<input class="center-text" type="text" name="data.stamina.max" value="{{data.stamina.max}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.stamina.max" value="{{data.data.stamina.max}}" data-dtype="Number" />
</div> </div>
<label style="margin: auto;">{{localize data.mana.label}}:</label> <label style="margin: auto;">{{localize data.data.mana.label}}:</label>
<div class="grid-container" style="grid-template-columns: auto 1fr auto;"> <div class="grid-container" style="grid-template-columns: auto 1fr auto;">
<input class="center-text" type="text" name="data.mana.value" value="{{data.mana.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.mana.value" value="{{data.data.mana.value}}" data-dtype="Number" />
<span> / </span> <span> / </span>
<input class="center-text" type="text" name="data.mana.max" value="{{data.mana.max}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.mana.max" value="{{data.data.mana.max}}" data-dtype="Number" />
</div> </div>
</div> </div>
@ -44,7 +44,7 @@
{{> systems/kopparhavet/templates/parts/actor/talent.html}} {{> systems/kopparhavet/templates/parts/actor/talent.html}}
</div> </div>
<div class="tab border note" data-group="primary" data-tab="note" style="height: 100%; border-top: none;"> <div class="tab border note" data-group="primary" data-tab="note" style="height: 100%; border-top: none;">
{{editor content=data.bio.note.value target="data.bio.note.value" button=true owner=owner editable=editable}} {{editor content=data.data.bio.note.value target="data.bio.note.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,31 +8,31 @@
<label style="margin: auto;">{{localize "BIO.NAME"}}:</label> <label style="margin: auto;">{{localize "BIO.NAME"}}:</label>
<h1 class="charname" style="margin-bottom: 0;grid-column: 3/6;"><input name="name" type="text" value="{{actor.name}}" placeholder="{{localize "BIO.NAME"}}" /></h1> <h1 class="charname" style="margin-bottom: 0;grid-column: 3/6;"><input name="name" type="text" value="{{actor.name}}" placeholder="{{localize "BIO.NAME"}}" /></h1>
<label style="margin: auto;">{{localize data.bio.kin.label}}:</label> <label style="margin: auto;">{{localize data.data.bio.kin.label}}:</label>
<input name="data.bio.kin.value" type="text" value="{{data.bio.kin.value}}" placeholder="{{localize data.bio.kin.label}}" /> <input name="data.bio.kin.value" type="text" value="{{data.data.bio.kin.value}}" placeholder="{{localize data.data.bio.kin.label}}" />
<label style="margin: auto;">{{localize data.bio.profession.label}}:</label> <label style="margin: auto;">{{localize data.data.bio.profession.label}}:</label>
<input name="data.bio.profession.value" type="text" value="{{data.bio.profession.value}}" placeholder="{{localize data.bio.profession.label}}" /> <input name="data.bio.profession.value" type="text" value="{{data.data.bio.profession.value}}" placeholder="{{localize data.data.bio.profession.label}}" />
<label style="margin: auto;">{{localize data.health.label}}:</label> <label style="margin: auto;">{{localize data.data.health.label}}:</label>
<div class="grid-container" style="grid-template-columns: auto 1fr auto;"> <div class="grid-container" style="grid-template-columns: auto 1fr auto;">
<input class="center-text" type="text" name="data.health.value" value="{{data.health.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.health.value" value="{{data.data.health.value}}" data-dtype="Number" />
<span> / </span> <span> / </span>
<input class="center-text" type="text" name="data.health.max" value="{{data.health.max}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.health.max" value="{{data.data.health.max}}" data-dtype="Number" />
</div> </div>
<label style="margin: auto;">{{localize data.stamina.label}}:</label> <label style="margin: auto;">{{localize data.data.stamina.label}}:</label>
<div class="grid-container" style="grid-template-columns: auto 1fr auto;"> <div class="grid-container" style="grid-template-columns: auto 1fr auto;">
<input class="center-text" type="text" name="data.stamina.value" value="{{data.stamina.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.stamina.value" value="{{data.data.stamina.value}}" data-dtype="Number" />
<span> / </span> <span> / </span>
<input class="center-text" type="text" name="data.stamina.max" value="{{data.stamina.max}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.stamina.max" value="{{data.data.stamina.max}}" data-dtype="Number" />
</div> </div>
<label style="margin: auto;">{{localize data.mana.label}}:</label> <label style="margin: auto;">{{localize data.data.mana.label}}:</label>
<div class="grid-container" style="grid-template-columns: auto 1fr auto;"> <div class="grid-container" style="grid-template-columns: auto 1fr auto;">
<input class="center-text" type="text" name="data.mana.value" value="{{data.mana.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.mana.value" value="{{data.data.mana.value}}" data-dtype="Number" />
<span> / </span> <span> / </span>
<input class="center-text" type="text" name="data.mana.max" value="{{data.mana.max}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.mana.max" value="{{data.data.mana.max}}" data-dtype="Number" />
</div> </div>
</div> </div>
@ -62,7 +62,7 @@
{{> systems/kopparhavet/templates/parts/actor/bio.html}} {{> systems/kopparhavet/templates/parts/actor/bio.html}}
</div> </div>
<div class="tab note border" data-group="primary" data-tab="note" style="border-top: none;"> <div class="tab note border" data-group="primary" data-tab="note" style="border-top: none;">
{{editor content=data.bio.note.value target="data.bio.note.value" button=true owner=owner editable=editable}} {{editor content=data.data.bio.note.value target="data.bio.note.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,25 +8,25 @@
<label style="margin: auto;">{{localize "BIO.NAME"}}:</label> <label style="margin: auto;">{{localize "BIO.NAME"}}:</label>
<h1 class="charname" style="margin-bottom: 0;grid-column: 3/6;"><input name="name" type="text" value="{{actor.name}}" placeholder="{{localize "BIO.NAME"}}" /></h1> <h1 class="charname" style="margin-bottom: 0;grid-column: 3/6;"><input name="name" type="text" value="{{actor.name}}" placeholder="{{localize "BIO.NAME"}}" /></h1>
<label style="margin: auto;">{{localize data.health.label}}:</label> <label style="margin: auto;">{{localize data.data.health.label}}:</label>
<div class="grid-container" style="grid-template-columns: auto 1fr auto;"> <div class="grid-container" style="grid-template-columns: auto 1fr auto;">
<input class="center-text" type="text" name="data.health.value" value="{{data.health.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.health.value" value="{{data.data.health.value}}" data-dtype="Number" />
<span> / </span> <span> / </span>
<input class="center-text" type="text" name="data.health.max" value="{{data.health.max}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.health.max" value="{{data.data.health.max}}" data-dtype="Number" />
</div> </div>
<label style="margin: auto;">{{localize data.stamina.label}}:</label> <label style="margin: auto;">{{localize data.data.stamina.label}}:</label>
<div class="grid-container" style="grid-template-columns: auto 1fr auto;"> <div class="grid-container" style="grid-template-columns: auto 1fr auto;">
<input class="center-text" type="text" name="data.stamina.value" value="{{data.stamina.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.stamina.value" value="{{data.data.stamina.value}}" data-dtype="Number" />
<span> / </span> <span> / </span>
<input class="center-text" type="text" name="data.stamina.max" value="{{data.stamina.max}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.stamina.max" value="{{data.data.stamina.max}}" data-dtype="Number" />
</div> </div>
<label style="margin: auto;">{{localize data.mana.label}}:</label> <label style="margin: auto;">{{localize data.data.mana.label}}:</label>
<div class="grid-container" style="grid-template-columns: auto 1fr auto;"> <div class="grid-container" style="grid-template-columns: auto 1fr auto;">
<input class="center-text" type="text" name="data.mana.value" value="{{data.mana.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.mana.value" value="{{data.data.mana.value}}" data-dtype="Number" />
<span> / </span> <span> / </span>
<input class="center-text" type="text" name="data.mana.max" value="{{data.mana.max}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.mana.max" value="{{data.data.mana.max}}" data-dtype="Number" />
</div> </div>
</div> </div>
@ -44,7 +44,7 @@
{{> systems/kopparhavet/templates/parts/actor/talent.html}} {{> systems/kopparhavet/templates/parts/actor/talent.html}}
</div> </div>
<div class="tab border note" data-group="primary" data-tab="note" style="height: 100%; border-top: none;"> <div class="tab border note" data-group="primary" data-tab="note" style="height: 100%; border-top: none;">
{{editor content=data.bio.note.value target="data.bio.note.value" button=true owner=owner editable=editable}} {{editor content=data.data.bio.note.value target="data.bio.note.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,34 +8,34 @@
<label style="margin: auto;">{{localize "BIO.NAME"}}:</label> <label style="margin: auto;">{{localize "BIO.NAME"}}:</label>
<h1 class="charname" style="margin-bottom: 0; grid-column: 3/6;"><input name="name" type="text" value="{{actor.name}}" placeholder="{{localize "BIO.NAME"}}" /></h1> <h1 class="charname" style="margin-bottom: 0; grid-column: 3/6;"><input name="name" type="text" value="{{actor.name}}" placeholder="{{localize "BIO.NAME"}}" /></h1>
<label style="margin: auto;">{{localize data.bio.nickname.label}}:</label> <label style="margin: auto;">{{localize data.data.bio.nickname.label}}:</label>
<input name="data.bio.nickname.value" style="grid-column: 3/6;" type="text" value="{{data.bio.nickname.value}}" placeholder="{{localize data.bio.nickname.label}}" /> <input name="data.bio.nickname.value" style="grid-column: 3/6;" type="text" value="{{data.data.bio.nickname.value}}" placeholder="{{localize data.data.bio.nickname.label}}" />
<label style="margin: auto;">{{localize data.bio.kin.label}}:</label> <label style="margin: auto;">{{localize data.data.bio.kin.label}}:</label>
<input name="data.bio.kin.value" type="text" value="{{data.bio.kin.value}}" placeholder="{{localize data.bio.kin.label}}" /> <input name="data.bio.kin.value" type="text" value="{{data.data.bio.kin.value}}" placeholder="{{localize data.data.bio.kin.label}}" />
<label style="margin: auto;">{{localize data.bio.profession.label}}:</label> <label style="margin: auto;">{{localize data.data.bio.profession.label}}:</label>
<input name="data.bio.profession.value" type="text" value="{{data.bio.profession.value}}" placeholder="{{localize data.bio.profession.label}}" /> <input name="data.bio.profession.value" type="text" value="{{data.data.bio.profession.value}}" placeholder="{{localize data.data.bio.profession.label}}" />
<label style="margin: auto;">{{localize data.health.label}}:</label> <label style="margin: auto;">{{localize data.data.health.label}}:</label>
<div class="grid-container" style="grid-template-columns: auto 1fr auto;"> <div class="grid-container" style="grid-template-columns: auto 1fr auto;">
<input class="center-text" type="text" name="data.health.value" value="{{data.health.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.health.value" value="{{data.data.health.value}}" data-dtype="Number" />
<span> / </span> <span> / </span>
<input class="center-text" type="text" name="data.health.max" value="{{data.health.max}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.health.max" value="{{data.data.health.max}}" data-dtype="Number" />
</div> </div>
<label style="margin: auto;">{{localize data.stamina.label}}:</label> <label style="margin: auto;">{{localize data.data.stamina.label}}:</label>
<div class="grid-container" style="grid-template-columns: auto 1fr auto;"> <div class="grid-container" style="grid-template-columns: auto 1fr auto;">
<input class="center-text" type="text" name="data.stamina.value" value="{{data.stamina.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.stamina.value" value="{{data.data.stamina.value}}" data-dtype="Number" />
<span> / </span> <span> / </span>
<input class="center-text" type="text" name="data.stamina.max" value="{{data.stamina.max}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.stamina.max" value="{{data.data.stamina.max}}" data-dtype="Number" />
</div> </div>
<label style="margin: auto;">{{localize data.mana.label}}:</label> <label style="margin: auto;">{{localize data.data.mana.label}}:</label>
<div class="grid-container" style="grid-template-columns: auto 1fr auto;"> <div class="grid-container" style="grid-template-columns: auto 1fr auto;">
<input class="center-text" type="text" name="data.mana.value" value="{{data.mana.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.mana.value" value="{{data.data.mana.value}}" data-dtype="Number" />
<span> / </span> <span> / </span>
<input class="center-text" type="text" name="data.mana.max" value="{{data.mana.max}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.mana.max" value="{{data.data.mana.max}}" data-dtype="Number" />
</div> </div>
</div> </div>
@ -61,7 +61,7 @@
{{> systems/kopparhavet/templates/parts/actor/gear.html}} {{> systems/kopparhavet/templates/parts/actor/gear.html}}
</div> </div>
<div class="tab note border" data-group="primary" data-tab="note" style="border-top: none;"> <div class="tab note border" data-group="primary" data-tab="note" style="border-top: none;">
{{editor content=data.bio.note.value target="data.bio.note.value" button=true owner=owner editable=editable}} {{editor content=data.data.bio.note.value target="data.bio.note.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,27 +8,27 @@
<label style="margin-top: auto; margin-bottom: auto;">{{localize "BIO.NAME"}}:</label> <label style="margin-top: auto; margin-bottom: auto;">{{localize "BIO.NAME"}}:</label>
<h1 class="charname" style="margin-bottom: 0;grid-column: 3/6;"><input name="name" type="text" value="{{actor.name}}" placeholder="{{localize "BIO.NAME"}}" /></h1> <h1 class="charname" style="margin-bottom: 0;grid-column: 3/6;"><input name="name" type="text" value="{{actor.name}}" placeholder="{{localize "BIO.NAME"}}" /></h1>
<label style="margin-top: auto; margin-bottom: auto;">{{localize data.class.label}}:</label> <label style="margin-top: auto; margin-bottom: auto;">{{localize data.data.class.label}}:</label>
<span class="charname" style="margin-bottom: 0;grid-column: 3/6;"><input name="data.class.value" type="text" value="{{data.class.value}}" placeholder="{{localize data.class.label}}" /></span> <span class="charname" style="margin-bottom: 0;grid-column: 3/6;"><input name="data.class.value" type="text" value="{{data.data.class.value}}" placeholder="{{localize data.data.class.label}}" /></span>
<label style="margin: auto;">{{localize data.operationscost.label}}:</label> <label style="margin: auto;">{{localize data.data.operationscost.label}}:</label>
<input class="center-text" type="text" name="data.operationscost.value" value="{{data.operationscost.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.operationscost.value" value="{{data.data.operationscost.value}}" data-dtype="Number" />
<label style="margin: auto;">{{localize data.operationssupply.label}}:</label> <label style="margin: auto;">{{localize data.data.operationssupply.label}}:</label>
<input class="center-text" type="text" name="data.operationssupply.value" value="{{data.operationssupply.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.operationssupply.value" value="{{data.data.operationssupply.value}}" data-dtype="Number" />
<label style="margin: auto;">{{localize data.hull.label}}:</label> <label style="margin: auto;">{{localize data.data.hull.label}}:</label>
<div class="grid-container" style="grid-template-columns: auto 1fr auto;"> <div class="grid-container" style="grid-template-columns: auto 1fr auto;">
<input class="center-text" type="text" name="data.hull.value" value="{{data.hull.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.hull.value" value="{{data.data.hull.value}}" data-dtype="Number" />
<span style="margin-bottom: auto; margin-top: auto;"> / </span> <span style="margin-bottom: auto; margin-top: auto;"> / </span>
<input class="center-text" type="text" name="data.hull.max" value="{{data.hull.max}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.hull.max" value="{{data.data.hull.max}}" data-dtype="Number" />
</div> </div>
<label style="margin: auto;">{{localize data.cargo.label}}:</label> <label style="margin: auto;">{{localize data.data.cargo.label}}:</label>
<div class="grid-container" style="grid-template-columns: auto 1fr auto;"> <div class="grid-container" style="grid-template-columns: auto 1fr auto;">
<input class="center-text" type="text" name="data.cargo.value" value="{{data.cargo.value}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.cargo.value" value="{{data.data.cargo.value}}" data-dtype="Number" />
<span style="margin-bottom: auto; margin-top: auto;"> / </span> <span style="margin-bottom: auto; margin-top: auto;"> / </span>
<input class="center-text" type="text" name="data.cargo.max" value="{{data.cargo.max}}" data-dtype="Number" /> <input class="center-text" type="text" name="data.cargo.max" value="{{data.data.cargo.max}}" data-dtype="Number" />
</div> </div>
</div> </div>
@ -46,7 +46,7 @@
{{> systems/kopparhavet/templates/parts/actor/ship-combat.html}} {{> systems/kopparhavet/templates/parts/actor/ship-combat.html}}
</div> </div>
<div class="tab border note" data-group="primary" data-tab="note" style="height: 100%; border-top: none;"> <div class="tab border note" data-group="primary" data-tab="note" style="height: 100%; border-top: none;">
{{editor content=data.bio.note.value target="data.bio.note.value" button=true owner=owner editable=editable}} {{editor content=data.data.bio.note.value target="data.bio.note.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -100,5 +100,19 @@
{{{data.description.value}}} {{{data.description.value}}}
{{/if}} {{/if}}
{{/if}} {{/if}}
{{#if isShipWeapon}}
{{#if data.description}}
<h5>{{localize data.description.label}}</h5>
{{{data.description.value}}}
{{/if}}
{{/if}}
{{#if isShipTalent}}
{{#if data.description}}
<h5>{{localize data.description.label}}</h5>
{{{data.description.value}}}
{{/if}}
{{/if}}
</div> </div>
</div> </div>

View File

@ -9,17 +9,17 @@
</div> </div>
<div class="grid-container" style="grid-template-columns: 1fr 1fr;"> <div class="grid-container" style="grid-template-columns: 1fr 1fr;">
<div class="rating"> <div class="rating">
<label>{{localize data.damage.label}}</label> <label>{{localize data.data.damage.label}}</label>
<input name="data.damage.value" type="text" value="{{data.damage.value}}" /> <input name="data.damage.value" type="text" value="{{data.data.damage.value}}" />
</div> </div>
<div class="rating"> <div class="rating">
<label>{{localize data.skill.label}}</label> <label>{{localize data.data.skill.label}}</label>
<input name="data.skill.value" type="text" value="{{data.skill.value}}" /> <input name="data.skill.value" type="text" value="{{data.data.skill.value}}" />
</div> </div>
<div> <div>
<label>{{localize data.category.label}}</label> <label>{{localize data.data.category.label}}</label>
<select class="item-weapon-cat-select" name="data.category.value"> <select class="item-weapon-cat-select" name="data.category.value">
{{#select data.category.value}} {{#select data.data.category.value}}
<option value="melee">{{localize "WEAPON.MELEE"}}</option> <option value="melee">{{localize "WEAPON.MELEE"}}</option>
<option value="ranged">{{localize "WEAPON.RANGED"}}</option> <option value="ranged">{{localize "WEAPON.RANGED"}}</option>
{{/select}} {{/select}}
@ -28,10 +28,10 @@
</div> </div>
<div class="item"> <div class="item">
<div class="description"> <div class="description">
<h2>{{localize data.description.label}}</h2> <h2>{{localize data.data.description.label}}</h2>
<div class="info"> <div class="info">
<div class="description"> <div class="description">
{{editor content=data.description.value target="data.description.value" button=true owner=owner editable=editable}} {{editor content=data.data.description.value target="data.description.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -10,22 +10,22 @@
<div class="grid-container" style="grid-template-columns: 1fr 1fr;"> <div class="grid-container" style="grid-template-columns: 1fr 1fr;">
<!-- <!--
<div class="supply"> <div class="supply">
<label>{{localize data.quantity.label}}</label> <label>{{localize data.data.quantity.label}}</label>
<input name="data.quantity.value" type="number" value="{{data.quantity.value}}" /> <input name="data.quantity.value" type="number" value="{{data.data.quantity.value}}" />
</div> </div>
--> -->
<div class="cost"> <div class="cost">
<label>{{localize data.price.label}}</label> <label>{{localize data.data.price.label}}</label>
<input name="data.price.value" type="text" value="{{data.price.value}}" /> <input name="data.price.value" type="text" value="{{data.data.price.value}}" />
</div> </div>
<div class="rating"> <div class="rating">
<label>{{localize data.defence.label}}</label> <label>{{localize data.data.defence.label}}</label>
<input name="data.defence.value" type="text" value="{{data.defence.value}}" /> <input name="data.defence.value" type="text" value="{{data.data.defence.value}}" />
</div> </div>
<div> <div>
<label>{{localize data.type.label}}</label> <label>{{localize data.data.type.label}}</label>
<select class="item-weapon-cat-select" name="data.type.value"> <select class="item-weapon-cat-select" name="data.type.value">
{{#select data.type.value}} {{#select data.data.type.value}}
{{#each this.KH.armor_types as |t|}} {{#each this.KH.armor_types as |t|}}
<option value="{{t.value}}">{{localize t.label}}</option> <option value="{{t.value}}">{{localize t.label}}</option>
{{/each}} {{/each}}
@ -34,14 +34,14 @@
</div> </div>
<div class="grid-container" style="grid-template-columns: 1fr auto;"> <div class="grid-container" style="grid-template-columns: 1fr auto;">
<!-- <!--
<label>{{localize data.equipable.label}}</label> <label>{{localize data.data.equipable.label}}</label>
<a class="item-bool-click {{#if data.equipable.value}}active{{/if}}" data-name="equipable" title="equipable"> <a class="item-bool-click {{#if data.data.equipable.value}}active{{/if}}" data-name="equipable" title="equipable">
<i class="far {{#if data.equipable.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i> <i class="far {{#if data.data.equipable.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
</a> </a>
--> -->
<label>{{localize data.helmet.label}}</label> <label>{{localize data.data.helmet.label}}</label>
<a class="item-bool-click {{#if data.helmet.value}}active{{/if}}" data-name="helmet" title="helmet"> <a class="item-bool-click {{#if data.data.helmet.value}}active{{/if}}" data-name="helmet" title="helmet">
<i class="far {{#if data.helmet.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i> <i class="far {{#if data.data.helmet.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
</a> </a>
</div> </div>
</div> </div>
@ -55,10 +55,10 @@
<div class="tab scroll-y" data-group="primary" data-tab="description"> <div class="tab scroll-y" data-group="primary" data-tab="description">
<div class="item"> <div class="item">
<div class="description"> <div class="description">
<h2>{{localize data.description.label}}</h2> <h2>{{localize data.data.description.label}}</h2>
<div class="info"> <div class="info">
<div class="description"> <div class="description">
{{editor content=data.description.value target="data.description.value" button=true owner=owner editable=editable}} {{editor content=data.data.description.value target="data.description.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,21 +8,21 @@
</div> </div>
<div class="grid-container" style="grid-template-columns: 1fr 1fr;"> <div class="grid-container" style="grid-template-columns: 1fr 1fr;">
<div class="supply"> <div class="supply">
<label>{{localize data.quantity.label}}</label> <label>{{localize data.data.quantity.label}}</label>
<input name="data.quantity.value" type="number" value="{{data.quantity.value}}" /> <input name="data.quantity.value" type="number" value="{{data.data.quantity.value}}" />
</div> </div>
<div class="cost"> <div class="cost">
<label>{{localize data.price.label}}</label> <label>{{localize data.data.price.label}}</label>
<input name="data.price.value" type="text" value="{{data.price.value}}" /> <input name="data.price.value" type="text" value="{{data.data.price.value}}" />
</div> </div>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<div class="description"> <div class="description">
<h2>{{localize data.description.label}}</h2> <h2>{{localize data.data.description.label}}</h2>
<div class="info-mid"> <div class="info-mid">
<div class="description"> <div class="description">
{{editor content=data.description.value target="data.description.value" button=true owner=owner editable=editable}} {{editor content=data.data.description.value target="data.description.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -9,10 +9,10 @@
</div> </div>
<div class="item"> <div class="item">
<div class="talent-description"> <div class="talent-description">
<h2>{{localize data.description.label}}</h2> <h2>{{localize data.data.description.label}}</h2>
<div class="info-mid"> <div class="info-mid">
<div class="description"> <div class="description">
{{editor content=data.description.value target="data.description.value" button=true owner=owner editable=editable}} {{editor content=data.data.description.value target="data.description.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -9,17 +9,17 @@
</div> </div>
<div class="grid-container" style="grid-template-columns: 1fr 1fr;"> <div class="grid-container" style="grid-template-columns: 1fr 1fr;">
<div class="cost"> <div class="cost">
<label>{{localize data.price.label}}</label> <label>{{localize data.data.price.label}}</label>
<input name="data.price.value" type="text" value="{{data.price.value}}" /> <input name="data.price.value" type="text" value="{{data.data.price.value}}" />
</div> </div>
<div class="rating"> <div class="rating">
<label>{{localize data.damage.label}}</label> <label>{{localize data.data.damage.label}}</label>
<input name="data.damage.value" type="text" value="{{data.damage.value}}" /> <input name="data.damage.value" type="text" value="{{data.data.damage.value}}" />
</div> </div>
<div> <div>
<label>{{localize "ITEM.SKILL"}}</label> <label>{{localize "ITEM.SKILL"}}</label>
<select class="item-weapon-skill-select" name="data.skill.value"> <select class="item-weapon-skill-select" name="data.skill.value">
{{#select data.skill.value}} {{#select data.data.skill.value}}
{{#each this.khskills as |t|}} {{#each this.khskills as |t|}}
<option value="{{t.name}}">{{t.name}}</option> <option value="{{t.name}}">{{t.name}}</option>
{{/each}} {{/each}}
@ -29,10 +29,10 @@
</div> </div>
<div class="item"> <div class="item">
<div class="description"> <div class="description">
<h2>{{localize data.description.label}}</h2> <h2>{{localize data.data.description.label}}</h2>
<div class="info"> <div class="info">
<div class="description"> <div class="description">
{{editor content=data.description.value target="data.description.value" button=true owner=owner editable=editable}} {{editor content=data.data.description.value target="data.description.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -9,9 +9,9 @@
</div> </div>
<div class="grid-container" style="grid-template-columns: 1fr 1fr;"> <div class="grid-container" style="grid-template-columns: 1fr 1fr;">
<div> <div>
<label>{{localize data.type.label}}</label> <label>{{localize data.data.type.label}}</label>
<select class="item-weapon-cat-select" name="data.type.value"> <select class="item-weapon-cat-select" name="data.type.value">
{{#select data.type.value}} {{#select data.data.type.value}}
<option value="base">{{localize "SKILL.BASE"}}</option> <option value="base">{{localize "SKILL.BASE"}}</option>
<option value="adventure">{{localize "SKILL.ADVENTURE"}}</option> <option value="adventure">{{localize "SKILL.ADVENTURE"}}</option>
<option value="combat">{{localize "SKILL.COMBAT"}}</option> <option value="combat">{{localize "SKILL.COMBAT"}}</option>
@ -20,15 +20,15 @@
</div> </div>
<div> <div>
<label>{{localize "SKILL.STARTVALUE"}}</label> <label>{{localize "SKILL.STARTVALUE"}}</label>
<input name="data.value" type="text" value="{{data.value}}" /> <input name="data.value" type="text" value="{{data.data.value}}" />
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<div class="description"> <div class="description">
<h2>{{localize data.description.label}}</h2> <h2>{{localize data.data.description.label}}</h2>
<div class="info-mid"> <div class="info-mid">
<div class="description"> <div class="description">
{{editor content=data.description.value target="data.description.value" button=true owner=owner editable=editable}} {{editor content=data.data.description.value target="data.description.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -9,13 +9,13 @@
</div> </div>
<div class="grid-container" style="grid-template-columns: 1fr 1fr;"> <div class="grid-container" style="grid-template-columns: 1fr 1fr;">
<div class="cost"> <div class="cost">
<label>{{localize data.cost.label}}</label> <label>{{localize data.data.cost.label}}</label>
<input name="data.cost.value" type="text" value="{{data.cost.value}}" /> <input name="data.cost.value" type="text" value="{{data.data.cost.value}}" />
</div> </div>
<div> <div>
<label>{{localize data.difficulty.label}}</label> <label>{{localize data.data.difficulty.label}}</label>
<select class="item-weapon-cat-select" name="data.difficulty.value"> <select class="item-weapon-cat-select" name="data.data.difficulty.value">
{{#select data.difficulty.value}} {{#select data.data.difficulty.value}}
<option value="simple">{{localize "DIFFICULTY.SIMPLE"}}</option> <option value="simple">{{localize "DIFFICULTY.SIMPLE"}}</option>
<option value="easy">{{localize "DIFFICULTY.EASY"}}</option> <option value="easy">{{localize "DIFFICULTY.EASY"}}</option>
<option value="average">{{localize "DIFFICULTY.AVERAGE"}}</option> <option value="average">{{localize "DIFFICULTY.AVERAGE"}}</option>
@ -25,9 +25,9 @@
</select> </select>
</div> </div>
<div style="grid-column-start: 1; grid-column-end: 3;"> <div style="grid-column-start: 1; grid-column-end: 3;">
<label>{{localize data.roll.label}}</label> <label>{{localize data.data.roll.label}}</label>
<select class="item-weapon-cat-select" name="data.roll.value"> <select class="item-weapon-cat-select" name="data.roll.value">
{{#select data.roll.value}} {{#select data.data.roll.value}}
<option value="roll">{{localize "SPELL.ROLL"}}</option> <option value="roll">{{localize "SPELL.ROLL"}}</option>
<option value="attackroll">{{localize "SPELL.ATTACKROLL"}}</option> <option value="attackroll">{{localize "SPELL.ATTACKROLL"}}</option>
<option value="opposite">{{localize "SPELL.OPPOSITE"}}</option> <option value="opposite">{{localize "SPELL.OPPOSITE"}}</option>
@ -35,11 +35,11 @@
{{/select}} {{/select}}
</select> </select>
</div> </div>
{{#iff data.roll.value '==' "opposite" }} {{#iff data.data.roll.value '==' "opposite" }}
<div> <div>
<label>{{localize "ITEM.SKILL"}}</label> <label>{{localize "ITEM.SKILL"}}</label>
<select class="item-weapon-skill-select" name="data.roll.skill"> <select class="item-weapon-skill-select" name="data.roll.skill">
{{#select data.roll.skill}} {{#select data.data.roll.skill}}
{{#each this.khskills as |t|}} {{#each this.khskills as |t|}}
<option value="{{t.name}}">{{t.name}}</option> <option value="{{t.name}}">{{t.name}}</option>
{{/each}} {{/each}}
@ -49,7 +49,7 @@
<div> <div>
<label>{{localize "ITEM.SKILL"}}</label> <label>{{localize "ITEM.SKILL"}}</label>
<select class="item-weapon-skill-select" name="data.roll.oppositeskill"> <select class="item-weapon-skill-select" name="data.roll.oppositeskill">
{{#select data.roll.oppositeskill}} {{#select data.data.roll.oppositeskill}}
{{#each this.khskills as |t|}} {{#each this.khskills as |t|}}
<option value="{{t.name}}">{{t.name}}</option> <option value="{{t.name}}">{{t.name}}</option>
{{/each}} {{/each}}
@ -60,7 +60,7 @@
<div> <div>
<label>{{localize "ITEM.SKILL"}}</label> <label>{{localize "ITEM.SKILL"}}</label>
<select class="item-weapon-skill-select" name="data.roll.oppositeskilltwo"> <select class="item-weapon-skill-select" name="data.roll.oppositeskilltwo">
{{#select data.roll.oppositeskilltwo}} {{#select data.data.roll.oppositeskilltwo}}
<option value="">{{localize "SKILL.NONE"}}</option> <option value="">{{localize "SKILL.NONE"}}</option>
{{#each this.khskills as |t|}} {{#each this.khskills as |t|}}
<option value="{{t.name}}">{{t.name}}</option> <option value="{{t.name}}">{{t.name}}</option>
@ -68,11 +68,11 @@
{{/select}} {{/select}}
</select> </select>
</div> </div>
{{else iff data.roll.value '==' "ritual" }} {{else iff data.data.roll.value '==' "ritual" }}
<div> <div>
<label>{{localize "ITEM.SKILL"}}</label> <label>{{localize "ITEM.SKILL"}}</label>
<select class="item-weapon-skill-select" name="data.roll.ritual.skillone"> <select class="item-weapon-skill-select" name="data.roll.ritual.skillone">
{{#select data.roll.ritual.skillone}} {{#select data.data.roll.ritual.skillone}}
<option value="">{{localize "SKILL.NONE"}}</option> <option value="">{{localize "SKILL.NONE"}}</option>
{{#each this.khskills as |t|}} {{#each this.khskills as |t|}}
<option value="{{t.name}}">{{t.name}}</option> <option value="{{t.name}}">{{t.name}}</option>
@ -83,7 +83,7 @@
<div> <div>
<label>{{localize "ITEM.SKILL"}}</label> <label>{{localize "ITEM.SKILL"}}</label>
<select class="item-weapon-skill-select" name="data.roll.ritual.skilltwo"> <select class="item-weapon-skill-select" name="data.roll.ritual.skilltwo">
{{#select data.roll.ritual.skilltwo}} {{#select data.data.roll.ritual.skilltwo}}
<option value="">{{localize "SKILL.NONE"}}</option> <option value="">{{localize "SKILL.NONE"}}</option>
{{#each this.khskills as |t|}} {{#each this.khskills as |t|}}
<option value="{{t.name}}">{{t.name}}</option> <option value="{{t.name}}">{{t.name}}</option>
@ -94,7 +94,7 @@
<div> <div>
<label>{{localize "ITEM.SKILL"}}</label> <label>{{localize "ITEM.SKILL"}}</label>
<select class="item-weapon-skill-select" name="data.roll.ritual.skillthree"> <select class="item-weapon-skill-select" name="data.roll.ritual.skillthree">
{{#select data.roll.ritual.skillthree}} {{#select data.data.roll.ritual.skillthree}}
<option value="">{{localize "SKILL.NONE"}}</option> <option value="">{{localize "SKILL.NONE"}}</option>
{{#each this.khskills as |t|}} {{#each this.khskills as |t|}}
<option value="{{t.name}}">{{t.name}}</option> <option value="{{t.name}}">{{t.name}}</option>
@ -105,7 +105,7 @@
<div> <div>
<label>{{localize "ITEM.SKILL"}}</label> <label>{{localize "ITEM.SKILL"}}</label>
<select class="item-weapon-skill-select" name="data.roll.ritual.skillfour"> <select class="item-weapon-skill-select" name="data.roll.ritual.skillfour">
{{#select data.roll.ritual.skillfour}} {{#select data.data.roll.ritual.skillfour}}
<option value="">{{localize "SKILL.NONE"}}</option> <option value="">{{localize "SKILL.NONE"}}</option>
{{#each this.khskills as |t|}} {{#each this.khskills as |t|}}
<option value="{{t.name}}">{{t.name}}</option> <option value="{{t.name}}">{{t.name}}</option>
@ -116,7 +116,7 @@
<div> <div>
<label>{{localize "ITEM.SKILL"}}</label> <label>{{localize "ITEM.SKILL"}}</label>
<select class="item-weapon-skill-select" name="data.roll.ritual.skillfive"> <select class="item-weapon-skill-select" name="data.roll.ritual.skillfive">
{{#select data.roll.ritual.skillfive}} {{#select data.data.roll.ritual.skillfive}}
<option value="">{{localize "SKILL.NONE"}}</option> <option value="">{{localize "SKILL.NONE"}}</option>
{{#each this.khskills as |t|}} {{#each this.khskills as |t|}}
<option value="{{t.name}}">{{t.name}}</option> <option value="{{t.name}}">{{t.name}}</option>
@ -128,7 +128,7 @@
<div style="grid-column-start: 1; grid-column-end: 3;"> <div style="grid-column-start: 1; grid-column-end: 3;">
<label>{{localize "ITEM.SKILL"}}</label> <label>{{localize "ITEM.SKILL"}}</label>
<select class="item-weapon-skill-select" name="data.roll.skill"> <select class="item-weapon-skill-select" name="data.roll.skill">
{{#select data.roll.skill}} {{#select data.data.roll.skill}}
{{#each this.khskills as |t|}} {{#each this.khskills as |t|}}
<option value="{{t.name}}">{{t.name}}</option> <option value="{{t.name}}">{{t.name}}</option>
{{/each}} {{/each}}
@ -139,10 +139,10 @@
</div> </div>
<div class="item"> <div class="item">
<div class="description"> <div class="description">
<h2>{{localize data.description.label}}</h2> <h2>{{localize data.data.description.label}}</h2>
<div class="info"> <div class="info">
<div class="description"> <div class="description">
{{editor content=data.description.value target="data.description.value" button=true owner=owner editable=editable}} {{editor content=data.data.description.value target="data.description.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -9,10 +9,10 @@
</div> </div>
<div class="item"> <div class="item">
<div class="talent-description"> <div class="talent-description">
<h2>{{localize data.description.label}}</h2> <h2>{{localize data.data.description.label}}</h2>
<div class="info-mid"> <div class="info-mid">
<div class="description"> <div class="description">
{{editor content=data.description.value target="data.description.value" button=true owner=owner editable=editable}} {{editor content=data.data.description.value target="data.description.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -10,22 +10,22 @@
<div class="grid-container" style="grid-template-columns: 1fr 1fr;"> <div class="grid-container" style="grid-template-columns: 1fr 1fr;">
<!-- <!--
<div class="supply"> <div class="supply">
<label>{{localize data.quantity.label}}</label> <label>{{localize data.data.quantity.label}}</label>
<input name="data.quantity.value" type="number" value="{{data.quantity.value}}" /> <input name="data.quantity.value" type="number" value="{{data.data.quantity.value}}" />
</div> </div>
--> -->
<div class="cost"> <div class="cost">
<label>{{localize data.price.label}}</label> <label>{{localize data.data.price.label}}</label>
<input name="data.price.value" type="text" value="{{data.price.value}}" /> <input name="data.price.value" type="text" value="{{data.data.price.value}}" />
</div> </div>
<div class="rating"> <div class="rating">
<label>{{localize data.damage.label}}</label> <label>{{localize data.data.damage.label}}</label>
<input name="data.damage.value" type="text" value="{{data.damage.value}}" /> <input name="data.damage.value" type="text" value="{{data.data.damage.value}}" />
</div> </div>
<div> <div>
<label>{{localize data.category.label}}</label> <label>{{localize data.data.category.label}}</label>
<select class="item-weapon-cat-select" name="data.category.value"> <select class="item-weapon-cat-select" name="data.category.value">
{{#select data.category.value}} {{#select data.data.category.value}}
<option value="melee">{{localize "WEAPON.MELEE"}}</option> <option value="melee">{{localize "WEAPON.MELEE"}}</option>
<option value="ranged">{{localize "WEAPON.RANGED"}}</option> <option value="ranged">{{localize "WEAPON.RANGED"}}</option>
{{/select}} {{/select}}
@ -34,7 +34,7 @@
<div> <div>
<label>{{localize "ITEM.SKILL"}}</label> <label>{{localize "ITEM.SKILL"}}</label>
<select class="item-weapon-skill-select" name="data.skill.value"> <select class="item-weapon-skill-select" name="data.skill.value">
{{#select data.skill.value}} {{#select data.data.skill.value}}
{{#each this.khskills as |t|}} {{#each this.khskills as |t|}}
<option value="{{t.name}}">{{t.name}}</option> <option value="{{t.name}}">{{t.name}}</option>
{{/each}} {{/each}}
@ -43,19 +43,19 @@
</div> </div>
<!-- <!--
<div class="grid-container" style="grid-template-columns: 1fr auto;"> <div class="grid-container" style="grid-template-columns: 1fr auto;">
<label>{{localize data.equipable.label}}</label> <label>{{localize data.data.equipable.label}}</label>
<a class="item-bool-click {{#if data.equipable.value}}active{{/if}}" data-name="equipable" title="equipable"> <a class="item-bool-click {{#if data.data.equipable.value}}active{{/if}}" data-name="equipable" title="equipable">
<i class="far {{#if data.equipable.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i> <i class="far {{#if data.data.equipable.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
</a> </a>
</div> </div>
--> -->
</div> </div>
<div class="item"> <div class="item">
<div class="description"> <div class="description">
<h2>{{localize data.description.label}}</h2> <h2>{{localize data.data.description.label}}</h2>
<div class="info"> <div class="info">
<div class="description"> <div class="description">
{{editor content=data.description.value target="data.description.value" button=true owner=owner editable=editable}} {{editor content=data.data.description.value target="data.description.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -2,30 +2,30 @@
<div class="bio-background grid-container" style="height: 100%; grid-column-gap: 5px; grid-template-rows: auto auto auto 1fr; grid-template-columns: auto 1fr auto 1fr;"> <div class="bio-background grid-container" style="height: 100%; grid-column-gap: 5px; grid-template-rows: auto auto auto 1fr; grid-template-columns: auto 1fr auto 1fr;">
<h1>{{localize "BACKGROUND.TITLE"}}</h1> <h1>{{localize "BACKGROUND.TITLE"}}</h1>
<div class="name">{{localize data.bio.age.label}}:</div> <div class="name">{{localize data.data.bio.age.label}}:</div>
<input name="data.bio.age.value" type="text" value="{{data.bio.age.value}}" /> <input name="data.bio.age.value" type="text" value="{{data.data.bio.age.value}}" />
<div class="name">{{localize data.background.birthplace.label}}</div> <div class="name">{{localize data.data.background.birthplace.label}}</div>
<input name="data.background.birthplace.value" type="text" value="{{data.background.birthplace.value}}" /> <input name="data.background.birthplace.value" type="text" value="{{data.data.background.birthplace.value}}" />
<div class="name">{{localize data.background.social.label}}</div> <div class="name">{{localize data.data.background.social.label}}</div>
<input name="data.background.social.value" type="text" value="{{data.background.social.value}}" /> <input name="data.background.social.value" type="text" value="{{data.data.background.social.value}}" />
<div></div> <div></div>
<div></div> <div></div>
<div class="name-top">{{localize data.background.events.label}}</div> <div class="name-top">{{localize data.data.background.events.label}}</div>
<div class="info-bio border-thin" style="/*grid-row: 4/6; grid-column: 2;*/"> <div class="info-bio border-thin" style="/*grid-row: 4/6; grid-column: 2;*/">
<div class="description"> <div class="description">
{{editor content=data.background.events.value target="data.background.events.value" button=true owner=owner editable=editable}} {{editor content=data.data.background.events.value target="data.background.events.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
<div class="name-top">{{localize data.background.contacts.label}}</div> <div class="name-top">{{localize data.data.background.contacts.label}}</div>
<div class="info-bio border-thin" style="/*grid-row: 4/6; grid-column: 4;*/"> <div class="info-bio border-thin" style="/*grid-row: 4/6; grid-column: 4;*/">
<div class="description"> <div class="description">
{{editor content=data.background.contacts.value target="data.background.contacts.value" button=true owner=owner editable=editable}} {{editor content=data.data.background.contacts.value target="data.background.contacts.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -4,25 +4,25 @@
<ul class="items-list"> <ul class="items-list">
<li class="item-nor flexrow"> <li class="item-nor flexrow">
<div class="item-name" style="flex-grow: 8;">{{localize "MOD.INIT"}}</div> <div class="item-name" style="flex-grow: 8;">{{localize "MOD.INIT"}}</div>
<div class="item-value" style="flex: none;"><input name="data.combat.init" class="skill-value" type="number" value="{{data.combat.init}}" data-dtype="Number" /></div> <div class="item-value" style="flex: none;"><input name="data.combat.init" class="skill-value" type="number" value="{{data.data.combat.init}}" data-dtype="Number" /></div>
</li> </li>
<li class="item-defence flexrow" data-defence="{{data.combat.defence}}"> <li class="item-defence flexrow" data-defence="{{data.data.combat.defence}}">
<div class="item-name roll-defence rollable" data-defence="{{data.combat.defence}}" style="flex-grow: 8;">{{localize "ADVERSARY.DEFENCE"}}</div> <div class="item-name roll-defence rollable" data-defence="{{data.data.combat.defence}}" style="flex-grow: 8;">{{localize "ADVERSARY.DEFENCE"}}</div>
<div class="item-value" style="flex: none;"><input name="data.combat.defence" class="skill-value" type="text" value="{{data.combat.defence}}" /></div> <div class="item-value" style="flex: none;"><input name="data.combat.defence" class="skill-value" type="text" value="{{data.data.combat.defence}}" /></div>
</li> </li>
<li class="item-nor flexrow"> <li class="item-nor flexrow">
<div class="item-name" style="flex-grow: 8;">{{localize "ADVERSARY.HASHELMET"}}</div> <div class="item-name" style="flex-grow: 8;">{{localize "ADVERSARY.HASHELMET"}}</div>
<div style="align-self: flex-end"> <div style="align-self: flex-end">
<a style="margin: auto;" class="adversary-helmet-click {{#if data.combat.helmet}}active{{/if}}"> <a style="margin: auto;" class="adversary-helmet-click {{#if data.data.combat.helmet}}active{{/if}}">
<i class="far {{#if data.combat.helmet}}fa-times-circle{{else}}fa-circle{{/if}}"></i> <i class="far {{#if data.data.combat.helmet}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
</a> </a>
</div> </div>
</li> </li>
<li class="item-nor flexrow"> <li class="item-nor flexrow">
<div class="item-name roll-adversary-armor rollable" data-armor="{{data.combat.armor}}" style="flex-grow: 8;">{{localize "ITEM.DEFENCE"}}</div> <div class="item-name roll-adversary-armor rollable" data-armor="{{data.data.combat.armor}}" style="flex-grow: 8;">{{localize "ITEM.DEFENCE"}}</div>
<div class="item-value" style="flex: none;"><input name="data.combat.armor" class="skill-value" type="text" value="{{data.combat.armor}}" /></div> <div class="item-value" style="flex: none;"><input name="data.combat.armor" class="skill-value" type="text" value="{{data.data.combat.armor}}" /></div>
</li> </li>
</ul> </ul>
</ul> </ul>
@ -35,7 +35,7 @@
{{#each actor.skills as |skill key|}} {{#each actor.skills as |skill key|}}
<li class="item-skill flexrow" data-item-id="{{skill._id}}"> <li class="item-skill flexrow" data-item-id="{{skill._id}}">
<div class="item-name roll-skill rollable" style="flex-grow: 8;">{{skill.name}}</div> <div class="item-name roll-skill rollable" style="flex-grow: 8;">{{skill.name}}</div>
<div class="item-value" style="flex: none;"><input class="skill-value" type="number" value="{{skill.data.value}}" min="0" data-item-id="{{skill._id}}" data-dtype="Number" /></div> <div class="item-value" style="flex: none;"><input class="skill-value" type="number" value="{{skill.data.value}}" min="0" data-item-id="{{skill.id}}" data-dtype="Number" /></div>
<div class="item-controls"> <div class="item-controls">
<a class="item-control item-delete" data-parent=".item-skill" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-control item-delete" data-parent=".item-skill" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>

View File

@ -2,10 +2,10 @@
<div class="currencies border"> <div class="currencies border">
<div class="header grid-container" style="grid-template-columns: auto 1fr auto 1fr;"> <div class="header grid-container" style="grid-template-columns: auto 1fr auto 1fr;">
<h1 style="margin-bottom: 0; grid-column: 1/5;">{{localize "CURRENCY.TITLE"}}</h1> <h1 style="margin-bottom: 0; grid-column: 1/5;">{{localize "CURRENCY.TITLE"}}</h1>
<label style="margin: auto;">{{localize data.currency.shekel.label}}:</label> <label style="margin: auto;">{{localize data.data.currency.shekel.label}}:</label>
<input class="center-text" name="data.currency.shekel.value" type="number" value="{{data.currency.shekel.value}}" /> <input class="center-text" name="data.currency.shekel.value" type="number" value="{{data.data.currency.shekel.value}}" />
<label style="margin: auto;">{{localize data.currency.quarter.label}}:</label> <label style="margin: auto;">{{localize data.data.currency.quarter.label}}:</label>
<input class="center-text" name="data.currency.quarter.value" type="number" value="{{data.currency.quarter.value}}" /> <input class="center-text" name="data.currency.quarter.value" type="number" value="{{data.data.currency.quarter.value}}" />
</div> </div>
</div> </div>
<div class="gear border scroll-y"> <div class="gear border scroll-y">

View File

@ -4,17 +4,17 @@
<ul class="items-list"> <ul class="items-list">
<li class="item-nor flexrow"> <li class="item-nor flexrow">
<div class="item-name" style="flex-grow: 8;">{{localize "MOD.INIT"}}</div> <div class="item-name" style="flex-grow: 8;">{{localize "MOD.INIT"}}</div>
<div class="item-value" style="flex: none;"><input name="data.combat.init" class="skill-value" type="number" value="{{data.combat.init}}" data-dtype="Number" /></div> <div class="item-value" style="flex: none;"><input name="data.combat.init" class="skill-value" type="number" value="{{data.data.combat.init}}" data-dtype="Number" /></div>
</li> </li>
<li class="item-defence flexrow" data-defence="{{data.combat.defence}}"> <li class="item-defence flexrow" data-defence="{{data.data.combat.defence}}">
<div class="item-name roll-defence rollable" data-defence="{{data.combat.defence}}" style="flex-grow: 8;">{{localize "ADVERSARY.DEFENCE"}}</div> <div class="item-name roll-defence rollable" data-defence="{{data.data.combat.defence}}" style="flex-grow: 8;">{{localize "ADVERSARY.DEFENCE"}}</div>
<div class="item-value" style="flex: none;"><input name="data.combat.defence" class="skill-value" type="text" value="{{data.combat.defence}}" /></div> <div class="item-value" style="flex: none;"><input name="data.combat.defence" class="skill-value" type="text" value="{{data.data.combat.defence}}" /></div>
</li> </li>
<li class="item-nor flexrow"> <li class="item-nor flexrow">
<div class="item-name roll-adversary-armor rollable" data-armor="{{data.combat.armor}}" style="flex-grow: 8;">{{localize "ITEM.DEFENCE"}}</div> <div class="item-name roll-adversary-armor rollable" data-armor="{{data.data.combat.armor}}" style="flex-grow: 8;">{{localize "ITEM.DEFENCE"}}</div>
<div class="item-value" style="flex: none;"><input name="data.combat.armor" class="skill-value" type="text" value="{{data.combat.armor}}" /></div> <div class="item-value" style="flex: none;"><input name="data.combat.armor" class="skill-value" type="text" value="{{data.data.combat.armor}}" /></div>
</li> </li>
</ul> </ul>
</ul> </ul>

View File

@ -1,32 +1,32 @@
<div class="bio-tab border scroll-y" style="height: 100%; border-top: none;"> <div class="bio-tab border scroll-y" style="height: 100%; border-top: none;">
<div class="grid-container" style="height: fit-content; border-top: none; grid-template-rows: 1fr auto auto; grid-template-columns: 1fr 1fr;"> <div class="grid-container" style="height: fit-content; border-top: none; grid-template-rows: 1fr auto auto; grid-template-columns: 1fr 1fr;">
<div class="border grid-container" style="height: 100%; grid-row: 1/4; grid-template-rows: auto 1fr; height: fit-content; min-height: 200px;"> <div class="border grid-container" style="height: 100%; grid-row: 1/4; grid-template-rows: auto 1fr; height: fit-content; min-height: 200px;">
<h2 style="margin-bottom: 0;">{{localize data.bio.appearance.label}}</h2> <h2 style="margin-bottom: 0;">{{localize data.data.bio.appearance.label}}</h2>
<div class="description"> <div class="description">
{{editor content=data.bio.appearance.value target="data.bio.appearance.value" button=true owner=owner editable=editable}} {{editor content=data.data.bio.appearance.value target="data.bio.appearance.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
<div class="border grid-container" style="grid-column-gap: 5px; grid-template-columns: 1fr auto; max-height: 163px;"> <div class="border grid-container" style="grid-column-gap: 5px; grid-template-columns: 1fr auto; max-height: 163px;">
<h2 style="margin-bottom: 0; grid-column: 1/3;">{{localize "HT.FEATURES.TITLE"}}</h2> <h2 style="margin-bottom: 0; grid-column: 1/3;">{{localize "HT.FEATURES.TITLE"}}</h2>
<input name="data.feature.one.label" class="roll-feature" type="text" value="{{data.feature.one.label}}" /> <input name="data.feature.one.label" class="roll-feature" type="text" value="{{data.data.feature.one.label}}" />
<a style="margin: auto;" class="feature {{#if data.feature.one.value}}active{{/if}}" data-feature="one"> <a style="margin: auto;" class="feature {{#if data.data.feature.one.value}}active{{/if}}" data-feature="one">
<i class="far {{#if data.feature.one.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i> <i class="far {{#if data.data.feature.one.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
</a> </a>
<input name="data.feature.two.label" class="roll-feature" type="text" value="{{data.feature.two.label}}" /> <input name="data.feature.two.label" class="roll-feature" type="text" value="{{data.data.feature.two.label}}" />
<a style="margin: auto;" class="feature {{#if data.feature.two.value}}active{{/if}}" data-feature="two"> <a style="margin: auto;" class="feature {{#if data.data.feature.two.value}}active{{/if}}" data-feature="two">
<i class="far {{#if data.feature.two.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i> <i class="far {{#if data.data.feature.two.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
</a> </a>
<input name="data.feature.three.label" class="roll-feature" type="text" value="{{data.feature.three.label}}" /> <input name="data.feature.three.label" class="roll-feature" type="text" value="{{data.data.feature.three.label}}" />
<a style="margin: auto;" class="feature {{#if data.feature.three.value}}active{{/if}}" data-feature="three"> <a style="margin: auto;" class="feature {{#if data.data.feature.three.value}}active{{/if}}" data-feature="three">
<i class="far {{#if data.feature.three.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i> <i class="far {{#if data.data.feature.three.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
</a> </a>
<input name="data.feature.four.label" class="roll-feature" type="text" value="{{data.feature.four.label}}" /> <input name="data.feature.four.label" class="roll-feature" type="text" value="{{data.data.feature.four.label}}" />
<a style="margin: auto;" class="feature {{#if data.feature.four.value}}active{{/if}}" data-feature="four"> <a style="margin: auto;" class="feature {{#if data.data.feature.four.value}}active{{/if}}" data-feature="four">
<i class="far {{#if data.feature.four.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i> <i class="far {{#if data.data.feature.four.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
</a> </a>
</div> </div>
<div class="border"> <div class="border">
@ -38,7 +38,7 @@
</h2> </h2>
</header> </header>
<ol class="relation-list" style="padding: 0;"> <ol class="relation-list" style="padding: 0;">
{{#each data.relationships as |attr key|}} {{#each data.data.relationships as |attr key|}}
<li class="relation grid-container" style="grid-template-columns: 2fr auto auto;" data-attribute="{{key}}"> <li class="relation grid-container" style="grid-template-columns: 2fr auto auto;" data-attribute="{{key}}">
<input class="relation-key" type="text" name="data.relationships.{{key}}.key" value="{{key}}" style="display: none;" /> <input class="relation-key" type="text" name="data.relationships.{{key}}.key" value="{{key}}" style="display: none;" />
<input class="relation-value" type="text" name="data.relationships.{{key}}.value" value="{{attr.value}}" /> <input class="relation-value" type="text" name="data.relationships.{{key}}.value" value="{{attr.value}}" />
@ -59,7 +59,7 @@
</h2> </h2>
</header> </header>
<ol class="learning-list" style="padding: 0;"> <ol class="learning-list" style="padding: 0;">
{{#each data.learning as |attr key|}} {{#each data.data.learning as |attr key|}}
<li class="learning grid-container" style="grid-template-columns: 2fr auto auto;" data-attribute="{{key}}"> <li class="learning grid-container" style="grid-template-columns: 2fr auto auto;" data-attribute="{{key}}">
<input class="learning-key" type="text" name="data.learning.{{key}}.key" value="{{key}}" style="display: none;" /> <input class="learning-key" type="text" name="data.learning.{{key}}.key" value="{{key}}" style="display: none;" />
<input style="margin-top: auto; margin-bottom: auto;" class="learning-value" type="text" name="data.learning.{{key}}.value" value="{{attr.value}}" /> <input style="margin-top: auto; margin-bottom: auto;" class="learning-value" type="text" name="data.learning.{{key}}.value" value="{{attr.value}}" />
@ -90,7 +90,7 @@
</a> </a>
</div> </div>
<a style="margin: auto;" class="learning-control" data-action="delete"><i class="fas fa-trash"></i></a> <a style="margin: auto;" class="learning-delete" data-action="delete"><i class="fas fa-trash"></i></a>
</li> </li>
{{/each}} {{/each}}
</ol> </ol>

View File

@ -40,7 +40,7 @@
</ul> </ul>
</div> </div>
<div class="skills border grid-container" style="grid-column-gap: 5px; grid-template-columns: 1fr;"> <div class="skills border grid-container" style="grid-column-gap: 5px; grid-template-columns: 1fr;">
<h1 style="grid-column: unset;">{{localize data.languages.label}}</h1> <h1 style="grid-column: unset;">{{localize data.data.languages.label}}</h1>
<input name="data.languages.value" type="text" value="{{data.languages.value}}" /> <input name="data.languages.value" type="text" value="{{data.data.languages.value}}" />
</div> </div>
</div> </div>

View File

@ -1,32 +1,32 @@
<div class="bio-tab border scroll-y" style="height: 100%; border-top: none;"> <div class="bio-tab border scroll-y" style="height: 100%; border-top: none;">
<div class="grid-container" style="height: fit-content; border-top: none; grid-template-rows: 1fr auto; grid-template-columns: 1fr 1fr;"> <div class="grid-container" style="height: fit-content; border-top: none; grid-template-rows: 1fr auto; grid-template-columns: 1fr 1fr;">
<div class="border grid-container" style="height: 100%; grid-row: 1/4; grid-template-rows: auto 1fr; height: fit-content; min-height: 200px;"> <div class="border grid-container" style="height: 100%; grid-row: 1/4; grid-template-rows: auto 1fr; height: fit-content; min-height: 200px;">
<h2 style="margin-bottom: 0;">{{localize data.bio.appearance.label}}</h2> <h2 style="margin-bottom: 0;">{{localize data.data.bio.appearance.label}}</h2>
<div class="description"> <div class="description">
{{editor content=data.bio.appearance.value target="data.bio.appearance.value" button=true owner=owner editable=editable}} {{editor content=data.data.bio.appearance.value target="data.bio.appearance.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
<div class="border grid-container" style="grid-column-gap: 5px; grid-template-columns: 1fr auto; max-height: 163px;"> <div class="border grid-container" style="grid-column-gap: 5px; grid-template-columns: 1fr auto; max-height: 163px;">
<h2 style="margin-bottom: 0; grid-column: 1/3;">{{localize "FEATURES.TITLE"}}</h2> <h2 style="margin-bottom: 0; grid-column: 1/3;">{{localize "FEATURES.TITLE"}}</h2>
<input name="data.feature.one.label" class="roll-feature" type="text" value="{{data.feature.one.label}}" /> <input name="data.feature.one.label" class="roll-feature" type="text" value="{{data.data.feature.one.label}}" />
<a style="margin: auto;" class="feature {{#if data.feature.one.value}}active{{/if}}" data-feature="one"> <a style="margin: auto;" class="feature {{#if data.data.feature.one.value}}active{{/if}}" data-feature="one">
<i class="far {{#if data.feature.one.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i> <i class="far {{#if data.data.feature.one.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
</a> </a>
<input name="data.feature.two.label" class="roll-feature" type="text" value="{{data.feature.two.label}}" /> <input name="data.feature.two.label" class="roll-feature" type="text" value="{{data.data.feature.two.label}}" />
<a style="margin: auto;" class="feature {{#if data.feature.two.value}}active{{/if}}" data-feature="two"> <a style="margin: auto;" class="feature {{#if data.data.feature.two.value}}active{{/if}}" data-feature="two">
<i class="far {{#if data.feature.two.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i> <i class="far {{#if data.data.feature.two.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
</a> </a>
<input name="data.feature.three.label" class="roll-feature" type="text" value="{{data.feature.three.label}}" /> <input name="data.feature.three.label" class="roll-feature" type="text" value="{{data.data.feature.three.label}}" />
<a style="margin: auto;" class="feature {{#if data.feature.three.value}}active{{/if}}" data-feature="three"> <a style="margin: auto;" class="feature {{#if data.data.feature.three.value}}active{{/if}}" data-feature="three">
<i class="far {{#if data.feature.three.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i> <i class="far {{#if data.data.feature.three.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
</a> </a>
<input name="data.feature.four.label" class="roll-feature" type="text" value="{{data.feature.four.label}}" /> <input name="data.feature.four.label" class="roll-feature" type="text" value="{{data.data.feature.four.label}}" />
<a style="margin: auto;" class="feature {{#if data.feature.four.value}}active{{/if}}" data-feature="four"> <a style="margin: auto;" class="feature {{#if data.data.feature.four.value}}active{{/if}}" data-feature="four">
<i class="far {{#if data.feature.four.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i> <i class="far {{#if data.data.feature.four.value}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
</a> </a>
</div> </div>
<div class="border"> <div class="border">
@ -38,7 +38,7 @@
</h2> </h2>
</header> </header>
<ol class="learning-list" style="padding: 0;"> <ol class="learning-list" style="padding: 0;">
{{#each data.learning as |attr key|}} {{#each data.data.learning as |attr key|}}
<li class="learning grid-container" style="grid-template-columns: 2fr auto auto;" data-attribute="{{key}}"> <li class="learning grid-container" style="grid-template-columns: 2fr auto auto;" data-attribute="{{key}}">
<input class="learning-key" type="text" name="data.learning.{{key}}.key" value="{{key}}" style="display: none;" /> <input class="learning-key" type="text" name="data.learning.{{key}}.key" value="{{key}}" style="display: none;" />
<input style="margin-top: auto; margin-bottom: auto;" class="learning-value" type="text" name="data.learning.{{key}}.value" value="{{attr.value}}" /> <input style="margin-top: auto; margin-bottom: auto;" class="learning-value" type="text" name="data.learning.{{key}}.value" value="{{attr.value}}" />
@ -69,7 +69,7 @@
</a> </a>
</div> </div>
<a style="margin: auto;" class="learning-control" data-action="delete"><i class="fas fa-trash"></i></a> <a style="margin: auto;" class="learning-delete" data-action="delete"><i class="fas fa-trash"></i></a>
</li> </li>
{{/each}} {{/each}}
</ol> </ol>

View File

@ -1,10 +1,8 @@
WEAPONS
<div class="bio-tab border scroll-y" style="height: 100%; border-top: none;"> <div class="bio-tab border scroll-y" style="height: 100%; border-top: none;">
<div class="grid-container" style="height: fit-content; border-top: none; grid-template-rows: 1fr auto; grid-template-columns: 1fr 1fr;"> <div class="grid-container" style="height: fit-content; border-top: none; grid-template-rows: 1fr auto; grid-template-columns: 1fr 1fr;">
<div class="border grid-container" style="grid-column-gap: 5px; grid-template-columns: auto 1fr; max-height: 163px; height: fit-content;"> <div class="border grid-container" style="grid-column-gap: 5px; grid-template-columns: auto 1fr; max-height: 163px; height: fit-content;">
<label style="margin-top: auto; margin-bottom: auto;">{{localize data.rammingdmg.label}}:</label> <label style="margin-top: auto; margin-bottom: auto;">{{localize data.data.rammingdmg.label}}:</label>
<input style="text-align: center;" name="data.rammingdmg.value" type="text" value="{{data.rammingdmg.value}}" placeholder="{{localize data.rammingdmg.label}}" /> <input style="text-align: center;" name="data.rammingdmg.value" type="text" value="{{data.data.rammingdmg.value}}" placeholder="{{localize data.data.rammingdmg.label}}" />
</div> </div>

View File

@ -1,14 +1,14 @@
<div class="bio-tab border scroll-y" style="height: 100%; border-top: none;"> <div class="bio-tab border scroll-y" style="height: 100%; border-top: none;">
<div class="grid-container" style="height: fit-content; border-top: none; grid-template-rows: auto auto; grid-template-columns: 1fr 1fr;"> <div class="grid-container" style="height: fit-content; border-top: none; grid-template-rows: auto auto; grid-template-columns: 1fr 1fr;">
<div class="border grid-container" style="height: 100%; grid-row: 1/4; grid-template-rows: auto 1fr; height: fit-content; min-height: 200px;"> <div class="border grid-container" style="height: 100%; grid-row: 1/4; grid-template-rows: auto 1fr; height: fit-content; min-height: 200px;">
<h2 style="margin-bottom: 0;">{{localize data.description.label}}</h2> <h2 style="margin-bottom: 0;">{{localize data.data.description.label}}</h2>
<div class="description"> <div class="description">
{{editor content=data.description.value target="data.description.value" button=true owner=owner editable=editable}} {{editor content=data.data.description.value target="data.description.value" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>
<div class="border grid-container" style="grid-column-gap: 5px; grid-template-columns: 1fr auto; max-height: 163px; height: fit-content;"> <div class="border grid-container" style="grid-column-gap: 5px; grid-template-columns: 1fr auto; max-height: 163px; height: fit-content;">
<label style="margin-top: auto; margin-bottom: auto;">{{localize data.crew.label}}:</label> <label style="margin-top: auto; margin-bottom: auto;">{{localize data.data.crew.label}}:</label>
<input name="data.crew.value" style="text-align: center;" type="text" value="{{data.crew.value}}" placeholder="{{localize data.crew.label}}" /> <input name="data.crew.value" style="text-align: center;" type="text" value="{{data.data.crew.value}}" placeholder="{{localize data.data.crew.label}}" />
</div> </div>
<div class="spells border"> <div class="spells border">

View File

@ -60,7 +60,7 @@
</ul> </ul>
</div> </div>
<div class="skills border grid-container" style="grid-column-gap: 5px; grid-template-columns: 1fr;"> <div class="skills border grid-container" style="grid-column-gap: 5px; grid-template-columns: 1fr;">
<h1 style="grid-column: unset;">{{localize data.languages.label}}</h1> <h1 style="grid-column: unset;">{{localize data.data.languages.label}}</h1>
<input name="data.languages.value" type="text" value="{{data.languages.value}}" /> <input name="data.languages.value" type="text" value="{{data.data.languages.value}}" />
</div> </div>
</div> </div>

View File

@ -4,7 +4,7 @@
<a class="modification-control" data-action="create"><i class="fas fa-plus"></i></a> <a class="modification-control" data-action="create"><i class="fas fa-plus"></i></a>
</header> </header>
<ol class="modifications-list" style="padding: 0;"> <ol class="modifications-list" style="padding: 0;">
{{#each data.modifications as |attr key|}} {{#each data.data.modifications as |attr key|}}
<li class="modification grid-container" style="grid-template-columns: 2fr 1fr auto;" data-attribute="{{key}}"> <li class="modification grid-container" style="grid-template-columns: 2fr 1fr auto;" data-attribute="{{key}}">
<input class="modification-key" type="text" name="data.modifications.{{key}}.key" value="{{key}}" style="display: none;" /> <input class="modification-key" type="text" name="data.modifications.{{key}}.key" value="{{key}}" style="display: none;" />
<select class="modification-modtype" name="data.modifications.{{key}}.modtype"> <select class="modification-modtype" name="data.modifications.{{key}}.modtype">