fix: refine mana panel layout and state display
Widen the inventory layout so the backpack column no longer crowds the paperdoll, and base mana active/inactive display on the live data currently available from inventory payloads.
This commit is contained in:
parent
4972b342d2
commit
84da2a8752
3 changed files with 14 additions and 9 deletions
|
|
@ -1139,6 +1139,7 @@ def get_mana_tracker_info(item_data: Dict[str, Any]) -> Dict[str, Any]:
|
|||
spell_ids = item_data.get("Spells", []) or []
|
||||
active_spells = item_data.get("ActiveSpells", []) or []
|
||||
active_item_enchantments = item_data.get("ActiveItemEnchantments", []) or []
|
||||
has_active_spell_context = bool(active_spells) or bool(active_item_enchantments)
|
||||
|
||||
mana_rate_of_change = None
|
||||
if "5" in double_values:
|
||||
|
|
@ -1226,10 +1227,14 @@ def get_mana_tracker_info(item_data: Dict[str, Any]) -> Dict[str, Any]:
|
|||
mana_state = "unknown"
|
||||
elif current_mana <= 0:
|
||||
mana_state = "not_active"
|
||||
elif has_inactive_spell:
|
||||
mana_state = "not_active"
|
||||
else:
|
||||
elif mana_rate_of_change is not None:
|
||||
mana_state = "active" if mana_rate_of_change < 0 else "not_active"
|
||||
elif has_active_spell_context:
|
||||
mana_state = "not_active" if has_inactive_spell else "active"
|
||||
elif actionable_spells:
|
||||
mana_state = "active"
|
||||
else:
|
||||
mana_state = "unknown"
|
||||
|
||||
seconds_per_burn = None
|
||||
if mana_rate_of_change is not None and mana_rate_of_change < 0:
|
||||
|
|
|
|||
|
|
@ -1629,7 +1629,7 @@ function showInventoryWindow(name) {
|
|||
loading.textContent = 'Loading inventory...';
|
||||
content.appendChild(loading);
|
||||
|
||||
win.style.width = '540px';
|
||||
win.style.width = '572px';
|
||||
win.style.height = '520px';
|
||||
|
||||
const invContent = document.createElement('div');
|
||||
|
|
|
|||
|
|
@ -735,7 +735,7 @@ body.noselect, body.noselect * {
|
|||
position: fixed;
|
||||
top: 100px;
|
||||
left: 400px;
|
||||
width: 548px;
|
||||
width: 572px;
|
||||
height: 520px;
|
||||
background: rgba(20, 20, 20, 0.92);
|
||||
backdrop-filter: blur(2px);
|
||||
|
|
@ -762,7 +762,7 @@ body.noselect, body.noselect * {
|
|||
display: flex;
|
||||
justify-content: flex-start;
|
||||
min-height: 264px;
|
||||
gap: 10px;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.inv-equipment-grid {
|
||||
|
|
@ -815,7 +815,7 @@ body.noselect, body.noselect * {
|
|||
gap: 2px;
|
||||
overflow: visible;
|
||||
flex-shrink: 0;
|
||||
margin-right: 2px;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.inv-burden-bar {
|
||||
|
|
@ -2432,13 +2432,13 @@ table.ts-allegiance td:first-child {
|
|||
border: 2px solid #8a7a44 !important;
|
||||
background: #0e0c08 !important;
|
||||
resize: none !important;
|
||||
width: 548px !important;
|
||||
width: 572px !important;
|
||||
min-height: 520px !important;
|
||||
}
|
||||
|
||||
.inv-top-section {
|
||||
justify-content: flex-start !important;
|
||||
gap: 10px !important;
|
||||
gap: 14px !important;
|
||||
}
|
||||
|
||||
.inv-bottom-section {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue