Item Support #69
4 changed files with 15 additions and 6 deletions
|
|
@ -87,6 +87,7 @@
|
|||
"max-value": "Maximum value",
|
||||
"carry-capacity-used": "({percent}% Used)",
|
||||
"carrying-capacity": {
|
||||
"placeholder": "Unlimited",
|
||||
"title": "Carrying Capacity:",
|
||||
"label": "Maximum carrying weight"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -272,6 +272,7 @@ export class PlayerSheet extends
|
|||
};
|
||||
|
||||
ctx.totalWeight = config.weightFormatter(totalWeight);
|
||||
ctx.hasCarryingCapacity = this.actor.system.carryCapacity != null;
|
||||
ctx.carryCapacityPercent = Math.round(totalWeight / this.actor.system.carryCapacity * 100);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
.taf > .window-content input {
|
||||
border: none;
|
||||
|
||||
&::placeholder {
|
||||
color: color-mix(in srgb, currentColor 40%, transparent 60%);
|
||||
}
|
||||
|
||||
&.large {
|
||||
--input-height: 2.5rem;
|
||||
font-size: 1.75rem;
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@
|
|||
<h3 class="grow">
|
||||
{{localize "taf.Apps.PlayerSheet.carrying-capacity.title"}}
|
||||
</h3>
|
||||
{{#if hasCarryCapacity}}
|
||||
<div>
|
||||
{{localize
|
||||
"taf.Apps.PlayerSheet.carry-capacity-used"
|
||||
percent=carryCapacityPercent
|
||||
}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<input
|
||||
type="text"
|
||||
value="{{totalWeight}}"
|
||||
|
|
@ -28,6 +30,7 @@
|
|||
type="number"
|
||||
name="system.carryCapacity"
|
||||
value="{{system.carryCapacity}}"
|
||||
placeholder="{{localize "taf.Apps.PlayerSheet.carrying-capacity.placeholder"}}"
|
||||
aria-label="{{localize "taf.Apps.PlayerSheet.carrying-capacity.label"}}"
|
||||
data-tooltip
|
||||
data-tooltip-direction="UP"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue