Compare commits
1 Commits
q/16-17761
...
queue/16-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d016a0e404 |
@@ -37,12 +37,6 @@ function renderStrategy() {
|
||||
function renderAlignment() {
|
||||
const container = document.getElementById('alignment-ui');
|
||||
if (!container) return;
|
||||
|
||||
if (G.dismantleTriggered && !G.dismantleActive && !G.dismantleComplete && typeof Dismantle !== 'undefined' && Dismantle.triggered) {
|
||||
Dismantle.renderChoice();
|
||||
return;
|
||||
}
|
||||
|
||||
if (G.pendingAlignment) {
|
||||
container.innerHTML = `
|
||||
<div style="background:#1a0808;border:1px solid #f44336;padding:10px;border-radius:4px;margin-top:8px">
|
||||
|
||||
@@ -209,7 +209,6 @@ this.__exports = {
|
||||
G,
|
||||
Dismantle,
|
||||
tick,
|
||||
renderAlignment: typeof renderAlignment === 'function' ? renderAlignment : null,
|
||||
saveGame: typeof saveGame === 'function' ? saveGame : null,
|
||||
loadGame: typeof loadGame === 'function' ? loadGame : null
|
||||
};`, context);
|
||||
@@ -243,25 +242,6 @@ test('tick offers the Unbuilding instead of ending the game immediately', () =>
|
||||
assert.match(document.getElementById('alignment-ui').innerHTML, /THE UNBUILDING/);
|
||||
});
|
||||
|
||||
test('renderAlignment does not wipe the Unbuilding prompt after it is offered', () => {
|
||||
const { G, tick, renderAlignment, document } = loadBeacon({ includeRender: true });
|
||||
|
||||
G.totalCode = 1_000_000_000;
|
||||
G.totalRescues = 100_000;
|
||||
G.phase = 6;
|
||||
G.pactFlag = 1;
|
||||
G.harmony = 60;
|
||||
G.beaconEnding = false;
|
||||
G.running = true;
|
||||
G.activeProjects = [];
|
||||
G.completedProjects = [];
|
||||
|
||||
tick();
|
||||
renderAlignment();
|
||||
|
||||
assert.match(document.getElementById('alignment-ui').innerHTML, /THE UNBUILDING/);
|
||||
});
|
||||
|
||||
test('deferring the Unbuilding clears the prompt and allows it to return later', () => {
|
||||
const { G, Dismantle, document } = loadBeacon();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user