mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 04:44:16 +02:00
Compare commits
3 commits
bae9006f64
...
e4a3f105dc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4a3f105dc | ||
|
|
2931377d53 | ||
|
|
53e8da77c6 |
16 changed files with 94 additions and 55 deletions
|
|
@ -778,7 +778,9 @@
|
||||||
"title": "Group Roll"
|
"title": "Group Roll"
|
||||||
},
|
},
|
||||||
"TokenConfig": {
|
"TokenConfig": {
|
||||||
"actorSizeUsed": "Actor size is set, determining the dimensions"
|
"actorSizeUsed": "Actor size is set, determining the dimensions",
|
||||||
|
"tokenSize": "Token Size",
|
||||||
|
"sizeCategory": "Size Category"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"CLASS": {
|
"CLASS": {
|
||||||
|
|
@ -2565,10 +2567,11 @@
|
||||||
"tokenImg": { "label": "Token Image" },
|
"tokenImg": { "label": "Token Image" },
|
||||||
"tokenRingImg": { "label": "Subject Texture" },
|
"tokenRingImg": { "label": "Subject Texture" },
|
||||||
"tokenSize": {
|
"tokenSize": {
|
||||||
"placeholder": "Using character dimensions",
|
"placeholder": "Token Size",
|
||||||
"disabledPlaceholder": "Set by character size",
|
"disabledPlaceholder": "Token Size",
|
||||||
"height": { "label": "Height" },
|
"height": { "label": "Height" },
|
||||||
"width": { "label": "Width" },
|
"width": { "label": "Width" },
|
||||||
|
"depth": { "label": "Depth" },
|
||||||
"scale": { "label": "Token Scale" }
|
"scale": { "label": "Token Scale" }
|
||||||
},
|
},
|
||||||
"evolved": {
|
"evolved": {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ export default class Party extends DHBaseActorSheet {
|
||||||
actions: {
|
actions: {
|
||||||
openDocument: Party.#openDocument,
|
openDocument: Party.#openDocument,
|
||||||
deletePartyMember: Party.#deletePartyMember,
|
deletePartyMember: Party.#deletePartyMember,
|
||||||
deleteItem: Party.#deleteItem,
|
|
||||||
toggleHope: Party.#toggleHope,
|
toggleHope: Party.#toggleHope,
|
||||||
toggleHitPoints: Party.#toggleHitPoints,
|
toggleHitPoints: Party.#toggleHitPoints,
|
||||||
toggleStress: Party.#toggleStress,
|
toggleStress: Party.#toggleStress,
|
||||||
|
|
@ -509,23 +508,4 @@ export default class Party extends DHBaseActorSheet {
|
||||||
const newMembersList = currentMembers.filter(uuid => uuid !== doc.uuid);
|
const newMembersList = currentMembers.filter(uuid => uuid !== doc.uuid);
|
||||||
await this.document.update({ 'system.partyMembers': newMembersList });
|
await this.document.update({ 'system.partyMembers': newMembersList });
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #deleteItem(event, target) {
|
|
||||||
const doc = await getDocFromElement(target.closest('.inventory-item'));
|
|
||||||
if (!event.shiftKey) {
|
|
||||||
const confirmed = await foundry.applications.api.DialogV2.confirm({
|
|
||||||
window: {
|
|
||||||
title: game.i18n.format('DAGGERHEART.APPLICATIONS.DeleteConfirmation.title', {
|
|
||||||
type: game.i18n.localize('TYPES.Actor.party'),
|
|
||||||
name: doc.name
|
|
||||||
})
|
|
||||||
},
|
|
||||||
content: game.i18n.format('DAGGERHEART.APPLICATIONS.DeleteConfirmation.text', { name: doc.name })
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!confirmed) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.document.deleteEmbeddedDocuments('Item', [doc.id]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ export default class BeastformEffect extends BaseEffect {
|
||||||
static migrateData(source) {
|
static migrateData(source) {
|
||||||
if (!source.characterTokenData.tokenSize.height) source.characterTokenData.tokenSize.height = 1;
|
if (!source.characterTokenData.tokenSize.height) source.characterTokenData.tokenSize.height = 1;
|
||||||
if (!source.characterTokenData.tokenSize.width) source.characterTokenData.tokenSize.width = 1;
|
if (!source.characterTokenData.tokenSize.width) source.characterTokenData.tokenSize.width = 1;
|
||||||
|
if (!source.characterTokenData.tokenSize.depth) source.characterTokenData.tokenSize.depth = 1;
|
||||||
|
|
||||||
return super.migrateData(source);
|
return super.migrateData(source);
|
||||||
}
|
}
|
||||||
|
|
@ -52,7 +53,8 @@ export default class BeastformEffect extends BaseEffect {
|
||||||
if (this.parent.parent.type === 'character') {
|
if (this.parent.parent.type === 'character') {
|
||||||
const baseUpdate = {
|
const baseUpdate = {
|
||||||
height: this.characterTokenData.tokenSize.height,
|
height: this.characterTokenData.tokenSize.height,
|
||||||
width: this.characterTokenData.tokenSize.width
|
width: this.characterTokenData.tokenSize.width,
|
||||||
|
depth: this.characterTokenData.tokenSize.depth
|
||||||
};
|
};
|
||||||
const update = {
|
const update = {
|
||||||
...baseUpdate,
|
...baseUpdate,
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,8 @@ export default class DHBeastform extends BaseDataItem {
|
||||||
}),
|
}),
|
||||||
scale: new fields.NumberField({ nullable: false, min: 0.2, max: 3, step: 0.05, initial: 1 }),
|
scale: new fields.NumberField({ nullable: false, min: 0.2, max: 3, step: 0.05, initial: 1 }),
|
||||||
height: new fields.NumberField({ integer: true, min: 1, initial: null, nullable: true }),
|
height: new fields.NumberField({ integer: true, min: 1, initial: null, nullable: true }),
|
||||||
width: new fields.NumberField({ integer: true, min: 1, initial: null, nullable: true })
|
width: new fields.NumberField({ integer: true, min: 1, initial: null, nullable: true }),
|
||||||
|
depth: new fields.NumberField({ integer: true, min: 1, initial: null, nullable: true })
|
||||||
}),
|
}),
|
||||||
mainTrait: new fields.StringField({
|
mainTrait: new fields.StringField({
|
||||||
required: true,
|
required: true,
|
||||||
|
|
@ -192,7 +193,8 @@ export default class DHBeastform extends BaseDataItem {
|
||||||
tokenSize: {
|
tokenSize: {
|
||||||
scale: this.parent.parent.prototypeToken.texture.scaleX,
|
scale: this.parent.parent.prototypeToken.texture.scaleX,
|
||||||
height: this.parent.parent.prototypeToken.height,
|
height: this.parent.parent.prototypeToken.height,
|
||||||
width: this.parent.parent.prototypeToken.width
|
width: this.parent.parent.prototypeToken.width,
|
||||||
|
depth: this.parent.parent.prototypeToken.depth
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
advantageOn: this.advantageOn,
|
advantageOn: this.advantageOn,
|
||||||
|
|
@ -211,10 +213,12 @@ export default class DHBeastform extends BaseDataItem {
|
||||||
: null;
|
: null;
|
||||||
const width = autoTokenSize ?? this.tokenSize.width;
|
const width = autoTokenSize ?? this.tokenSize.width;
|
||||||
const height = autoTokenSize ?? this.tokenSize.height;
|
const height = autoTokenSize ?? this.tokenSize.height;
|
||||||
|
const depth = autoTokenSize ?? this.tokenSize.depth;
|
||||||
|
|
||||||
const prototypeTokenUpdate = {
|
const prototypeTokenUpdate = {
|
||||||
height,
|
height,
|
||||||
width,
|
width,
|
||||||
|
depth,
|
||||||
texture: {
|
texture: {
|
||||||
src: this.tokenImg,
|
src: this.tokenImg,
|
||||||
scaleX: this.tokenSize.scale,
|
scaleX: this.tokenSize.scale,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export default class DhScene extends Scene {
|
||||||
const prototype = tokenDoc.actor?.prototypeToken ?? tokenDoc;
|
const prototype = tokenDoc.actor?.prototypeToken ?? tokenDoc;
|
||||||
this.#sizeSyncBatch.set(tokenDoc.id, {
|
this.#sizeSyncBatch.set(tokenDoc.id, {
|
||||||
size: tokenSize,
|
size: tokenSize,
|
||||||
prototypeSize: { width: prototype.width, height: prototype.height },
|
prototypeSize: { width: prototype.width, height: prototype.height, depth: prototype.depth },
|
||||||
position: { x: tokenDoc.x, y: tokenDoc.y, elevation: tokenDoc.elevation }
|
position: { x: tokenDoc.x, y: tokenDoc.y, elevation: tokenDoc.elevation }
|
||||||
});
|
});
|
||||||
this.#processSyncBatch();
|
this.#processSyncBatch();
|
||||||
|
|
@ -36,11 +36,13 @@ export default class DhScene extends Scene {
|
||||||
const tokenSize = tokenSizes[size];
|
const tokenSize = tokenSizes[size];
|
||||||
const width = size !== CONFIG.DH.ACTOR.tokenSize.custom.id ? tokenSize : prototypeSize.width;
|
const width = size !== CONFIG.DH.ACTOR.tokenSize.custom.id ? tokenSize : prototypeSize.width;
|
||||||
const height = size !== CONFIG.DH.ACTOR.tokenSize.custom.id ? tokenSize : prototypeSize.height;
|
const height = size !== CONFIG.DH.ACTOR.tokenSize.custom.id ? tokenSize : prototypeSize.height;
|
||||||
|
const depth = size !== CONFIG.DH.ACTOR.tokenSize.custom.id ? tokenSize : prototypeSize.depth;
|
||||||
const updatedPosition = DHToken.getSnappedPositionInSquareGrid(this.grid, position, width, height);
|
const updatedPosition = DHToken.getSnappedPositionInSquareGrid(this.grid, position, width, height);
|
||||||
return {
|
return {
|
||||||
_id,
|
_id,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
|
depth,
|
||||||
...updatedPosition
|
...updatedPosition
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,8 @@ export default class DHToken extends CONFIG.Token.documentClass {
|
||||||
if (tokenSize && actor.system.size !== CONFIG.DH.ACTOR.tokenSize.custom.id) {
|
if (tokenSize && actor.system.size !== CONFIG.DH.ACTOR.tokenSize.custom.id) {
|
||||||
document.updateSource({
|
document.updateSource({
|
||||||
width: tokenSize,
|
width: tokenSize,
|
||||||
height: tokenSize
|
height: tokenSize,
|
||||||
|
depth: tokenSize
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -90,7 +91,7 @@ export default class DHToken extends CONFIG.Token.documentClass {
|
||||||
) {
|
) {
|
||||||
const tokenSizes = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).tokenSizes;
|
const tokenSizes = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).tokenSizes;
|
||||||
const tokenSize = tokenSizes[update.system.size];
|
const tokenSize = tokenSizes[update.system.size];
|
||||||
if (tokenSize !== this.width || tokenSize !== this.height) {
|
if (tokenSize !== this.width || tokenSize !== this.height || tokenSize !== this.depth) {
|
||||||
this.parent?.syncTokenDimensions(this, update.system.size);
|
this.parent?.syncTokenDimensions(this, update.system.size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ export default class DhTokenManager {
|
||||||
if (tokenSize && actor.system.size !== CONFIG.DH.ACTOR.tokenSize.custom.id) {
|
if (tokenSize && actor.system.size !== CONFIG.DH.ACTOR.tokenSize.custom.id) {
|
||||||
tokenData.width = tokenSize;
|
tokenData.width = tokenSize;
|
||||||
tokenData.height = tokenSize;
|
tokenData.height = tokenSize;
|
||||||
|
tokenData.depth = tokenSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
"version": "2.2.6",
|
"version": "2.2.6",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "14.361",
|
"minimum": "14.361",
|
||||||
"verified": "14.362",
|
"verified": "14.363",
|
||||||
"maximum": "14"
|
"maximum": "14"
|
||||||
},
|
},
|
||||||
"url": "https://github.com/Foundryborne/daggerheart",
|
"url": "https://github.com/Foundryborne/daggerheart",
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<button type="button" class="control-icon" data-action="sort" data-tooltip aria-label="HUD.ToFrontOrBack">
|
<button type="button" class="control-icon" data-action="sort" data-tooltip aria-label="HUD.ToFrontOrBack">
|
||||||
<i class="fa-solid fa-arrow-down-arrow-up" inert></i>
|
<i class="fa-solid fa-bring-forward" inert></i>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{{#if hasCompanion}}
|
{{#if hasCompanion}}
|
||||||
|
|
@ -26,6 +26,13 @@
|
||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if isGM}}
|
||||||
|
<button type="button" class="control-icon {{lockedClass}}" data-action="locked"
|
||||||
|
data-tooltip aria-label="{{localize (ifThen lockedClass "HUD.Unlock" "HUD.Lock")}}">
|
||||||
|
<i class="fa-solid {{ifThen lockedClass "fa-lock" "fa-lock-open"}}" inert></i>
|
||||||
|
</button>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if canConfigure}}
|
{{#if canConfigure}}
|
||||||
<button type="button" class="control-icon" data-action="config" data-tooltip aria-label="HUD.OpenConfig">
|
<button type="button" class="control-icon" data-action="config" data-tooltip aria-label="HUD.OpenConfig">
|
||||||
<i class="fa-solid fa-gear" inert></i>
|
<i class="fa-solid fa-gear" inert></i>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<div class="tab scrollable{{#if tab.active}} active{{/if}}" data-group="{{tab.group}}" data-tab="{{tab.id}}">
|
<div class="tab scrollable{{#if tab.active}} active{{/if}}" data-group="{{tab.group}}" data-tab="{{tab.id}}">
|
||||||
|
<div class="token-image-group">
|
||||||
{{formGroup fields.texture.fields.src value=source.texture.src rootId=rootId}}
|
{{formGroup fields.texture.fields.src value=source.texture.src rootId=rootId}}
|
||||||
{{#if randomImgEnabled}}
|
{{#if randomImgEnabled}}
|
||||||
{{formGroup fields.randomImg value=source.randomImg classes="slim" rootId=rootId}}
|
{{formGroup fields.randomImg value=source.randomImg classes="slim" rootId=rootId}}
|
||||||
|
|
@ -10,11 +11,33 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if imagePreview}}
|
||||||
|
<div class="{{imagePreview.cls}}">
|
||||||
|
{{#if imagePreview.isVideo}}
|
||||||
|
<video class="token-image-thumb" src="{{imagePreview.src}}" autoplay muted loop playsinline
|
||||||
|
disablepictureinpicture></video>
|
||||||
|
{{else}}
|
||||||
|
<img class="token-image-thumb" src="{{imagePreview.src}}" alt="{{localize "TOKEN.ImagePreview"}}">
|
||||||
|
{{/if}}
|
||||||
|
<div class="token-image-controls">
|
||||||
|
<button type="button" class="cycle-prev icon fa-solid fa-chevron-left" data-action="cycleImage"
|
||||||
|
data-delta="-1" aria-label="{{localize "TOKEN.ImageCyclePrev"}}"
|
||||||
|
{{#unless imagePreview.hasPrev}} disabled{{/unless}}></button>
|
||||||
|
<span class="counter">{{imagePreview.current}} / {{imagePreview.total}}</span>
|
||||||
|
<button type="button" class="cycle-next icon fa-solid fa-chevron-right" data-action="cycleImage"
|
||||||
|
data-delta="1" aria-label="{{localize "TOKEN.ImageCycleNext"}}"
|
||||||
|
{{#unless imagePreview.hasNext}} disabled{{/unless}}></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{{localize "Token Size"}}</legend>
|
<legend>{{localize "DAGGERHEART.APPLICATIONS.TokenConfig.tokenSize"}}</legend>
|
||||||
{{#if usesActorSize}}
|
{{#if usesActorSize}}
|
||||||
<div class="form-group lim">
|
<div class="form-group slim">
|
||||||
<label>{{localize "Size Category"}}</label>
|
<label>{{localize "DAGGERHEART.APPLICATIONS.TokenConfig.sizeCategory"}}</label>
|
||||||
|
|
||||||
<select id="dhTokenSize">
|
<select id="dhTokenSize">
|
||||||
{{selectOptions tokenSizes selected=tokenSize valueAttr="id" labelAttr="label" localize=true}}
|
{{selectOptions tokenSizes selected=tokenSize valueAttr="id" labelAttr="label" localize=true}}
|
||||||
|
|
@ -23,15 +46,17 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div id="tokenSizeDimensions" class="form-group slim" {{#if actorSizeDisable}}data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.TokenConfig.actorSizeUsed"}}"{{/if}}>
|
<div id="tokenSizeDimensions" class="form-group slim" {{#if actorSizeDisable}}data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.TokenConfig.actorSizeUsed"}}"{{/if}}>
|
||||||
<label>
|
<span class="label">
|
||||||
{{localize "TOKEN.Dimensions"}} <span class="units">({{localize "GridSpaces"}})</span>
|
{{localize "TOKEN.Size"}}
|
||||||
<i class="fa-solid fa-lock" {{#unless actorSizeDisable}}style="opacity: 0%;"{{/unless}}></i>
|
<span class="units">({{localize "MEASUREMENT.GridSpaces"}})</span>
|
||||||
</label>
|
</span>
|
||||||
<div class="form-fields">
|
<div class="form-group slim">
|
||||||
<label for="{{rootId}}-width">{{localize "DOCUMENT.FIELDS.width.label"}}</label>
|
<label for="{{rootId}}-width">{{localize "DOCUMENT.FIELDS.width.label"}}</label>
|
||||||
{{formInput fields.width value=source.width id=(concat rootId "-width") disabled=actorSizeDisable}}
|
{{formInput fields.width value=source.width id=(concat rootId "-width") disabled=actorSizeDisable}}
|
||||||
<label for="{{rootId}}-height">{{localize "DOCUMENT.FIELDS.height.label"}}</label>
|
<label for="{{rootId}}-height">{{localize "DOCUMENT.FIELDS.height.label"}}</label>
|
||||||
{{formInput fields.height value=source.height id=(concat rootId "-height") disabled=actorSizeDisable}}
|
{{formInput fields.height value=source.height id=(concat rootId "-height") disabled=actorSizeDisable}}
|
||||||
|
<label for="{{rootId}}-depth">Z</label>
|
||||||
|
{{formInput fields.depth value=source.depth id=(concat rootId "-depth") disabled=actorSizeDisable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
type='feature'
|
type='feature'
|
||||||
collection=@root.features
|
collection=@root.features
|
||||||
hideContextMenu=true
|
hideContextMenu=true
|
||||||
|
hideModifyControls=true
|
||||||
canCreate=@root.editable
|
canCreate=@root.editable
|
||||||
showActions=@root.editable
|
showActions=@root.editable
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
type='feature'
|
type='feature'
|
||||||
collection=@root.features
|
collection=@root.features
|
||||||
hideContextMenu=true
|
hideContextMenu=true
|
||||||
|
hideModifyControls=true
|
||||||
canCreate=@root.editable
|
canCreate=@root.editable
|
||||||
showActions=@root.editable
|
showActions=@root.editable
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ Parameters:
|
||||||
- showLabels {boolean} : If true, show label-tags else show simple tags.
|
- showLabels {boolean} : If true, show label-tags else show simple tags.
|
||||||
- hideTooltip {boolean} : If true, disables the tooltip on the item image.
|
- hideTooltip {boolean} : If true, disables the tooltip on the item image.
|
||||||
- hideControls {boolean} : If true, hides the controls inside inventory-item partials.
|
- hideControls {boolean} : If true, hides the controls inside inventory-item partials.
|
||||||
|
- hideContextMenu {boolean}: If true, hides the context menu dropdown button
|
||||||
|
- hideModifyControls {boolean}: If true, hides the edit and delete options
|
||||||
- hideDescription {boolean} : If true, hides the item's description.
|
- hideDescription {boolean} : If true, hides the item's description.
|
||||||
- hideResources {boolean} : If true, hides the item's resources.
|
- hideResources {boolean} : If true, hides the item's resources.
|
||||||
- showActions {boolean} : If true show feature's actions.
|
- showActions {boolean} : If true show feature's actions.
|
||||||
|
|
@ -59,6 +61,7 @@ Parameters:
|
||||||
actorType=(ifThen ../actorType ../actorType @root.document.type)
|
actorType=(ifThen ../actorType ../actorType @root.document.type)
|
||||||
hideControls=../hideControls
|
hideControls=../hideControls
|
||||||
hideContextMenu=../hideContextMenu
|
hideContextMenu=../hideContextMenu
|
||||||
|
hideModifyControls=../hideModifyControls
|
||||||
isActor=../isActor
|
isActor=../isActor
|
||||||
categoryAdversary=../categoryAdversary
|
categoryAdversary=../categoryAdversary
|
||||||
hideTooltip=../hideTooltip
|
hideTooltip=../hideTooltip
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ Parameters:
|
||||||
- hideTags {boolean} : If true, hide simple-tags else show simple-tags.
|
- hideTags {boolean} : If true, hide simple-tags else show simple-tags.
|
||||||
- hideTooltip {boolean} : If true, disables the tooltip on the item image.
|
- hideTooltip {boolean} : If true, disables the tooltip on the item image.
|
||||||
- hideControls {boolean} : If true, hides the controls inside inventory-item partials.
|
- hideControls {boolean} : If true, hides the controls inside inventory-item partials.
|
||||||
|
- hideContextMenu {boolean}: If true, hides the context menu dropdown button
|
||||||
|
- hideModifyControls {boolean}: If true, hides the edit and delete options (todo: swap to show, only party cares to show this)
|
||||||
- hideDescription {boolean} : If true, hides the item's description.
|
- hideDescription {boolean} : If true, hides the item's description.
|
||||||
- hideResources {boolean} : If true, hides the item's resources.
|
- hideResources {boolean} : If true, hides the item's resources.
|
||||||
- showActions {boolean} : If true show feature's actions.
|
- showActions {boolean} : If true show feature's actions.
|
||||||
|
|
@ -112,12 +114,12 @@ Parameters:
|
||||||
<a data-action="triggerContextMenu" data-tooltip="DAGGERHEART.UI.Tooltip.moreOptions">
|
<a data-action="triggerContextMenu" data-tooltip="DAGGERHEART.UI.Tooltip.moreOptions">
|
||||||
<i class="fa-solid fa-fw fa-ellipsis-vertical" inert></i>
|
<i class="fa-solid fa-fw fa-ellipsis-vertical" inert></i>
|
||||||
</a>
|
</a>
|
||||||
{{else if @root.editable}}
|
{{else if (and @root.editable (not hideModifyControls))}}
|
||||||
<a data-action="editDoc" data-tooltip="DAGGERHEART.UI.Tooltip.edit">
|
<a data-action="editDoc" data-tooltip="DAGGERHEART.UI.Tooltip.edit">
|
||||||
<i class="fa-solid fa-edit" inert></i>
|
<i class="fa-solid fa-edit" inert></i>
|
||||||
</a>
|
</a>
|
||||||
{{#if (not isActor)}}
|
{{#if (not isActor)}}
|
||||||
<a data-action="deleteItem" data-tooltip="DAGGERHEART.UI.Tooltip.deleteItem">
|
<a data-action="deleteDoc" data-tooltip="DAGGERHEART.UI.Tooltip.deleteItem">
|
||||||
<i class="fa-solid fa-trash" inert></i>
|
<i class="fa-solid fa-trash" inert></i>
|
||||||
</a>
|
</a>
|
||||||
{{else if (eq type 'adversary')}}
|
{{else if (eq type 'adversary')}}
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,13 @@
|
||||||
placeholder=(localize (ifThen dimensionsDisabled "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.disabledPlaceholder" "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.placeholder"))
|
placeholder=(localize (ifThen dimensionsDisabled "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.disabledPlaceholder" "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.placeholder"))
|
||||||
disabled=dimensionsDisabled
|
disabled=dimensionsDisabled
|
||||||
}}
|
}}
|
||||||
|
{{formGroup
|
||||||
|
systemFields.tokenSize.fields.depth
|
||||||
|
value=source.system.tokenSize.depth
|
||||||
|
localize=true
|
||||||
|
placeholder=(localize (ifThen dimensionsDisabled "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.disabledPlaceholder" "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.placeholder"))
|
||||||
|
disabled=dimensionsDisabled
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="full-width">
|
<div class="full-width">
|
||||||
{{formGroup systemFields.tokenSize.fields.scale value=source.system.tokenSize.scale localize=true }}
|
{{formGroup systemFields.tokenSize.fields.scale value=source.system.tokenSize.scale localize=true }}
|
||||||
|
|
|
||||||
|
|
@ -13,20 +13,20 @@
|
||||||
<div class="combatant-controls flex-0">
|
<div class="combatant-controls flex-0">
|
||||||
{{#if @root.user.isGM}}
|
{{#if @root.user.isGM}}
|
||||||
<button type="button" class="inline-control combatant-control icon fa-solid fa-eye-slash {{#if hidden}}active{{/if}}"
|
<button type="button" class="inline-control combatant-control icon fa-solid fa-eye-slash {{#if hidden}}active{{/if}}"
|
||||||
data-action="toggleHidden" data-tooltip aria-label="{{ localize "COMBAT.ToggleVis" }}"></button>
|
data-action="toggleHidden" data-tooltip aria-label="{{ localize (ifThen hidden "COMBATANT.Show" "COMBATANT.Hide") }}"></button>
|
||||||
<button type="button" class="inline-control combatant-control icon fa-solid fa-skull {{#if isDefeated}}active{{/if}}"
|
<button type="button" class="inline-control combatant-control icon fa-solid fa-skull {{#if isDefeated}}active{{/if}}"
|
||||||
data-action="toggleDefeated" data-tooltip
|
data-action="toggleDefeated" data-tooltip
|
||||||
aria-label="{{ localize "COMBAT.ToggleDead" }}"></button>
|
aria-label="{{ localize (ifThen isDefeated "COMBATANT.UnmarkDefeated" "COMBATANT.MarkDefeated") }}"></button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if canPing}}
|
{{#if canPing}}
|
||||||
<button type="button" class="inline-control combatant-control icon fa-solid fa-bullseye-arrow"
|
<button type="button" class="inline-control combatant-control icon fa-solid fa-bullseye-arrow"
|
||||||
data-action="pingCombatant" data-tooltip
|
data-action="pingCombatant" data-tooltip
|
||||||
aria-label="{{ localize "COMBAT.PingCombatant" }}"></button>
|
aria-label="{{ localize "COMBATANT.Ping" }}"></button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#unless @root.user.isGM}}
|
{{#unless @root.user.isGM}}
|
||||||
<button type="button" class="inline-control combatant-control icon fa-solid fa-arrows-to-eye"
|
<button type="button" class="inline-control combatant-control icon fa-solid fa-arrows-to-eye"
|
||||||
data-action="panToCombatant" data-tooltip
|
data-action="panToCombatant" data-tooltip
|
||||||
aria-label="{{ localize "COMBAT.PanToCombatant" }}"></button>
|
aria-label="{{ localize "COMBATANT.PanTo" }}"></button>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue