[Feature] Item Resource Support (#328)

* Initial

* Resource setup finished

* Fixed so that costs can be used

* Corrected standard resources

* Actions can only use item resources from their parent item

* Fixed up dice

* Fixed resource dice positioning

* Fixed parsing of resource.max

* Fixed styling on settings tab

* Added manual input for Dice Resources

* Lightmode fixes

* Fixed Feature spellcasting modifier

* Bugfix for item input to resourceDiceDialog

* Item fix for TokenInput

* PR Fixes
This commit is contained in:
WBHarry 2025-07-14 01:12:32 +02:00 committed by GitHub
parent eefa116d9a
commit 4be3e6179c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
53 changed files with 972 additions and 329 deletions

View file

@ -1,6 +1,17 @@
@import '../utils/colors.less';
@import '../utils/fonts.less';
.theme-light .application.daggerheart.dh-style {
.inventory-item,
.card-item {
.item-resource .item-dice-resource {
img {
filter: brightness(0) saturate(100%);
}
}
}
}
.application.daggerheart.dh-style {
.inventory-item {
display: grid;
@ -21,10 +32,19 @@
}
}
.item-label-wrapper {
display: grid;
grid-template-columns: 1fr 60px;
}
.item-label {
font-family: @font-body;
align-self: center;
&.fullWidth {
grid-column: span 2;
}
.item-name {
font-size: 14px;
}
@ -84,11 +104,27 @@
&:hover {
.card-label {
padding-top: 15px;
.controls {
.menu {
opacity: 1;
visibility: visible;
transition: all 0.3s ease;
max-height: 16px;
&.resource-menu {
max-height: 55px;
&.dice-menu {
max-height: 118px;
.item-resources {
flex-wrap: wrap;
}
.item-resource {
width: unset;
}
}
}
}
}
}
@ -97,6 +133,7 @@
height: 100%;
width: 100%;
object-fit: cover;
border-radius: 6px;
}
.card-label {
@ -123,15 +160,88 @@
color: @beige;
}
.controls {
.menu {
display: flex;
gap: 15px;
align-items: center;
flex-direction: column;
gap: 8px;
max-height: 0px;
opacity: 0;
visibility: collapse;
transition: all 0.3s ease;
color: @beige;
.controls {
display: flex;
gap: 2px;
gap: 15px;
justify-content: center;
}
}
}
.item-resources {
width: 92px;
}
.item-resource {
width: 92px;
}
}
.inventory-item,
.card-item {
.item-resources {
display: flex;
gap: 4px;
.resource-edit {
font-size: 14px;
}
}
.item-resource {
display: flex;
align-items: center;
justify-content: end;
gap: 4px;
i {
flex: none;
font-size: 14px;
}
input {
flex: 1;
}
.item-dice-resource {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 26px;
label {
position: absolute;
color: light-dark(white, black);
filter: drop-shadow(0 0 1px light-dark(@dark-blue, @golden));
z-index: 2;
font-size: 18px;
cursor: pointer;
}
img {
filter: brightness(0) saturate(100%) invert(97%) sepia(7%) saturate(580%) hue-rotate(332deg)
brightness(96%) contrast(95%);
}
i {
position: absolute;
text-shadow: 0 0 3px white;
filter: drop-shadow(0 1px white);
color: black;
font-size: 26px;
}
}
}
}