Item Support #69

Merged
Oliver merged 50 commits from feature/item-support into main 2026-04-15 02:42:54 +00:00
4 changed files with 15 additions and 6 deletions
Showing only changes of commit f05311d7c8 - Show all commits

View file

@ -87,6 +87,7 @@
"max-value": "Maximum value",
"carry-capacity-used": "({percent}% Used)",
"carrying-capacity": {
"placeholder": "Unlimited",
"title": "Carrying Capacity:",
"label": "Maximum carrying weight"
},

View file

@ -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);
};

View file

@ -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;

View file

@ -7,12 +7,14 @@
<h3 class="grow">
{{localize "taf.Apps.PlayerSheet.carrying-capacity.title"}}
</h3>
<div>
{{localize
"taf.Apps.PlayerSheet.carry-capacity-used"
percent=carryCapacityPercent
}}
</div>
{{#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"