Skip to content

Commit

Permalink
2.11.17
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorako committed Nov 7, 2023
1 parent a99b6b9 commit 8a95a75
Show file tree
Hide file tree
Showing 24 changed files with 1,352 additions and 1,100 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# 2.11.17

- (New) Added support for Tagger.
- (Refinement) Refactored the NPC-sheet restructuring as a dorako-ux feature, meaning it works with Foundry 2 theme.
- (Refinement) Refactored the NPC-sheet styling so it is largely controlled by css variables.
- (Refinement) Re-implemented the Light/Dark Dorako themed NPC sheets using said simple variables.

# 2.11.16

- (Fix) Fixed an issue where Foundry2 theme did not get applied to ITT.

# 2.11.15

- (New) Added support for Monk's PF2e Encounter Aftermath module.
- (Fix) Fixed an issue where RK chat messages produced by ITT were illegible in Foundry2 theme.
- (Fix) Fixed an issue where RK chat messages produced by ITT were illegible in Foundry 2 theme.

# 2.11.14

Expand Down
4 changes: 4 additions & 0 deletions esmodules/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ export const baseThemeModuleApplications = ["ControlManager","HUD","ItemPileConf

// prettier-ignore
export const baseThemeApplications = [...baseThemeCoreFoundryApplications,...baseThemePf2eApplications,...baseThemeModuleApplications, ...dorakoUiApplications];

// prettier-ignore
export const foundry2RestrictedApplications = ["KingdomSheetPF2e","CreatureSheetPF2e", "CharacterSheetPF2e", "PartySheetPF2e", "NPCSheetPF2e", "VehicleSheetPF2e", "HUD"];

// prettier-ignore
export const darkThemeCompatibleApplications = [...darkThemeCompatibleCoreFoundryApplications, ...darkThemeCompatibleModuleApplications, ...darkThemeCompatiblePf2eApplications, ...dorakoUiApplications]

Expand Down
3 changes: 3 additions & 0 deletions esmodules/dorako-ux/npc-sheet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Hooks.on("renderCreatureSheetPF2e", (app, html, data) => {
html.addClass("dorako-ux");
});
24 changes: 15 additions & 9 deletions esmodules/foundry2-theme.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { baseThemeApplications, baseThemePf2eSheets, MODULE_NAME, premiumModuleSelector } from "./consts.js";
import {
foundry2RestrictedApplications,
baseThemeApplications,
baseThemePf2eSheets,
MODULE_NAME,
premiumModuleSelector,
} from "./consts.js";
import { isPremiumApplication } from "./premium-module-hooks.js";

Hooks.on("renderSvelteApplication", (app, html, data) => {
Expand Down Expand Up @@ -114,33 +120,33 @@ Hooks.on("renderTokenBar", (app, html, data) => {
html.attr("data-theme", "foundry2");
});

for (const app of [...baseThemePf2eSheets]) {
Hooks.on("render" + app, (app, html, data) => {
for (const appName of [...baseThemePf2eSheets]) {
Hooks.on("render" + appName, (app, html, data) => {
const theme = game.settings.get("pf2e-dorako-ui", "theme.application-theme");
if (theme !== "foundry2-theme") return;
if (foundry2RestrictedApplications.includes(appName)) return;
let html0 = html[0];
if (!html0.classList.contains("window-app")) return;
if (html0.classList.contains("character")) return;
console.debug(
`${MODULE_NAME} | render${app.constructor.name} | is PF2e .window-app "Application" => add .foundry2`
);
html.addClass("foundry2");
});
}

for (const app of ["CharacterSheetPF2e", "VehicleSheetPF2e", "HUD"]) {
Hooks.on("render" + app, (app, html, data) => {
for (const appName of [...foundry2RestrictedApplications]) {
Hooks.on("render" + appName, (app, html, data) => {
const theme = game.settings.get("pf2e-dorako-ui", "theme.application-theme");
if (theme !== "foundry2-theme") return;
const excludeString = game.settings.get("pf2e-dorako-ui", "customization.excluded-applications");
const excludeList = excludeString.split(/[\s,]+/);
if (excludeList.includes(app.constructor.name)) {
console.debug(
`${MODULE_NAME} | render${app.constructor.name} | is included in excluded applications string ${excludeString} => do not add .foundry2`
`${MODULE_NAME} | render${app.constructor.name} | is included in excluded applications string ${excludeString} => do not add .foundry2-restricted`
);
return;
}
console.debug(`${MODULE_NAME} | render${app.constructor.name} | theme: ${theme} => add .foundry2-pc`);
html.addClass("foundry2-pc");
console.debug(`${MODULE_NAME} | render${app.constructor.name} | theme: ${theme} => add .foundry2-restricted`);
html.addClass("foundry2-restricted");
});
}
1 change: 1 addition & 0 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"esmodules/premium-module-hooks.js",
"esmodules/consts.js",
"esmodules/dorako-ux/customization.js",
"esmodules/dorako-ux/npc-sheet.js",
"esmodules/dorako-ux/radial-condition-hud.js",
"esmodules/dorako-ux/sidebar-resizer.js"
],
Expand Down
2 changes: 1 addition & 1 deletion sass/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ $adjusted-lower: #cc3311 !default;
/* ----------------------------------------- */

.dorako-ui.dark-theme .damage,
.foundry2-pc .damage,
.foundry2-restricted .damage,
.foundry2 .damage {
--color-bg-acid: rgba(32, 194, 32, 0.125); // adjusted
--color-bg-bleed: rgba(207, 28, 58, 0.125); // adjusted
Expand Down
2 changes: 1 addition & 1 deletion sass/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
--button-background-color: var(--app-background);
--button-border-color: var(--app-border-color);
--button-text-color: var(--color-light-3);
--button-focus-outline-color: var(--color-warm-2);
--button-focus-outline-color: var(--color-warm-1);
--button-hover-background-color: var(--color-warm-2);
--button-hover-border-color: var(--color-warm-1);
--button-hover-text-color: var(--color-light-1);
Expand Down
4 changes: 2 additions & 2 deletions sass/dorako-theme/pf2e-system/_actor-sheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
}
}

.foundry2-pc {
.foundry2-restricted {
// prettier-ignore
&.actor.sheet .crb-style .sheet-body .sheet-content .tab.actions ol.actions-list li.action .item-summary,
&.actor.sheet .crb-style .sheet-body .sheet-content .tab.actions ol.actions-list li.strike .item-summary,
Expand All @@ -224,7 +224,7 @@
}
}

.foundry2-pc,
.foundry2-restricted,
.dorako-ui {
&.actor.sheet.green-theme {
--color-warm-4: var(--remaster-dark);
Expand Down
234 changes: 2 additions & 232 deletions sass/dorako-theme/pf2e-system/_npc-sheet.scss
Original file line number Diff line number Diff line change
@@ -1,33 +1,9 @@
.dorako-ui.sheet.pf2e.actor.npc {
.adjustments {
gap: 1px;
.trait {
border: 1px solid var(--tertiary);
outline: 1px solid var(--gold-brown);
}
}

ol.spell-list > li .item-name .item-image .item-icon {
border-radius: 3px;
}

form {
.sheet-body .tab {
padding-top: 2px;
}

.activity-icon {
font-weight: 100;
}

input[type="number"]:focus,
input[type="number"]:hover:not(:disabled),
input[type="text"]:focus,
input[type="text"]:hover:not(:disabled) {
border: 1px solid var(--tertiary);
box-shadow: 0 0 10px var(--primary-light);
}

input.adjustable:not(:focus).adjusted-higher,
span.adjustable.adjusted-higher {
color: green !important;
Expand All @@ -37,212 +13,7 @@
span.adjustable.adjusted-lower {
color: red !important;
}

.top-sections {
gap: 5px;
}

.side-bar-section {
@include sheet;
box-shadow: var(--gold-and-glow), 0px 5px 6px rgba(0, 0, 0, 0.5);
border-radius: 3px;
margin: 3px;
margin-top: 0px;
margin-bottom: 10px;

&.initiative select {
width: 98%;
margin-bottom: 2px;
color: var(--color-text-dark-secondary);
}

.side-bar-section-header {
align-items: center;
margin-bottom: unset;
margin-bottom: 2px;

&.disabled {
margin-bottom: unset;
}
}

&.collapsed {
.side-bar-section-header {
margin-bottom: unset;

&.disabled {
margin-bottom: unset;
}
}
}

&.collapsed {
max-height: 24px;
transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);

.side-bar-section-header {
border-radius: 3px;
}

&:not(.empty):hover {
max-height: 1000px;
transition: max-height 1s ease-in-out;

.side-bar-section-header {
border-radius: 3px 3px 0px 0px;
}

.side-bar-section-content {
display: block;
}
}

.side-bar-section-content {
display: none;
}
}
}

.section-container {
box-shadow: var(--gold-and-glow), 0px 5px 6px rgba(0, 0, 0, 0.5);
padding: 0px;
border-radius: 3px;
margin: 3px;
margin-top: 0px;
margin-bottom: 10px;
background-color: var(--bg);
background-image: var(--sheet);
background-size: cover;

.section-header {
box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.5);
background: var(--primary);
border-color: var(--primary);
}

&:not(.headerless) .section-body {
border-top: 1px solid var(--tertiary);
}

.section-body {
border: none;
padding: 0;
padding: 5px;
}

&.toggles {
border-image-repeat: repeat;
border-image-slice: 11;
border-image-source: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33' height='33' overflow='scroll'%3E%3Cstyle%3E.st1{stroke:gray;stroke-miterlimit:10}.st1,.st2{fill:none}%3C/style%3E%3Cg opacity='1'%3E%3Cpath class='st1' d='M.5 20v-7'/%3E%3Cpath class='st2' d='M13 20v-7'/%3E%3Cpath class='st1' d='M13 .5h7'/%3E%3Cpath class='st2' d='M13 13h7'/%3E%3Cpath class='st1' d='M32.5 13v7'/%3E%3Cpath class='st2' d='M20 13v7'/%3E%3Cpath class='st1' d='M20 32.5h-7'/%3E%3Cpath class='st2' d='M20 20h-7'/%3E%3Cpath class='st1' d='M.5.5h3.1v3.1H.5zm3.1 3.1h3.1v3.1H3.6zm3.2 0h3.1v3.1H6.8zM3.6 6.8h3.1v3.1H3.6zm0 0H.5V13M13 .5H6.8v3.1M29.4.5h3.1v3.1h-3.1zm-3.1 3.1h3.1v3.1h-3.1zm0 3.2h3.1v3.1h-3.1zm-3.2-3.2h3.1v3.1h-3.1zm3.2 0V.5H20M32.5 13V6.8h-3.1M29.4 29.4h3.1v3.1h-3.1z'/%3E%3Cpath class='st1' d='M26.3 26.3h3.1v3.1h-3.1zm-3.2 0h3.1v3.1h-3.1zm3.2-3.2h3.1v3.1h-3.1z'/%3E%3Cpath class='st1' d='M29.4 26.3h3.1V20M20 32.5h6.3v-3.1'/%3E%3Cg%3E%3Cpath class='st1' d='M.5 29.4h3.1v3.1H.5zm3.1-3.1h3.1v3.1H3.6zm0-3.2h3.1v3.1H3.6zm3.2 3.2h3.1v3.1H6.8zM6.8 29.4v3.1H13M.5 20v6.3h3.1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
border-image-width: 14px;
border-style: double;
padding-left: 8px;
padding-right: 8px;
margin-left: 0px;
font-weight: 500;
margin-right: 0px;
margin-top: 0px;
margin-bottom: 0px;
box-shadow: none;
background: none;
margin: 5px;
}
}

.sidebar {
.image-container {
border: none;
}

.saves-section.side-bar-section {
display: flex;
flex-direction: column;

&.collapsed {
max-height: 52px;
&:hover {
max-height: 1000px;
}
}
}

.saves {
margin-top: 4px;
width: unset;
}

.save-details {
font-size: 14px;
}
}
}

.side-bar-section-header {
background: var(--primary);
border: 1px solid var(--primary);
border-radius: 3px 3px 0px 0px;
color: #f5efe0;
box-shadow: inset 0 0 3px rgb(255 255 255 / 50%);
margin-top: 0px;
height: 24px;

&.disabled {
border-radius: 3px;
}

+ .side-bar-section-content {
margin: 0px;
padding: 0px;
}

input[type="number"],
input[type="text"] {
color: #f5efe0;
}

a:hover {
text-shadow: 0px 0px 8px var(--tertiary);
}

.inventory-section {
.inventory-list .item .item-image {
border: none;
margin: 3px 4px 3px 6px;
box-shadow: 0 0 0 1px var(--tertiary), 0 0 0 2px #9f725b, inset 0 0 4px rgba(0, 0, 0, 0.5);
}
}

.side-bar .image-container,
.actions-options .actions-option {
cursor: pointer;
}

.actions-options .actions-option:hover {
text-shadow: 0 0 10px var(--primary-light);
color: var(--primary);
}
}

.recall-knowledge .section-body {
button {
background: var(--secondary);
box-shadow: inset 0 0 0 1px rgb(0 0 0 / 30%), inset 0 0 0 2px hsl(0deg 0% 100% / 20%);
border: none;
color: white;
transition: background 0.15s ease-in-out;
margin-top: 3px;

&:hover {
background: var(--secondary-light);
}
}
}
}

.pf2e.actor.npc.dorako-ui.npc .side-bar-section-content {
width: 98%;
margin-left: 3px;
margin-right: 3px;
}

/* Glassy */
Expand Down Expand Up @@ -334,9 +105,9 @@
/* Light */

.dorako-ui.sheet.pf2e.actor.npc.light-theme form .sheet-tabs {
background-color: var(--bg);
background-color: #f8f4f1;
box-shadow: 0 2px 4px rgb(0 0 0 / 18%);
border: 1px solid var(--color-border-light-primary);
border: 1px solid #b5b3a4;
border-radius: 3px;
margin: 2px;
margin-bottom: 0px;
Expand Down Expand Up @@ -411,7 +182,6 @@
background-color: #111;
background: var(--sheet-dark);
background-size: cover;
// box-shadow: 0 0 10vw var(--color-shadow-dark) inset;
}

.sheet.pf2e.actor.npc.dark-theme .tags .tag option.tag_transparent,
Expand Down
Loading

0 comments on commit 8a95a75

Please sign in to comment.