Fix dark mode issue, update armament upgrade text, fix tab order, make drops clearer

This commit is contained in:
Alex Rinehart
2026-03-03 18:53:49 -08:00
parent 01d2d01dba
commit f8cea4928b
2 changed files with 88 additions and 6 deletions
+67
View File
@@ -1229,6 +1229,12 @@ z-index: -1;
color: white;
}
/* Hide Briny Bastards and Cyberrats in Space checkboxes on campaign tracker page */
.tabstoggle[value="campaignsheet"] ~ section span.briny-setting,
.tabstoggle[value="campaignsheet"] ~ section span.space-setting {
display: none;
}
/* Tab switching for base sub sheets (e.g. submarine) */
@@ -2748,6 +2754,67 @@ body.sheet-darkmode .threatlabel::before {
height: 20px;
left: calc((50% - 1em) - 2px);
position: absolute;
}
/* Dark Mode - Mech Section Fixes */
/* Fix labels in mech abilities section */
body.sheet-darkmode .mech-ability-section label {
color: var(--colorLight) !important;
background: transparent;
}
/* Fix disabled M-Shop textarea - better visibility when disabled */
body.sheet-darkmode .mech-ability-section:has(input[type="checkbox"]:not(:checked)) textarea {
opacity: 0.7;
background-color: color-mix(in srgb, var(--backgroundDarkOffset) 80%, var(--gentleOrange) 20%) !important;
color: var(--colorLight) !important;
border-color: var(--gentleOrange) !important;
}
/* Fix subsystems labels and section */
body.sheet-darkmode .subsystems h3,
body.sheet-darkmode .subsystems label {
color: var(--colorLight) !important;
}
body.sheet-darkmode span.subspan label {
color: var(--colorLight) !important;
background: transparent;
}
/* Fix munitions labels and section */
body.sheet-darkmode h3:contains("Munitions"),
body.sheet-darkmode .Munholder label,
body.sheet-darkmode .repeating_Muns label {
color: var(--colorLight) !important;
}
/* Fix armaments labels */
body.sheet-darkmode h3:contains("Armaments"),
body.sheet-darkmode .repeating_arm label,
body.sheet-darkmode .armament-checkboxes label {
color: var(--colorLight) !important;
}
/* Fix "equipped" text and counters */
body.sheet-darkmode span:contains("equipped"),
body.sheet-darkmode span:contains("You've equipped") {
color: var(--colorLight) !important;
}
/* Fix general mech section labels and text */
body.sheet-darkmode .mech label,
body.sheet-darkmode .mechStuff label,
body.sheet-darkmode .perks label {
color: var(--colorLight) !important;
background: transparent;
}
/* Fix mech section headers */
body.sheet-darkmode .mech h3,
body.sheet-darkmode .mechStuff h3,
body.sheet-darkmode .perks h3 {
color: var(--colorLight) !important;
width: 20px;
z-index: 9;
margin-left: 6px;
+21 -6
View File
@@ -507,6 +507,9 @@
</span>
<span class="hidden rangetext" name="attr_rangetext" value=""></span>
<textarea class="maxwidth" spellcheck="false" name="attr_weapontext">Description and upgrades</textarea>
<div class="upgrade-info" style="font-size: 0.8em; color: #666; margin-top: 2px;">
<span name="attr_upgrades"></span> upgrades, blows a fuse if second-highest die is <span name="attr_upgrades_plus_one"></span> or less.
</div>
</div>
<hr class="armament-divider">
</fieldset>
@@ -575,14 +578,14 @@
<button type="roll" name="roll_mun" value="&{template:powers} {{harm=@{munHarm}}} {{title=Munition}} {{name=@{character_name}}} {{fuel=Diesel}} {{description=@{muntext}}} {{cost=@{muncost}}} {{powerName=@{munname}}}"></button>
<input class="munname" spellcheck="false" type="text" name="attr_munname" value="Name">
</div>
<span class="right">
<label class="inline">Diesel Cost</label>
<input class="cost" type="text" name="attr_muncost" value="">
</span>
<span class="right">
<label class="inline">Harm</label>
<input class="cost" type="number" name="attr_munHarm" value="">
</span>
<span class="right">
<label class="inline">Diesel Cost</label>
<input class="cost" type="text" name="attr_muncost" value="">
</span>
<textarea class="maxwidth" spellcheck="false" name="attr_muntext"></textarea>
</fieldset>
<!-- Armaments -->
@@ -620,6 +623,9 @@
<input type="checkbox" value="true" name="attr_farrange"></input>
</span>
<textarea class="maxwidth" spellcheck="false" name="attr_weapontext">Description and upgrades</textarea>
<div class="upgrade-info" style="font-size: 0.8em; color: #666; margin-top: 2px;">
<span name="attr_upgrades"></span> upgrades, blows a fuse if second-highest die is <span name="attr_upgrades_plus_one"></span> or less.
</div>
</div>
<hr class="armament-divider">
</fieldset>
@@ -1493,7 +1499,7 @@
<section class="drops">
<div class="sectiontop">
<h2 class="enemyheader">Generate Drops</h2>
<h2 class="enemyheader">Generate Drops (Cyberrats base game)</h2>
<span class="adj">
<label class="narrow" for="attr_bonusDrops">Adjustment to rolls</label>
<input type="number" name="attr_bonusDrops" value="0">
@@ -1880,7 +1886,7 @@
<section class="drops">
<div class="sectiontop">
<h2 class="enemyheader">Generate Drops</h2>
<h2 class="enemyheader">Generate Drops (Cyberrats in Space)</h2>
<span class="adj">
<label class="narrow" for="attr_bonusDrops">Adjustment to rolls</label>
<input type="number" name="attr_bonusDrops" value="0">
@@ -3597,6 +3603,15 @@ on("change:repeating_arm:equipped", function(eventInfo) {
});
});
on("change:repeating_arm:upgrades", function(eventInfo) {
const upgrades = parseInt(eventInfo.newValue) || 0;
const upgradesPlusOne = upgrades + 1;
setAttrs({
[`${eventInfo.sourceAttribute.replace("upgrades", "upgrades_plus_one")}`]: upgradesPlusOne
});
});
on("change:buildingnameroom1 change:buildingnameroom2 change:buildingnameroom3 change:buildingnameroom4 change:buildingnameroom5 change:buildingnameroom6 change:buildingnameroom7 change:buildingnameroom8 change:buildingnameroom9 change:buildingnameroom10 change:buildingnameroom11 change:buildingnameroom12 change:buildingnameroom13 change:buildingnameroom14 change:buildingnameroom15 change:buildingnameroom16 ", function(eventInfo){
const roomNumber = eventInfo.sourceAttribute.match(/\d+/).shift(); // regex to grab the number from a string. Relies on naming scheme.
const room = eventInfo.newValue;