Skip to content

Commit 117458c

Browse files
committed
milestone improvements
1 parent d8e49fd commit 117458c

2 files changed

Lines changed: 146 additions & 175 deletions

File tree

modules/visualization/lattice_interactions.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ function selectNode(node) {
55
document.getElementById('side-type').style.color = getCategoryColor(node.type);
66
let content = `<p style="line-height:1.6; font-size: 14px;">${node.data.description || 'No description available.'}</p>`;
77

8+
if (node.type === 'Milestone') {
9+
content += `<div style="margin: 15px 0; background: rgba(56, 139, 253, 0.1); border: 1px solid var(--accent-color); padding: 12px; border-radius: 8px;">
10+
<h4 style="margin-top:0; color: var(--accent-color);">Milestone Analytics</h4>
11+
<div style="margin-bottom:8px;"><strong>Gated Resources:</strong> ${Array.from(node.data.resources).map(id => nodeMap.get(id)?.name || id).join(', ')}</div>
12+
<div style="margin-bottom:8px;"><strong>Unlocks Waiting:</strong> ${node.data.gateNodes.map(id => nodeMap.get(id)?.name || id).join(', ')}</div>
13+
<div style="font-size: 1.2em; font-weight: bold; margin-top: 10px; color: var(--ability-color);">${node.data.globalCoverage}% Global Coverage</div>
14+
<div style="font-size: 10px; opacity: 0.6;">Percentage of total game automation integrated by this point.</div>
15+
</div>`;
16+
}
17+
818
if (node.simulation) {
919
if (node.simulation.sustainable) content += `<div style="margin: 10px 0; background: rgba(126, 231, 135, 0.1); border-left: 3px solid var(--ability-color); padding: 8px; border-radius: 4px;"><strong>Simulation:</strong> Sustainable</div>`;
1020
if (node.simulation.unsustainable) content += `<div style="margin: 10px 0; background: rgba(255, 123, 114, 0.1); border-left: 3px solid var(--location-color); padding: 8px; border-radius: 4px;"><strong>Simulation:</strong> Unsustainable</div>`;

0 commit comments

Comments
 (0)