fix: force burden meter visibility

This commit is contained in:
Erik 2026-03-13 11:26:35 +01:00
parent a17b1fc11e
commit c3f5450e0d
2 changed files with 12 additions and 1 deletions

View file

@ -1386,9 +1386,18 @@ function renderInventoryState(state) {
state.burdenLabel.title = burdenUnits > 0 && encumbranceCapacity > 0
? `${burdenUnits}/${encumbranceCapacity}`
: '';
state.burdenLabel.style.color = '#ffffff';
state.burdenLabel.style.zIndex = '3';
state.burdenFill.style.height = `${Math.min(100, burdenPct / 2)}%`;
state.burdenFill.style.minHeight = burdenPct > 0 ? '2px' : '0';
state.burdenFill.className = 'inv-burden-fill';
state.burdenFill.style.background = burdenPct > 150
? '#b7432c'
: burdenPct > 100
? '#d8a431'
: '#2e8b57';
state.burdenFill.style.opacity = '1';
state.burdenFill.style.borderTop = '1px solid rgba(255,255,255,0.18)';
if (burdenPct > 150) {
state.burdenFill.classList.add('is-danger');
} else if (burdenPct > 100) {