mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
css
This commit is contained in:
parent
a040beab13
commit
ca6dc047eb
8 changed files with 71 additions and 85 deletions
|
|
@ -106,7 +106,7 @@ Hooks.once('init', () => {
|
|||
Hooks.on('ready', () => {
|
||||
ui.resources = new CONFIG.ui.resources();
|
||||
ui.resources.render({ force: true });
|
||||
document.body.classList.toggle('theme-colorfull', game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance).dualityColorScheme === DualityRollColor.colorful.value);
|
||||
document.body.classList.toggle('theme-colorful', game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance).dualityColorScheme === DualityRollColor.colorful.value);
|
||||
});
|
||||
|
||||
Hooks.once('dicesoniceready', () => {});
|
||||
|
|
|
|||
|
|
@ -11,9 +11,7 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
|
|||
const html = await super.renderHTML();
|
||||
|
||||
if (
|
||||
this.type === 'dualityRoll' &&
|
||||
game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance).dualityColorScheme ===
|
||||
DualityRollColor.colorful.value
|
||||
this.type === 'dualityRoll'
|
||||
) {
|
||||
html.classList.add('duality');
|
||||
const dualityResult = this.system.dualityResult;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ export default class DHAppearanceSettings extends HandlebarsApplicationMixin(App
|
|||
await game.socket.emit('reload');
|
||||
foundry.utils.debouncedReload();
|
||||
} */
|
||||
document.body.classList.toggle('theme-colorfull', game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance).dualityColorScheme === DualityRollColor.colorful.value);
|
||||
document.body.classList.toggle('theme-colorful', game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance).dualityColorScheme === DualityRollColor.colorful.value);
|
||||
|
||||
this.close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,8 +59,7 @@ export default class DHDualityRoll extends foundry.abstract.TypeDataModel {
|
|||
}),
|
||||
{ nullable: true, initial: null }
|
||||
)
|
||||
}),
|
||||
forceDisplay: new fields.BooleanField({initial: false})
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -69,6 +68,7 @@ export default class DHDualityRoll extends foundry.abstract.TypeDataModel {
|
|||
}
|
||||
|
||||
get modifierTotal() {
|
||||
// return {value: 12, label: "+12"}
|
||||
const total = this.modifiers.reduce((acc, x) => acc + x.value, 0);
|
||||
return {
|
||||
value: total,
|
||||
|
|
@ -97,7 +97,7 @@ export default class DHDualityRoll extends foundry.abstract.TypeDataModel {
|
|||
|
||||
get colorful() {
|
||||
return (
|
||||
!this.forceDisplay && game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance).dualityColorScheme ===
|
||||
game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance).dualityColorScheme ===
|
||||
DualityRollColor.colorful.value
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -272,17 +272,9 @@ export default class DhpActor extends Actor {
|
|||
system: systemData,
|
||||
content: config.chatMessage.template,
|
||||
rolls: [roll]
|
||||
}),
|
||||
msg2 = new cls({
|
||||
type: config.chatMessage.type ?? 'dualityRoll',
|
||||
sound: config.chatMessage.mute ? null : CONFIG.sounds.dice,
|
||||
system: {...systemData, forceDisplay: true },
|
||||
content: config.chatMessage.template,
|
||||
rolls: [roll]
|
||||
});
|
||||
|
||||
await cls.create(msg.toObject());
|
||||
await cls.create(msg2.toObject());
|
||||
}
|
||||
return roll;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -332,6 +332,7 @@
|
|||
> .roll {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
margin-bottom: 4px;
|
||||
.dice-container {
|
||||
|
|
@ -608,19 +609,11 @@
|
|||
|
||||
.dice-result {
|
||||
.roll-damage-button,
|
||||
.damage-button {
|
||||
.damage-button,
|
||||
.duality-action {
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.dice-actions {
|
||||
margin-top: 5px;
|
||||
display: flex;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.domain-card {
|
||||
|
|
@ -675,7 +668,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.theme-colorfull {
|
||||
.theme-colorful {
|
||||
.chat-message.duality {
|
||||
border-color: black;
|
||||
padding: 8px 0 0 0;
|
||||
|
|
@ -752,9 +745,9 @@
|
|||
gap: .25rem;
|
||||
.dice {
|
||||
.dice-rolls {
|
||||
margin-bottom: 0;
|
||||
display: flex;
|
||||
gap: 0.25rem;
|
||||
margin-bottom: 0;
|
||||
li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
@ -782,6 +775,10 @@
|
|||
}
|
||||
.dice-actions {
|
||||
justify-content: space-between;
|
||||
&.duality-alone {
|
||||
justify-content: end;
|
||||
margin-top: -20px;
|
||||
}
|
||||
.duality-action {
|
||||
color: var(--color-light-1);
|
||||
text-shadow: 0 0 1px black;
|
||||
|
|
@ -795,20 +792,20 @@
|
|||
margin-left: -8px;
|
||||
flex: unset;
|
||||
}
|
||||
}
|
||||
.duality-result {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: end;
|
||||
justify-content: center;
|
||||
gap: 2px;
|
||||
color: var(--color-light-1);
|
||||
text-shadow: 0 0 1px black;
|
||||
font-weight: bold;
|
||||
background: var(--color-dark-1);
|
||||
padding: 4px 4px 0 4px;
|
||||
border-radius: 6px 0 0 0;
|
||||
margin-right: -8px;
|
||||
.duality-result {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: end;
|
||||
justify-content: center;
|
||||
gap: 2px;
|
||||
color: var(--color-light-1);
|
||||
text-shadow: 0 0 1px black;
|
||||
font-weight: bold;
|
||||
background: var(--color-dark-1);
|
||||
padding: 4px 4px 0 4px;
|
||||
border-radius: 6px 0 0 0;
|
||||
margin-right: -8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1490,6 +1490,7 @@
|
|||
.daggerheart.chat.roll .dice-tooltip .dice-rolls > .roll {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
|
@ -1630,16 +1631,10 @@
|
|||
flex: 1;
|
||||
}
|
||||
.daggerheart.chat.roll .dice-result .roll-damage-button,
|
||||
.daggerheart.chat.roll .dice-result .damage-button {
|
||||
.daggerheart.chat.roll .dice-result .damage-button,
|
||||
.daggerheart.chat.roll .dice-result .duality-action {
|
||||
margin-top: 5px;
|
||||
}
|
||||
.daggerheart.chat.roll .dice-actions {
|
||||
margin-top: 5px;
|
||||
display: flex;
|
||||
}
|
||||
.daggerheart.chat.roll .dice-actions button {
|
||||
flex: 1;
|
||||
}
|
||||
.daggerheart.chat.domain-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
@ -1682,47 +1677,47 @@
|
|||
.daggerheart.chat.domain-card img {
|
||||
width: 80px;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality {
|
||||
.theme-colorful .chat-message.duality {
|
||||
border-color: black;
|
||||
padding: 8px 0 0 0;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-header {
|
||||
.theme-colorful .chat-message.duality .message-header {
|
||||
color: var(--color-light-3);
|
||||
padding: 0 8px;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality.hope {
|
||||
.theme-colorful .chat-message.duality.hope {
|
||||
background: linear-gradient(0, rgba(165, 42, 42, 0.6) 40px, rgba(0, 0, 0, 0.6));
|
||||
}
|
||||
.theme-colorfull .chat-message.duality.fear {
|
||||
.theme-colorful .chat-message.duality.fear {
|
||||
background: linear-gradient(0, rgba(0, 0, 255, 0.6), rgba(15, 15, 97, 0.6));
|
||||
}
|
||||
.theme-colorfull .chat-message.duality.critical {
|
||||
.theme-colorful .chat-message.duality.critical {
|
||||
background: linear-gradient(0, rgba(128, 0, 128, 0.6), rgba(37, 8, 37, 0.6));
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .chat-message header {
|
||||
.theme-colorful .chat-message.duality .chat-message header {
|
||||
color: var(--color-light-3);
|
||||
}
|
||||
.theme-colorfull .chat-message.duality > * {
|
||||
.theme-colorful .chat-message.duality > * {
|
||||
padding: 0 8px;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .duality-modifiers,
|
||||
.theme-colorfull .chat-message.duality .message-content .duality-result,
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-title {
|
||||
.theme-colorful .chat-message.duality .message-content .duality-modifiers,
|
||||
.theme-colorful .chat-message.duality .message-content .duality-result,
|
||||
.theme-colorful .chat-message.duality .message-content .dice-title {
|
||||
display: flex;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .duality-modifiers {
|
||||
.theme-colorful .chat-message.duality .message-content .duality-modifiers {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .duality-modifiers .duality-modifier {
|
||||
.theme-colorful .chat-message.duality .message-content .duality-modifiers .duality-modifier {
|
||||
padding: 2px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid;
|
||||
background: var(--color-dark-6);
|
||||
font-size: 12px;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-flavor {
|
||||
.theme-colorful .chat-message.duality .message-content .dice-flavor {
|
||||
color: var(--color-light-1);
|
||||
text-shadow: 0 0 1px black;
|
||||
border-bottom: 1px solid;
|
||||
|
|
@ -1733,37 +1728,37 @@
|
|||
margin: 0 -8px 2px;
|
||||
font-weight: unset;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-result .duality-modifiers {
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result .duality-modifiers {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-result .duality-modifiers .duality-modifier {
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result .duality-modifiers .duality-modifier {
|
||||
padding: 2px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid;
|
||||
background: var(--color-dark-6);
|
||||
font-size: 12px;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-result .dice-formula,
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-result > .dice-total,
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-result .part-header {
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result .dice-formula,
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result > .dice-total,
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result .part-header {
|
||||
display: none;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-result .dice-tooltip {
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result .dice-tooltip {
|
||||
grid-template-rows: 1fr;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-result .dice-tooltip .wrapper .tooltip-part {
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result .dice-tooltip .wrapper .tooltip-part {
|
||||
display: flex;
|
||||
align-items: end;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-result .dice-tooltip .wrapper .tooltip-part .dice .dice-rolls {
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result .dice-tooltip .wrapper .tooltip-part .dice .dice-rolls {
|
||||
margin-bottom: 0;
|
||||
display: flex;
|
||||
gap: 0.25rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-result .dice-tooltip .wrapper .tooltip-part .dice .dice-rolls li {
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result .dice-tooltip .wrapper .tooltip-part .dice .dice-rolls li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
|
@ -1772,21 +1767,25 @@
|
|||
line-height: unset;
|
||||
font-weight: unset;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-result .target-section {
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result .target-section {
|
||||
margin: 4px 0;
|
||||
border: 2px solid;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-result .target-section .dice-total {
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result .target-section .dice-total {
|
||||
box-shadow: unset;
|
||||
border: unset;
|
||||
border-radius: unset;
|
||||
font-size: var(--font-size-18);
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-result .dice-actions {
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result .dice-actions {
|
||||
justify-content: space-between;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-result .dice-actions .duality-action {
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result .dice-actions.duality-alone {
|
||||
justify-content: end;
|
||||
margin-top: -20px;
|
||||
}
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result .dice-actions .duality-action {
|
||||
color: var(--color-light-1);
|
||||
text-shadow: 0 0 1px black;
|
||||
font-weight: bold;
|
||||
|
|
@ -1799,7 +1798,7 @@
|
|||
margin-left: -8px;
|
||||
flex: unset;
|
||||
}
|
||||
.theme-colorfull .chat-message.duality .message-content .dice-result .duality-result {
|
||||
.theme-colorful .chat-message.duality .message-content .dice-result .dice-actions .duality-result {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: end;
|
||||
|
|
|
|||
|
|
@ -218,14 +218,14 @@
|
|||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if damage.value}}
|
||||
<div class="dice-actions">
|
||||
<button class="duality-action" data-value="{{roll.total}}" data-damage="{{damage.value}}" data-damage-type="{{damage.type}}" {{#if damage.disabled}}disabled{{/if}}><span>{{localize "DAGGERHEART.Chat.AttackRoll.RollDamage"}}</span></button>
|
||||
<div class="duality-result">
|
||||
<div>{{roll.total}} {{#if (eq dualityResult 1)}}With Hope{{else}}{{#if (eq dualityResult 2)}}With Fear{{else}}Critical Success{{/if}}{{/if}}</div>
|
||||
</div>
|
||||
<div class="dice-actions{{#unless damage.value}} duality-alone{{/unless}}">
|
||||
{{#if damage.value}}
|
||||
<button class="duality-action" data-value="{{roll.total}}" data-damage="{{damage.value}}" data-damage-type="{{damage.type}}" {{#if damage.disabled}}disabled{{/if}}><span>{{localize "DAGGERHEART.Chat.AttackRoll.RollDamage"}}</span></button>
|
||||
{{/if}}
|
||||
<div class="duality-result">
|
||||
<div>{{roll.total}} {{#if (eq dualityResult 1)}}With Hope{{else}}{{#if (eq dualityResult 2)}}With Fear{{else}}Critical Success{{/if}}{{/if}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{!-- {{/if}} --}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue