Merge pull request #137 from TheLastScrub:TheLastScrub/issue131

TheLastScrub/issue131
This commit is contained in:
TheLastScrub
2024-07-30 19:04:39 -07:00
committed by GitHub
18 changed files with 515 additions and 678 deletions
+13
View File
@@ -1133,3 +1133,16 @@ input.item-sheet-short-input {
min-height: 300px;
resize: none;
}
.weapon-name-flexcontainer {
display: flex;
justify-content: flex-start;
flex-direction: row;
column-gap: 10px;
}
.weapon-name-flexitem {
flex: content;
align-self: flex-start;
text-align: left;
}
+84 -4
View File
@@ -15,7 +15,7 @@ export default class DeltaGreenActorSheet extends ActorSheet {
return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["deltagreen", "sheet", "actor"],
template: "systems/deltagreen/templates/actor/actor-sheet.html",
width: 700,
width: 750,
height: 770,
tabs: [
{
@@ -61,9 +61,7 @@ export default class DeltaGreenActorSheet extends ActorSheet {
const data = super.getData();
// Prepare items.
if (this.actor.type === "agent") {
this._prepareCharacterItems(data);
}
this._prepareCharacterItems(data);
// Make it easy for the sheet handlebars to understand how to sort the skills.
data.sortSkillsSetting = game.settings.get("deltagreen", "sortSkills");
@@ -146,6 +144,7 @@ export default class DeltaGreenActorSheet extends ActorSheet {
// Initialize containers.
const armor = [];
const weapons = [];
const gear = [];
// Iterate through items, allocating to containers
// let totalWeight = 0;
@@ -157,12 +156,69 @@ export default class DeltaGreenActorSheet extends ActorSheet {
// Append to weapons.
else if (i.type === "weapon") {
weapons.push(i);
} else if (i.type === "gear") {
gear.push(i);
}
}
if (actorData.system.settings.sorting.armorSortAlphabetical) {
armor.sort(function (a, b) {
let x = a.name.toLowerCase();
let y = b.name.toLowerCase();
if (x < y) {
return -1;
}
if (x > y) {
return 1;
}
return 0;
});
} else {
armor.sort(function (a, b) {
return a.sort - b.sort;
});
}
if (actorData.system.settings.sorting.weaponSortAlphabetical) {
weapons.sort(function (a, b) {
let x = a.name.toLowerCase();
let y = b.name.toLowerCase();
if (x < y) {
return -1;
}
if (x > y) {
return 1;
}
return 0;
});
} else {
weapons.sort(function (a, b) {
return a.sort - b.sort;
});
}
if (actorData.system.settings.sorting.gearSortAlphabetical) {
gear.sort(function (a, b) {
let x = a.name.toLowerCase();
let y = b.name.toLowerCase();
if (x < y) {
return -1;
}
if (x > y) {
return 1;
}
return 0;
});
} else {
gear.sort(function (a, b) {
return a.sort - b.sort;
});
}
// Assign and return
actorData.armor = armor;
actorData.weapons = weapons;
actorData.gear = gear;
}
// Can add extra buttons to form header here if necessary
@@ -488,6 +544,30 @@ export default class DeltaGreenActorSheet extends ActorSheet {
html.find(".clear-all-bond-damage-checks").click((ev) => {
this._updateBondsRemoveAllDamagedCheckmarks();
});
// item sorting toggles
html.find(".toggle-item-sorting-style").click((event) => {
event.preventDefault();
const itemType = event.currentTarget.getAttribute("data-gear-type");
if (itemType === "weapon") {
this.actor.update({
"system.settings.sorting.weaponSortAlphabetical":
!this.actor.system.settings.sorting.weaponSortAlphabetical,
});
} else if (itemType === "armor") {
this.actor.update({
"system.settings.sorting.armorSortAlphabetical":
!this.actor.system.settings.sorting.armorSortAlphabetical,
});
} else if (itemType === "gear") {
this.actor.update({
"system.settings.sorting.gearSortAlphabetical":
!this.actor.system.settings.sorting.gearSortAlphabetical,
});
}
});
}
// trigger an update on all bonds that have had their damaged flag checked off
+22 -14
View File
@@ -13,6 +13,7 @@ import {
rollItemMacro,
rollItemSkillCheckMacro,
rollSkillMacro,
rollSkillTestAndDamageForOwnedItem,
} from "./other/macro-functions.js";
Hooks.once("init", async () => {
@@ -23,6 +24,7 @@ Hooks.once("init", async () => {
rollItemSkillCheckMacro,
rollSkillMacro,
ParseDeltaGreenStatBlock,
rollSkillTestAndDamageForOwnedItem,
};
/**
@@ -61,9 +63,16 @@ Hooks.once("init", async () => {
Hooks.once("ready", async () => {
// Wait to register hotbar drop hook on ready so that modules could register earlier if they want to
Hooks.on("hotbarDrop", (bar, data, slot) =>
createDeltaGreenMacro(data, slot),
);
Hooks.on("hotbarDrop", (bar, data, slot) => {
// note - if we don't limit this logic to just items, we'll break re-ording macros on the bar
if (data.type === "Item") {
// this is async!!
createDeltaGreenMacro(data, slot);
// this must return false here! This stops the default logic on item drop from occuring,
// which is a macro to open an item sheet
return false;
}
});
});
Hooks.on("preCreateItem", (item) => {
@@ -80,18 +89,17 @@ Hooks.on("preCreateItem", (item) => {
}
});
Hooks.on("renderSidebarTab", async (app, html) => {
if (app.options.id === "actors") {
const button = $(
"<button class='import-cd'><i class='fas fa-file-import'></i> Parse Stat Block</button>",
);
// Hook into the render call for the Actors Directory to add an extra button
Hooks.on("renderActorDirectory", (app, html) => {
let importButton = $(
'<button><i class="fas fa-file-import"></i> Delta Green Stat Block Parser</button>',
);
html.find(".directory-footer").append(importButton);
button.click(() => {
ParseDeltaGreenStatBlock();
});
html.find(".directory-footer").append(button);
}
// Handle button clicks
importButton.click((ev) => {
ParseDeltaGreenStatBlock();
});
});
/**
+5 -1
View File
@@ -22,7 +22,7 @@ export default class DeltaGreenItem extends Item {
* @param {Event} event The originating click event
* @private
*/
async roll() {
async roll(isCrit = false) {
// Basic template rendering data
const item = this;
const { actor } = this;
@@ -44,6 +44,10 @@ export default class DeltaGreenItem extends Item {
diceFormula += actorSystemData.statistics.str.meleeDamageBonusFormula;
}
if (isCrit) {
diceFormula = "2*(" + diceFormula + ")";
}
roll = new DGDamageRoll(
diceFormula,
{},
+81 -16
View File
@@ -12,29 +12,45 @@ import * as DGRolls from "../roll/roll.js";
* @returns {Promise}
*/
export async function createDeltaGreenMacro(data, slot) {
// Definitely should not be doing assignments in conditionals but if we fix this, it breaks macro creation.
// eslint-disable-next-line no-cond-assign
if ((data.type = "Item" && data.itemData.type !== "weapon")) return;
// if (!("data" in data)) return ui.notifications.warn("You can only create macro buttons for owned Items");
const item = data.itemData;
if (data.type !== "Item") {
return;
}
// Create the macro command
let command = "// Uncomment line below to also roll skill check if desired.";
command += `\n//game.deltagreen.rollItemSkillCheckMacro("${item._id}");`;
command += `\ngame.deltagreen.rollItemMacro("${item._id}");`;
if (!data.uuid.includes("Actor.") && !data.uuid.includes("Token.")) {
ui.notifications.warn("You can only create macro buttons for owned Items");
return;
}
// let macro = game.macros.entities.find(m => (m.name === data.name) && (m.command === command));
// if (!macro) {
const item = await fromUuid(data.uuid);
if (item === null || typeof item === "undefined") {
ui.notifications.warn("Bad item passed to macro hotbar.");
return;
}
let command = "";
if (item.type !== "weapon") {
// this should just open the item sheet for this item
command = `(await fromUuid("${data.uuid}")).sheet.render(true)`;
} else {
command =
"// If a damage roll on a successful attack should not be automatically rolled, change the last argument from 'true' to 'false':";
command += `\ngame.deltagreen.rollSkillTestAndDamageForOwnedItem("${data.uuid}", true);`;
}
// Create the weapon macro command
const macro = await Macro.create({
name: data.itemData.name,
name: item.name,
type: "script",
img: data.itemData.img,
command,
img: item.img,
thumbnail: item.img,
command: command,
flags: { "deltagreen.itemMacro": true },
});
// }
game.user.assignHotbarMacro(macro, slot);
await game.user.assignHotbarMacro(macro, slot);
return;
}
/**
@@ -122,3 +138,52 @@ export function rollSkillMacro(skillName) {
return actor.sheet.processRoll({}, roll);
// sendPercentileTestToChat(actor, translatedSkillLabel, skill.proficiency);
}
/**
* Roll a skill check for an item that is owned by a specific actor.
* @param {*} itemId
* @param {*} actorId
* @returns {null|Boolean}
*/
export async function rollSkillTestAndDamageForOwnedItem(
itemUuId,
rollDamageOnSuccess,
) {
let item;
try {
item = await fromUuid(itemUuId);
if (item == null) {
return ui.notifications.warn("Invalid item targeted in macro.");
}
if (item.type !== "weapon") {
return ui.notifications.warn(
"Can only roll weapons/attacks as item macros.",
);
}
} catch {
return ui.notifications.warn("Invalid item targeted in macro.");
}
const rollOptions = {
rollType: "weapon",
key: item.system.skill,
actor: item.parent,
specialTrainingName: null, // Only applies to Special Training Rolls
item,
};
const roll = new DGRolls.DGPercentileRoll("1D100", {}, rollOptions);
await roll.evaluate();
roll.toChat();
if (roll.isSuccess && rollDamageOnSuccess) {
item.roll(roll.isCritical);
}
return roll.isSuccess;
}
+19 -1
View File
@@ -132,11 +132,21 @@ export class DGPercentileRoll extends DGRoll {
hideSanTarget = true;
}
let customModifierTarget = 20;
if (this.actor != null) {
try {
customModifierTarget = parseInt(
this.actor.system.settings.rolling.defaultPercentileModifier,
);
} catch {}
}
const backingData = {
data: {
label: this.localizedKey,
originalTarget: this.target,
targetModifier: 20,
targetModifier: customModifierTarget,
hideTarget: hideSanTarget,
},
};
@@ -172,6 +182,14 @@ export class DGPercentileRoll extends DGRoll {
if (plusMinus === "-") {
targetModifier *= -1;
}
// update the custom target modifier so it 'persists' between dialogs
if (this.actor != null) {
this.actor.update({
"system.settings.rolling.defaultPercentileModifier":
targetModifier,
});
}
}
resolve({ targetModifier, rollMode });
} catch (ex) {
+5 -3
View File
@@ -9,10 +9,12 @@ export default async function preloadHandlebarsTemplates() {
"systems/deltagreen/templates/actor/limited-sheet.html",
"systems/deltagreen/templates/actor/unnatural-sheet.html",
"systems/deltagreen/templates/actor/npc-sheet.html",
"systems/deltagreen/templates/actor/cv-partial.html",
"systems/deltagreen/templates/actor/custom-skills-partial.html",
"systems/deltagreen/templates/dialog/modify-percentile-roll.html",
"systems/deltagreen/templates/actor/vehicle-sheet.html",
"systems/deltagreen/templates/actor/help-and-licensing-partial.html",
"systems/deltagreen/templates/actor/partials/custom-skills-partial.html",
"systems/deltagreen/templates/actor/partials/cv-partial.html",
"systems/deltagreen/templates/actor/partials/help-and-licensing-partial.html",
"systems/deltagreen/templates/actor/partials/equipment-partial.html",
"systems/deltagreen/templates/actor/partials/attributes-grid-partial.html",
]);
}
+16 -3
View File
@@ -40,6 +40,18 @@
}
}
},
"sheet-settings": {
"settings": {
"sorting": {
"weaponSortAlphabetical": false,
"armorSortAlphabetical": false,
"gearSortAlphabetical": false
},
"rolling": {
"defaultPercentileModifier": 20
}
}
},
"human_skills": {
"skills": {
"accounting": {
@@ -429,7 +441,7 @@
}
},
"unnatural": {
"templates": ["base", "unnatural_skills"],
"templates": ["base", "unnatural_skills", "sheet-settings"],
"sanity": {
"notes": "",
"failedLoss": "1D4",
@@ -441,7 +453,7 @@
"showUntrainedSkills": true
},
"npc": {
"templates": ["base", "human_skills"],
"templates": ["base", "human_skills", "sheet-settings"],
"schemaVersion": 1.0,
"sanity": {
"value": 100,
@@ -452,6 +464,7 @@
"showUntrainedSkills": true
},
"vehicle": {
"templates": ["sheet-settings"],
"name": "",
"description": "",
"shortDescription": "",
@@ -465,7 +478,7 @@
"passengers": []
},
"agent": {
"templates": ["base", "human_skills"],
"templates": ["base", "human_skills", "sheet-settings"],
"schemaVersion": 1.0,
"sanity": {
"value": 100,
+12 -180
View File
@@ -104,15 +104,18 @@
{{#unless skill.proficiency}}title="{{localize 'DG.Tooltip.CannotRollSkillLabel'}}"{{/unless}}
>
{{localizeWithFallback (concat "DG.Skills." key) skill.label }}
<i class="fas fa-dice"></i>
</label>
{{#if_eq key 'ritual' }}
{{#if (keepSanityPrivate)}}
<input class="percentile-skill-input" type="text" name="system.skills.{{key}}.proficiency" value="??" data-dtype="Number" {{#if skill.isCalculatedValue}} disabled {{/if}}/>
<input class="checkbox-skill-input" type="checkbox" name="system.skills.{{key}}.failure" {{checked skill.failure}} data-dtype="Boolean" {{#if skill.cannotBeImprovedByFailure}} disabled {{/if}}
title="{{localize 'DG.Tooltip.SkillFailCheckbox'}}"
/>
{{/if}}
{{#unless (keepSanityPrivate)}}
<input class="percentile-skill-input" type="text" name="system.skills.{{key}}.proficiency" value="{{skill.proficiency}}" data-dtype="Number" {{#if skill.isCalculatedValue}} disabled {{/if}}/>
<input class="checkbox-skill-input" type="checkbox" name="system.skills.{{key}}.failure" {{checked skill.failure}} data-dtype="Boolean" {{#if skill.cannotBeImprovedByFailure}} disabled {{/if}}
@@ -121,44 +124,33 @@
{{/unless}}
{{/if_eq}}
{{#if_not_eq key 'ritual' }}
<input class="percentile-skill-input" type="text" name="system.skills.{{key}}.proficiency" value="{{skill.proficiency}}" data-dtype="Number" {{#if skill.isCalculatedValue}} disabled {{/if}}/>
<input class="checkbox-skill-input" type="checkbox" name="system.skills.{{key}}.failure" {{checked skill.failure}} data-dtype="Boolean" {{#if skill.cannotBeImprovedByFailure}} disabled {{/if}}
title="{{localize 'DG.Tooltip.SkillFailCheckbox'}}"
/>
{{/if_not_eq}}
</div>
{{/each}}
</div>
{{!-- Custom Skills and Special Training --}}
<div>
{{> "systems/deltagreen/templates/actor/custom-skills-partial.html" actorType="agent"}}
{{> "systems/deltagreen/templates/actor/partials/custom-skills-partial.html" actorType="agent"}}
</div>
</div>
{{!-- Physical Statistics like STR, CON, etc. --}}
<div class="tab physical" data-group="primary" data-tab="physical">
<div class="horizontal-bar-section-divider">
<span>{{localize "DG.Sheet.BlockHeaders.Attributes"}}</span>
</div>
<div class="grid grid-3col">
{{#each actor.system.statistics as |statistic key|}}
<div class="flex-group-center flex-mid-border">
<div class="">
<div class="physical-stats-outer-grid-3col">
<label class="rollable resource-label" data-rolltype="stat" data-key="{{key}}" title="{{localize 'DG.Tooltip.x5AttributeLabel'}}" for="system.statistics.{{key}}.value">{{localize (concat 'DG.Attributes.' key)}}</label>
<input type="text" name="system.statistics.{{key}}.value" value="{{statistic.value}}" data-dtype="Number"/>
<span class="rollable" data-rolltype="stat" data-key="{{key}}" title="{{localize 'DG.Tooltip.x5AttributeLabel'}}">({{numberFormat statistic.x5 decimals=0 sign=false}}%)</span>
</div >
<div >
<input type="text" name="system.statistics.{{key}}.distinguishing_feature" value="{{statistic.distinguishing_feature}}" data-dtype="String" title="{{localize 'DG.Tooltip.DistinguishingFeature'}}" />
</div>
</div>
</div>
{{/each}}
</div>
{{> "systems/deltagreen/templates/actor/partials/attributes-grid-partial.html" actorType="agent"}}
<br />
<div class="horizontal-bar-section-divider">
<span>{{localize "DG.Sheet.BlockHeaders.Injuries"}}</span>
@@ -283,167 +275,7 @@
{{!-- GEAR Tab --}}
<div class="tab items" data-group="primary" data-tab="gear">
<div>
<div class="horizontal-bar-section-divider">
<span>{{localize 'DG.Gear.Weapons'}}</span>
</div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<span class="">{{localize 'DG.Gear.Name'}} <a><i class="weapon-browse fas fa-search"></i></a></span>
<span class="centered-item-property">{{localize 'DG.Gear.DamageOrLethality'}}</span>
<span class="centered-item-property">{{localize 'DG.Gear.ArmorPiercing'}}</span>
<div class="item-controls">
<a class="item-control item-create action-pill" title="Create item" data-type="weapon"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.items as |item id|}}
{{#if_eq item.type 'weapon'}}
<li class="item flexrow" data-item-id="{{item._id}}">
<div
class="flexrow rollable"
data-iid="{{item._id}}"
data-rolltype="weapon"
data-key="{{item.system.skill}}"
title="{{localize 'DG.Tooltip.SkillLabel'}} ({{localizeWeaponSkill item.system.skill}})"
><img class="item-image" src="{{item.img}}" width="24" height="24"/>
<h4 style="word-wrap: break-word;" class="item-name">
{{item.name}}
</h4>
</div>
<span class = "centered-item-property">
{{#unless item.system.isLethal}}
<span class="rollable" data-rolltype="damage" data-iid="{{item._id}}">
{{toUpperCase item.system.damage}}{{#if_eq item.system.skill 'unarmed_combat'}}{{actor.system.statistics.str.meleeDamageBonusFormula}}{{/if_eq}}{{#if_eq item.system.skill 'melee_weapons'}}{{actor.system.statistics.str.meleeDamageBonusFormula}}{{/if_eq}}
</span>
{{/unless}}
{{#if item.system.isLethal}}
<span class="rollable" data-rolltype="lethality" data-iid="{{item._id}}"
title="{{localize 'DG.ItemWindow.Weapons.LethalityTooltip'}}">
{{item.system.lethality}}%</span>
{{/if}}
{{#if item.system.lethality}}
-
{{#if item.system.isLethal}}
<a class="item-control toggle-lethality dg-red" title="Toggle Lethality (Current Lethality: {{item.system.lethality}}%)"><i class="fas fa-skull-crossbones" item-id="{{item.id}}" is-lethal="true"></i></a>
{{else}}
<a class="item-control toggle-lethality" title="Toggle Lethality (Currently No Lethality)"><i class="fas fa-user-injured" item-id="{{item.id}}" is-lethal="false"></i></a>
{{/if}}
{{/if}}
</span>
<span class="centered-item-property">{{item.system.armorPiercing}}</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/if_eq}}
{{/each}}
</ol>
</div>
<div>
<div class="horizontal-bar-section-divider">
<span>{{localize 'DG.Gear.Armor'}}</span>
</div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<div class="item-name"><span>{{localize 'DG.Gear.Name'}} <a><i class="armor-browse fas fa-search"></i></a></span></div>
<span class="centered-item-property">{{localize 'DG.Gear.ArmorRating'}}</span>
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
<div class="item-controls">
<a class="item-control item-create action-pill" title="Create item" data-type="armor"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.items as |item id|}}
{{#if_eq item.type 'armor'}}
<li class="item flexrow" data-item-id="{{item.id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
<h4 style="word-wrap: break-word;" class="item-name">{{item.name}}</h4>
<span class="centered-item-property">{{item.system.protection}}</span>
<span class="equipped-item centered-item-property" data-id="{{item.id}}" title="{{localize 'DG.Tooltip.ToggleEquippedState'}}">
{{#if item.system.equipped}}
<span class="fas fa-check"></span>
{{else}}
<span class="fas fa-times"></span>
{{/if}}
</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/if_eq}}
{{/each}}
</ol>
</div>
<div>
<div class="horizontal-bar-section-divider">
<span>{{localize 'DG.Gear.OtherGear'}}</span>
</div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<div style="min-width: 55%;" class="item-name">{{localize 'DG.Gear.Name'}}</div>
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
<div class="item-controls">
<a class="item-control item-create action-pill" title="Create item" data-type="gear"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.items as |item id|}}
{{#if_eq item.type 'gear'}}
<li class="item flexrow" data-item-id="{{item.id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
<h4 style="word-wrap: break-word; min-width: 55%;" class="item-name">{{item.name}}</h4>
<span class="equipped-item centered-item-property" data-id="{{item.id}}" title="{{localize 'DG.Tooltip.ToggleEquippedState'}}" >
{{#if item.system.equipped}}
<span class="fas fa-check"></span>
{{else}}
<span class="fas fa-times"></span>
{{/if}}
</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/if_eq}}
{{/each}}
</ol>
</div>
{{> "systems/deltagreen/templates/actor/partials/equipment-partial.html" }}
</div>
{{!-- PERSONAL (Biography) Tab --}}
@@ -451,7 +283,7 @@
<div class="horizontal-bar-section-divider">
<span>{{localize "DG.Sheet.BlockHeaders.PersonalInfoCV"}}</span>
</div>
{{> "systems/deltagreen/templates/actor/cv-partial.html" }}
{{> "systems/deltagreen/templates/actor/partials/cv-partial.html" }}
</div>
{{!-- Bonds Tab --}}
@@ -505,7 +337,7 @@
{{!-- About Tab --}}
<div class="tab about" data-group="primary" data-tab="about">
{{> "systems/deltagreen/templates/actor/help-and-licensing-partial.html" }}
{{> "systems/deltagreen/templates/actor/partials/help-and-licensing-partial.html" }}
</div>
+1 -1
View File
@@ -28,7 +28,7 @@
<section class="sheet-body">
{{!-- Biography Tab --}}
<div class="tab bio" data-group="primary" data-tab="bio">
{{> "systems/deltagreen/templates/actor/cv-partial.html" }}
{{> "systems/deltagreen/templates/actor/partials/cv-partial.html" }}
</div>
</section>
</form>
+8 -180
View File
@@ -49,7 +49,7 @@
<div class="resource-outer-grid-1col">
<label for="system.wp.value" class="resource-label rollable"
data-rolltype="sanity" title="{{localize 'DG.Tooltip.SanityLabel'}}"
>{{localize 'DG.Attributes.SAN' }}</label>
>{{localize 'DG.Attributes.SAN' }} <i class="fas fa-dice"></i></label>
<div class="resource-inner-grid-3col">
<input type="text" name="system.sanity.value" value="{{actor.system.sanity.value}}" data-dtype="Number" title="{{localize 'DG.Tooltip.CurrentSanityPartOne'}}{{actor.system.sanity.currentBreakingPoint}}{{localize 'DG.Tooltip.CurrentSanityPartTwo'}}" />
<span> {{localize 'DG.NPCSheet.BreakPointAbbreviation'}}: </span>
@@ -63,20 +63,9 @@
<div class="horizontal-bar-section-divider">
<span>{{localize "DG.Sheet.BlockHeaders.Statistics"}}</span>
</div>
<div class="grid grid-3col">
{{#each actor.system.statistics as |statistic key|}}
<div class="flex-group-center flex-mid-border">
<div class="">
<div class="physical-stats-outer-grid-3col">
<label class="rollable resource-label" data-rolltype="stat" data-key="{{key}}" title="{{localize 'DG.Tooltip.x5AttributeLabel'}}" for="system.statistics.{{key}}.value">{{localize (concat 'DG.Attributes.' key)}}</label>
<input type="text" name="system.statistics.{{key}}.value" value="{{statistic.value}}" data-dtype="Number"/>
<span class="rollable" data-rolltype="stat" data-key="{{key}}" title="{{localize 'DG.Tooltip.x5AttributeLabel'}}">({{numberFormat statistic.x5 decimals=0 sign=false}}%)</span>
</div >
{{!-- <div> <input type="text" name="system.statistics.{{key}}.distinguishing_feature" value="{{statistic.distinguishing_feature}}" data-dtype="String" title="{{localize 'DG.Tooltip.DistinguishingFeature'}}" /> </div> --}}
</div>
</div>
{{/each}}
</div>
{{> "systems/deltagreen/templates/actor/partials/attributes-grid-partial.html" actorType="npc"}}
</div>
</div>
@@ -118,6 +107,7 @@
{{#unless skill.proficiency}}title="{{localize 'DG.Tooltip.CannotRollSkillLabel'}}"{{/unless}}
>
{{localizeWithFallback (concat "DG.Skills." key) skill.label }}
<i class="fas fa-dice"></i>
</label>
<input class="percentile-skill-input" type="text" name="system.skills.{{key}}.proficiency" value="{{skill.proficiency}}" data-dtype="Number" {{#if skill.isCalculatedValue}} disabled {{/if}}/>
@@ -128,7 +118,7 @@
</div>
<br>
<div>
{{> "systems/deltagreen/templates/actor/custom-skills-partial.html"}}
{{> "systems/deltagreen/templates/actor/partials/custom-skills-partial.html"}}
</div>
<br>
<div>
@@ -144,174 +134,12 @@
{{!-- GEAR --}}
<div class="tab items" data-group="primary" data-tab="gear">
<div>
<div class="horizontal-bar-section-divider">
<span>{{localize 'DG.Gear.Weapons'}}</span>
</div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<span class="">{{localize 'DG.Gear.Name'}}</span>
<span class="centered-item-property">{{localize 'DG.Gear.DamageOrLethality'}}</span>
<span class="centered-item-property">{{localize 'DG.Gear.ArmorPiercing'}}</span>
<div class="item-controls">
<a class="item-control item-create action-pill" title="Create item" data-type="weapon"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.items as |item id|}}
{{#if_eq item.type 'weapon'}}
<li class="item flexrow" data-item-id="{{item.id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
<h4 style="word-wrap: break-word;"
class="item-name rollable"
data-rolltype="weapon"
data-key="{{item.system.skill}}"
data-iid="{{item._id}}"
title="{{localize 'DG.Tooltip.SkillLabel'}} ({{localizeWeaponSkill item.system.skill}})"
>
{{item.name}}
</h4>
<span class="centered-item-property">
{{#unless item.system.isLethal}}
<span class="rollable" data-rolltype="damage" data-iid="{{item._id}}">
{{toUpperCase item.system.damage}}
</span>
{{/unless}}
{{#if item.system.isLethal}}
<span class="rollable" data-rolltype="lethality" data-label="{{item.name}}" data-iid="{{item._id}}"
title="{{localize 'DG.ItemWindow.Weapons.LethalityTooltip'}}"
>{{formatLethality item.system.lethality}}</span>
{{/if}}
{{#if item.system.lethality}}
-
{{#if item.system.isLethal}}
<a class="item-control toggle-lethality dg-red" title="Toggle Lethality (Current Lethality: {{item.system.lethality}}%)"><i class="fas fa-skull-crossbones" item-id="{{item.id}}" is-lethal="true"></i></a>
{{else}}
<a class="item-control toggle-lethality" title="Toggle Lethality (Currently No Lethality)"><i class="fas fa-user-injured" item-id="{{item.id}}" is-lethal="false"></i></a>
{{/if}}
{{/if}}
</span>
<span class="centered-item-property">{{item.system.armorPiercing}}</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/if_eq}}
{{/each}}
</ol>
</div>
<div>
<div class="horizontal-bar-section-divider">
<span>{{localize 'DG.Gear.Armor'}}</span>
</div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<div class="item-name">{{localize 'DG.Gear.Name'}}</div>
<span class="centered-item-property">{{localize 'DG.Gear.ArmorRating'}}</span>
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
<div class="item-controls">
<a class="item-control item-create action-pill" title="Create item" data-type="armor"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.items as |item id|}}
{{#if_eq item.type 'armor'}}
<li class="item flexrow" data-item-id="{{item.id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
<h4 style="word-wrap: break-word;" class="item-name">{{item.name}}</h4>
<span class="centered-item-property">{{item.system.protection}}</span>
<span class="equipped-item centered-item-property" data-id="{{item.id}}" title="{{localize 'DG.Tooltip.ToggleEquippedState'}}">
{{#if item.system.equipped}}
<span class="fas fa-check"></span>
{{else}}
<span class="fas fa-times"></span>
{{/if}}
</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/if_eq}}
{{/each}}
</ol>
</div>
<div>
<div class="horizontal-bar-section-divider">
<span>{{localize 'DG.Gear.OtherGear'}}</span>
</div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<div class="item-name">{{localize 'DG.Gear.Name'}}</div>
<div class="item-name"></div>
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
<div class="item-controls">
<a class="item-control item-create action-pill" title="Create item" data-type="gear"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.items as |item id|}}
{{#if_eq item.type 'gear'}}
<li class="item flexrow" data-item-id="{{item.id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
<h4 style="word-wrap: break-word;" class="item-name">{{item.name}}</h4>
<span></span> <!-- This is just here to get things to align nicely with the other sections-->
<span class="equipped-item centered-item-property" data-id="{{item.id}}" title="{{localize 'DG.Tooltip.ToggleEquippedState'}}" >
{{#if item.system.equipped}}
<span class="fas fa-check"></span>
{{else}}
<span class="fas fa-times"></span>
{{/if}}
</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/if_eq}}
{{/each}}
</ol>
</div>
{{> "systems/deltagreen/templates/actor/partials/equipment-partial.html" }}
</div>
{{!-- About Tab --}}
<div class="tab about" data-group="primary" data-tab="about">
{{> "systems/deltagreen/templates/actor/help-and-licensing-partial.html" }}
{{> "systems/deltagreen/templates/actor/partials/help-and-licensing-partial.html" }}
</div>
</section>
@@ -0,0 +1,16 @@
<div class="grid grid-3col">
{{#each actor.system.statistics as |statistic key|}}
<div class="flex-group-center flex-mid-border">
<div class="">
<div class="physical-stats-outer-grid-3col">
<label class="rollable resource-label" data-rolltype="stat" data-key="{{key}}" title="{{localize 'DG.Tooltip.x5AttributeLabel'}}" for="system.statistics.{{key}}.value">{{localize (concat 'DG.Attributes.' key)}}</i></label>
<input type="text" name="system.statistics.{{key}}.value" value="{{statistic.value}}" data-dtype="Number"/>
<span class="rollable" data-rolltype="stat" data-key="{{key}}" title="{{localize 'DG.Tooltip.x5AttributeLabel'}}">({{numberFormat statistic.x5 decimals=0 sign=false}}% <i class="fas fa-dice"></i>)</span>
</div >
<div >
<input type="text" name="system.statistics.{{key}}.distinguishing_feature" value="{{statistic.distinguishing_feature}}" data-dtype="String" title="{{localize 'DG.Tooltip.DistinguishingFeature'}}" />
</div>
</div>
</div>
{{/each}}
</div>
@@ -6,6 +6,7 @@
{{/if_eq}}
</div>
<div class="grid-2col">
{{#each actor.system.typedSkills as |skill key|}}
<div class="item flexrow flex-group-center flex-thin-border">
<div class="flexrow">
@@ -14,6 +15,7 @@
{{#unless skill.proficiency}}title="{{localize 'DG.Tooltip.CannotRollSkillLabel'}}"{{/unless}}
>
{{skill.group}} ({{skill.label}})
<i class="fas fa-dice"></i>
</label>
<input class="percentile-skill-input" type="text" name="system.typedSkills.{{key}}.proficiency" value="{{skill.proficiency}}" data-dtype="Number"/>
{{#if_eq ../actorType "agent"}}
@@ -26,10 +28,12 @@
</div>
</div>
{{/each}}
{{#each specialTraining as |training|}}
<div class="item flexrow flex-group-center flex-thin-border special-training-box">
<label class="{{if_gt training.targetNumber 0 'rollable' 'not-rollable'}}" data-key="{{training.key}}" data-name="{{training.name}}" data-rolltype="special-training">
{{training.name}} ({{training.attribute}}, {{training.targetNumber}}%)
<i class="fas fa-dice"></i>
</label>
<div class="item-controls skill-and-training-controls">
<a class="item-control special-training-action" data-action="Edit" data-id="{{training.id}}" title="Edit Training"><i class="fas fa-edit"></i></a>
@@ -37,4 +41,5 @@
</div>
</div>
{{/each}}
</div>
@@ -0,0 +1,214 @@
{{!-- EQUIPMENT/ATTACKS/ABILITES SECTION USED ON ALL ACTOR SHEETS --}}
{{!-- WEAPONS/ATTACKS --}}
<div>
<div class="horizontal-bar-section-divider">
<span>{{localize 'DG.Gear.Weapons'}}</span>
</div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image">
{{#if actor.system.settings.sorting.weaponSortAlphabetical}}
<a><i class="toggle-item-sorting-style fa-solid fa-solid fa-arrow-down-a-z" data-gear-type="weapon"></i></a>
{{else}}
<a><i class="toggle-item-sorting-style fa-solid fa-arrow-down-short-wide" data-gear-type="weapon"></i></a>
{{/if}}
</div>
<span class="">
{{localize 'DG.Gear.Name'}}
<a><i class="weapon-browse fas fa-search"></i></a>
</span>
<span class="centered-item-property">{{localize 'DG.Gear.DamageOrLethality'}}</span>
<span class="centered-item-property">{{localize 'DG.Gear.ArmorPiercing'}}</span>
<div class="item-controls">
<a class="item-control item-create action-pill" title="Create item" data-type="weapon"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.weapons as |item id|}}
<li class="item flexrow" data-item-id="{{item._id}}">
<div class="flexrow">
<img class="item-image weapon-name-flexitem" src="{{item.img}}" width="24" height="24"/>
<span class="">
<h4 style="word-wrap: break-word; display: inline;" class="item-name">
{{item.name}}
</h4>
<span class="rollable"
data-iid="{{item._id}}"
data-rolltype="weapon"
data-key="{{item.system.skill}}"
title="{{localize 'DG.Tooltip.SkillLabel'}} ({{localizeWeaponSkill item.system.skill}})">
<i class="fas fa-dice"></i>
</span>
</span>
</div>
<span class="centered-item-property">
{{#if item.system.lethality}}
{{#if item.system.isLethal}}
<a class="item-control toggle-lethality dg-red" title="Toggle Lethality (Current Lethality: {{item.system.lethality}}%)"><i class="fas fa-skull-crossbones" item-id="{{item._id}}" is-lethal="true"></i></a>
{{else}}
<a class="item-control toggle-lethality" title="Toggle Lethality (Currently No Lethality)"><i class="fas fa-user-injured" item-id="{{item._id}}" is-lethal="false"></i></a>
{{/if}}
{{/if}}
{{#unless item.system.isLethal}}
<span class="rollable" data-rolltype="damage" data-iid="{{item._id}}">
{{toUpperCase item.system.damage}}{{#if_eq item.system.skill 'unarmed_combat'}}{{actor.system.statistics.str.meleeDamageBonusFormula}}{{/if_eq}}{{#if_eq item.system.skill 'melee_weapons'}}{{actor.system.statistics.str.meleeDamageBonusFormula}}{{/if_eq}}
<i class="fas fa-dice"></i>
</span>
{{/unless}}
{{#if item.system.isLethal}}
<span class="rollable" data-rolltype="lethality" data-iid="{{item._id}}" title="{{localize 'DG.ItemWindow.Weapons.LethalityTooltip'}}">
{{item.system.lethality}}%
<i class="fas fa-dice"></i>
</span>
{{/if}}
</span>
<span class="centered-item-property">{{item.system.armorPiercing}}</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ol>
</div>
{{!-- ARMOR/DEFENSE --}}
<div>
<div class="horizontal-bar-section-divider">
<span>{{localize 'DG.Gear.Armor'}}</span>
</div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image">
{{#if actor.system.settings.sorting.armorSortAlphabetical}}
<a><i class="toggle-item-sorting-style fa-solid fa-solid fa-arrow-down-a-z" data-gear-type="armor"></i></a>
{{else}}
<a><i class="toggle-item-sorting-style fa-solid fa-arrow-down-short-wide" data-gear-type="armor"></i></a>
{{/if}}
</div>
<div class="item-name"><span>{{localize 'DG.Gear.Name'}} <a><i class="armor-browse fas fa-search"></i></a></span></div>
<span class="centered-item-property">{{localize 'DG.Gear.ArmorRating'}}</span>
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
<div class="item-controls">
<a class="item-control item-create action-pill" title="Create item" data-type="armor"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.armor as |item id|}}
<li class="item flexrow" data-item-id="{{item._id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
<h4 style="word-wrap: break-word;" class="item-name">{{item.name}}</h4>
<span class="centered-item-property">{{item.system.protection}}</span>
<span class="equipped-item centered-item-property" data-id="{{item._id}}" title="{{localize 'DG.Tooltip.ToggleEquippedState'}}">
{{#if item.system.equipped}}
<span class="fas fa-check"></span>
{{else}}
<span class="fas fa-times"></span>
{{/if}}
</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ol>
</div>
{{!-- OTHER GEAR/MISC --}}
<div>
<div class="horizontal-bar-section-divider">
<span>{{localize 'DG.Gear.OtherGear'}}</span>
</div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image">
{{#if actor.system.settings.sorting.gearSortAlphabetical}}
<a><i class="toggle-item-sorting-style fa-solid fa-solid fa-arrow-down-a-z" data-gear-type="gear"></i></a>
{{else}}
<a><i class="toggle-item-sorting-style fa-solid fa-arrow-down-short-wide" data-gear-type="gear"></i></a>
{{/if}}
</div>
<div style="min-width: 55%;" class="item-name">{{localize 'DG.Gear.Name'}}</div>
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
<div class="item-controls">
<a class="item-control item-create action-pill" title="Create item" data-type="gear"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.gear as |item id|}}
<li class="item flexrow" data-item-id="{{item._id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
<h4 style="word-wrap: break-word; min-width: 55%;" class="item-name">{{item.name}}</h4>
<span class="equipped-item centered-item-property" data-id="{{item._id}}" title="{{localize 'DG.Tooltip.ToggleEquippedState'}}" >
{{#if item.system.equipped}}
<span class="fas fa-check"></span>
{{else}}
<span class="fas fa-times"></span>
{{/if}}
</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ol>
</div>
+7 -177
View File
@@ -57,19 +57,9 @@
<div class="horizontal-bar-section-divider">
<span>{{localize "DG.Sheet.BlockHeaders.Statistics"}}</span>
</div>
<div class="grid grid-3col">
{{#each actor.system.statistics as |statistic key|}}
<div class="flex-group-center flex-mid-border">
<div class="">
<div class="physical-stats-outer-grid-3col">
<label class="rollable resource-label" data-rolltype="stat" data-key="{{key}}" for="system.statistics.{{key}}.value">{{localize (concat 'DG.Attributes.' key)}}</label>
<input type="text" name="system.statistics.{{key}}.value" value="{{statistic.value}}" data-dtype="Number"/>
<span class="rollable" data-rolltype="stat" data-key="{{key}}" title="{{localize 'DG.Tooltip.x5AttributeLabel'}}">({{numberFormat statistic.x5 decimals=0 sign=false}}%)</span>
</div >
</div>
</div>
{{/each}}
</div>
{{> "systems/deltagreen/templates/actor/partials/attributes-grid-partial.html" actorType="unnatural"}}
</div>
</div>
@@ -111,6 +101,7 @@
{{#unless skill.proficiency}}title="{{localize 'DG.Tooltip.CannotRollSkillLabel'}}"{{/unless}}
>
{{localizeWithFallback (concat "DG.Skills." key) skill.label }}
<i class="fas fa-dice"></i>
</label>
<input class="percentile-skill-input" type="text" name="system.skills.{{key}}.proficiency" value="{{skill.proficiency}}" data-dtype="Number" {{#if skill.isCalculatedValue}} disabled {{/if}}/>
@@ -121,7 +112,7 @@
</div>
<br>
<div>
{{> "systems/deltagreen/templates/actor/custom-skills-partial.html"}}
{{> "systems/deltagreen/templates/actor/partials/custom-skills-partial.html"}}
</div>
<br>
<div>
@@ -137,173 +128,12 @@
{{!-- GEAR --}}
<div class="tab items" data-group="primary" data-tab="gear">
<div>
<div class="horizontal-bar-section-divider">
<span>{{localize 'DG.Gear.Weapons'}}</span>
</div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<span class="">{{localize 'DG.Gear.Name'}}</span>
<span class="centered-item-property">{{localize 'DG.Gear.DamageOrLethality'}}</span>
<span class="centered-item-property">{{localize 'DG.Gear.ArmorPiercing'}}</span>
<div class="item-controls">
<a class="item-control item-create action-pill" title="Create item" data-type="weapon"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.items as |item id|}}
{{#if_eq item.type 'weapon'}}
<li class="item flexrow" data-item-id="{{item.id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
<h4 style="word-wrap: break-word;"
class="item-name rollable"
data-rolltype="weapon"
data-key="{{item.system.skill}}"
data-iid="{{item._id}}"
title="{{localize 'DG.Tooltip.SkillLabel'}} ({{localizeWeaponSkill item.system.skill}})"
>
{{item.name}}
</h4>
<span class="centered-item-property">
{{#unless item.system.isLethal}}
<span class="rollable" data-rolltype="damage" data-iid="{{item._id}}">
{{toUpperCase item.system.damage}}
</span>
{{/unless}}
{{#if item.system.isLethal}}
<span class="rollable" data-rolltype="lethality" data-iid="{{item._id}}"
title="{{localize 'DG.ItemWindow.Weapons.LethalityTooltip'}}"
>{{formatLethality item.system.lethality}}</span>
{{/if}}
{{#if item.system.lethality}}
-
{{#if item.system.isLethal}}
<a class="item-control toggle-lethality dg-red" title="Toggle Lethality (Current Lethality: {{item.system.lethality}}%)"><i class="fas fa-skull-crossbones" item-id="{{item.id}}" is-lethal="true"></i></a>
{{else}}
<a class="item-control toggle-lethality" title="Toggle Lethality (Currently No Lethality)"><i class="fas fa-user-injured" item-id="{{item.id}}" is-lethal="false"></i></a>
{{/if}}
{{/if}}
</span>
<span class="centered-item-property">{{item.system.armorPiercing}}</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/if_eq}}
{{/each}}
</ol>
</div>
<div>
<div class="horizontal-bar-section-divider">
<span>{{localize 'DG.Gear.Armor'}}</span>
</div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<div class="item-name">{{localize 'DG.Gear.Name'}}</div>
<span class="centered-item-property">{{localize 'DG.Gear.ArmorRating'}}</span>
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
<div class="item-controls">
<a class="item-control item-create action-pill" title="Create item" data-type="armor"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.items as |item id|}}
{{#if_eq item.type 'armor'}}
<li class="item flexrow" data-item-id="{{item.id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
<h4 style="word-wrap: break-word;" class="item-name">{{item.name}}</h4>
<span class="centered-item-property">{{item.system.protection}}</span>
<span class="equipped-item centered-item-property" data-id="{{item.id}}" title="{{localize 'DG.Tooltip.ToggleEquippedState'}}">
{{#if item.system.equipped}}
<span class="fas fa-check"></span>
{{else}}
<span class="fas fa-times"></span>
{{/if}}
</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/if_eq}}
{{/each}}
</ol>
</div>
<div>
<div class="horizontal-bar-section-divider">
<span>{{localize 'DG.Gear.OtherGear'}}</span>
</div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<div class="item-name">{{localize 'DG.Gear.Name'}}</div>
<div class="item-name"></div>
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
<div class="item-controls">
<a class="item-control item-create action-pill" title="Create item" data-type="gear"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.items as |item id|}}
{{#if_eq item.type 'gear'}}
<li class="item flexrow" data-item-id="{{item.id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
<h4 style="word-wrap: break-word;" class="item-name">{{item.name}}</h4>
<span></span> <!-- This is just here to get things to align nicely with the other sections-->
<span class="equipped-item centered-item-property" data-id="{{item.id}}" title="{{localize 'DG.Tooltip.ToggleEquippedState'}}" >
{{#if item.system.equipped}}
<span class="fas fa-check"></span>
{{else}}
<span class="fas fa-times"></span>
{{/if}}
</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/if_eq}}
{{/each}}
</ol>
</div>
{{> "systems/deltagreen/templates/actor/partials/equipment-partial.html" }}
</div>
{{!-- About Tab --}}
<div class="tab about" data-group="primary" data-tab="about">
{{> "systems/deltagreen/templates/actor/help-and-licensing-partial.html" }}
{{> "systems/deltagreen/templates/actor/partials/help-and-licensing-partial.html" }}
</div>
</section>
+7 -98
View File
@@ -57,109 +57,18 @@
</div>
{{!-- GEAR --}}
{{!-- GEAR Tab --}}
<div class="tab items" data-group="primary" data-tab="gear">
<div>
<div class="horizontal-bar-section-divider">
<span>{{localize 'DG.Gear.Armor'}}</span>
</div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<div class="item-name">{{localize 'DG.Gear.Name'}}</div>
<span class="centered-item-property">{{localize 'DG.Gear.ArmorRating'}}</span>
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
<div class="item-controls">
<a class="item-control item-create action-pill" title="Create item" data-type="armor"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.items as |item id|}}
{{#if_eq item.type 'armor'}}
<li class="item flexrow" data-item-id="{{item.id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
<h4 style="word-wrap: break-word;" class="item-name">{{item.name}}</h4>
<span class="centered-item-property">{{item.system.protection}}</span>
<span class="equipped-item centered-item-property" data-id="{{item.id}}" title="{{localize 'DG.Tooltip.ToggleEquippedState'}}">
{{#if item.system.equipped}}
<span class="fas fa-check"></span>
{{else}}
<span class="fas fa-times"></span>
{{/if}}
</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/if_eq}}
{{/each}}
</ol>
</div>
<div>
<div class="horizontal-bar-section-divider">
<span>{{localize 'DG.Gear.OtherGear'}}</span>
</div>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<div class="item-name">{{localize 'DG.Gear.Name'}}</div>
<div class="item-name"></div>
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
<div class="item-controls">
<a class="item-control item-create action-pill" title="Create item" data-type="gear"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
</div>
</li>
{{#each actor.items as |item id|}}
{{#if_eq item.type 'gear'}}
<li class="item flexrow" data-item-id="{{item.id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
<h4 style="word-wrap: break-word;" class="item-name">{{item.name}}</h4>
<span></span> <!-- This is just here to get things to align nicely with the other sections-->
<span class="equipped-item centered-item-property" data-id="{{item.id}}" title="{{localize 'DG.Tooltip.ToggleEquippedState'}}" >
{{#if item.system.equipped}}
<span class="fas fa-check"></span>
{{else}}
<span class="fas fa-times"></span>
{{/if}}
</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/if_eq}}
{{/each}}
</ol>
</div>
{{> "systems/deltagreen/templates/actor/equipment-partial.html" }}
</div>
{{!-- About Tab --}}
<div class="tab about" data-group="primary" data-tab="about">
{{> "systems/deltagreen/templates/actor/help-and-licensing-partial.html" }}
</div>
{{!-- About Tab --}}
<div class="tab about" data-group="primary" data-tab="about">
{{> "systems/deltagreen/templates/actor/partials/help-and-licensing-partial.html" }}
</div>
</section>
</form>