Changed to a warning icon

This commit is contained in:
WBHarry 2025-06-25 16:33:15 +02:00
parent 4f6c87a524
commit 20841ae7bf
6 changed files with 30 additions and 24 deletions

View file

@ -1078,9 +1078,9 @@
"faith": "Faith",
"ShortRest": "Take a Short Rest",
"LongRest": "Take a Long Rest",
"CharacterSetup": "Setup",
"CharacterSetup": "Character setup isn't done yet",
"Level": "Level",
"LevelUp": "Level Up!",
"LevelUp": "You can level up",
"Tabs": {
"Features": "Features",
"Inventory": "Inventory",

View file

@ -47,8 +47,7 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
useAdvancementCard: this.useAdvancementCard,
useAdvancementAbility: this.useAdvancementAbility,
toggleEquipItem: this.toggleEquipItem,
characterSetup: this.characterSetup,
levelup: this.openLevelUp,
levelManagement: this.levelManagement,
editImage: this._onEditImage
},
window: {
@ -458,11 +457,19 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
}
}
static characterSetup() {
static levelManagement() {
if (this.document.system.needsCharacterSetup) {
this.characterSetup();
} else {
this.openLevelUp();
}
}
characterSetup() {
new DhCharacterCreation(this.document).render(true);
}
static openLevelUp() {
openLevelUp() {
if (!this.document.system.class.value || !this.document.system.class.subclass) {
ui.notifications.error(game.i18n.localize('DAGGERHEART.Sheets.PC.Errors.missingClassOrSubclass'));
return;

View file

@ -3453,7 +3453,7 @@ div.daggerheart.views.multiclass {
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .name-row {
display: flex;
gap: 5px;
align-items: baseline;
align-items: center;
justify-content: space-between;
padding: 0;
padding-top: 5px;
@ -3487,7 +3487,7 @@ div.daggerheart.views.multiclass {
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .name-row .level-div .level-button {
color: light-dark(#222, #efe6d8);
font-size: 28px;
font-size: 18px;
line-height: 1;
min-height: unset;
height: min-content;
@ -4106,7 +4106,7 @@ div.daggerheart.views.multiclass {
box-shadow: 0 0 1px 1px #f3c267;
}
100% {
box-shadow: 0 0 3px 3px #f3c267;
box-shadow: 0 0 2px 2px #f3c267;
}
}
@keyframes glow-dark {
@ -4114,7 +4114,7 @@ div.daggerheart.views.multiclass {
box-shadow: 0 0 1px 1px #18162e;
}
100% {
box-shadow: 0 0 3px 3px #18162e;
box-shadow: 0 0 2px 2px #18162e;
}
}
@font-face {

View file

@ -10,7 +10,7 @@
.name-row {
display: flex;
gap: 5px;
align-items: baseline;
align-items: center;
justify-content: space-between;
padding: 0;
padding-top: 5px;
@ -48,7 +48,7 @@
.level-button {
color: light-dark(@dark, @beige);
font-size: 28px;
font-size: 18px;
line-height: 1;
min-height: unset;
height: min-content;

View file

@ -26,7 +26,7 @@
}
100% {
box-shadow: 0 0 3px 3px @golden;
box-shadow: 0 0 2px 2px @golden;
}
}
@ -36,6 +36,6 @@
}
100% {
box-shadow: 0 0 3px 3px @dark-blue;
box-shadow: 0 0 2px 2px @dark-blue;
}
}

View file

@ -12,17 +12,16 @@
<div class='level-div'>
<h3 class='label'>
{{#if document.system.needsCharacterSetup}}
<button class="level-button glow" data-action="characterSetup">{{localize 'DAGGERHEART.Sheets.PC.CharacterSetup'}}</button>
{{else}}
{{#if document.system.levelData.canLevelUp}}
<button class="level-button glow" data-action="levelup">{{localize 'DAGGERHEART.Sheets.PC.LevelUp'}}</button>
{{!-- <div class="levelup">{{localize 'DAGGERHEART.Sheets.PC.LevelUp'}}</div> --}}
{{else}}
{{localize 'DAGGERHEART.Sheets.PC.Level'}}
{{/if}}
<input type="text" data-dtype="Number" class="level-value" value={{document.system.levelData.level.changed}} />
{{#if (or document.system.needsCharacterSetup document.system.levelData.canLevelUp)}}
<button
class="level-button glow" data-tooltip="{{#if document.system.needsCharacterSetup}}{{localize "DAGGERHEART.Sheets.PC.CharacterSetup"}}{{else}}{{localize "DAGGERHEART.Sheets.PC.LevelUp"}}{{/if}}"
data-action="levelManagement"
>
<i class="fa-solid fa-triangle-exclamation"></i>
</button>
{{/if}}
{{localize 'DAGGERHEART.Sheets.PC.Level'}}
<input type="text" data-dtype="Number" class="level-value" value={{#if document.system.needsCharacterSetup}}0{{else}}{{document.system.levelData.level.changed}}{{/if}} {{#if document.system.needsCharacterSetup}}disabled{{/if}} />
</h3>
</div>
</div>