Fix recruit: always available, scaling cost; log newest-first at top
recruit_neighbor was gated behind !first_meeting so it vanished after the first upgrade. Now a single repeatable recruit with scaling cost. Log scrolls to top on new entries so most recent is always visible. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
2c135d57f2
commit
d091e7382a
@@ -168,11 +168,17 @@ function renderUpgrades(state: State): void {
|
||||
}).join('');
|
||||
}
|
||||
|
||||
let lastLogLength = 0;
|
||||
|
||||
function renderLog(state: State): void {
|
||||
const log = document.getElementById('log')!;
|
||||
if (state.log.length === lastLogLength) return;
|
||||
lastLogLength = state.log.length;
|
||||
// state.log is newest-first (unshift); render as-is, scroll to top
|
||||
log.innerHTML = state.log.map(e =>
|
||||
`<div class="log-entry ${e.kind}">${e.text}</div>`
|
||||
).join('');
|
||||
log.scrollTop = 0;
|
||||
}
|
||||
|
||||
function showOverlay(state: State): void {
|
||||
|
||||
Reference in New Issue
Block a user