mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-17 20:51:19 -08:00
Remove the legacy plan2code-loop CLI
AI Assisted
This commit is contained in:
1 parent
d7abcd2ac6
commit
c8d12a3d99
89 files changed
+449
-3189
No files matched your search
@@ -580,13 +580,29 @@ function startLoop() {
|
||||
if (g.state !== "running") {
|
||||
hushTones();
|
||||
looping = false;
|
||||
return paintOverlay();
|
||||
paintOverlay();
|
||||
return overLoop(g, mine);
|
||||
}
|
||||
tickSource(frame);
|
||||
};
|
||||
tickSource(frame);
|
||||
}
|
||||
|
||||
// A game whose end screen moves (`animating`: Ghoul Rush's "G A M E - O V E R")
|
||||
// keeps being ticked and painted, with no countdown, until the screen is left.
|
||||
function overLoop(g, mine) {
|
||||
if (!g.animating) return;
|
||||
let last = null;
|
||||
const frame = (now) => {
|
||||
if (mine !== gen || looping || !$("activities-modal").open || g !== game() || g.state === "running" || !g.animating) return;
|
||||
const t = typeof now === "number" ? now : performance.now();
|
||||
if (last !== null) g.tick(Math.min(Math.max(0, t - last), MAX_FRAME_MS));
|
||||
last = t;
|
||||
tickSource(frame);
|
||||
};
|
||||
tickSource(frame);
|
||||
}
|
||||
|
||||
// After anything the person does: the timer follows the game's state.
|
||||
function follow() {
|
||||
const g = game();
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
loopDriving,
|
||||
} from "../selectors.js";
|
||||
import { hooks, page, redraw, saveNow } from "../state.js";
|
||||
import { el, approvalTip, mdInto, releasesLink, copyButton, lightDismiss } from "../render.js";
|
||||
import { el, approvalTip, mdInto, releasesLink, copyButton, lightDismiss, SVG_NS } from "../render.js";
|
||||
import { needsRoleNudge, ROLE_NOT_SET } from "../starters.js";
|
||||
import { looks, saveLooks } from "../looks.js";
|
||||
import { RED_BANNER, RED_BANNER_IN_APP } from "../meter.js";
|
||||
@@ -688,7 +688,18 @@ function dashCard(entry, menu) {
|
||||
head.appendChild(el("span", "dash-chip", entry.chip));
|
||||
if (presentation.recommended) head.appendChild(el("span", "pill suggested", "Suggested"));
|
||||
b.appendChild(head);
|
||||
b.appendChild(el("span", "dash-card-title", entry.title));
|
||||
const title = el("span", "dash-card-title");
|
||||
if (entry.icon) {
|
||||
const svg = document.createElementNS(SVG_NS, "svg");
|
||||
svg.setAttribute("class", "dash-card-icon");
|
||||
svg.setAttribute("aria-hidden", "true");
|
||||
const use = document.createElementNS(SVG_NS, "use");
|
||||
use.setAttribute("href", "#ci-" + entry.icon);
|
||||
svg.appendChild(use);
|
||||
title.appendChild(svg);
|
||||
}
|
||||
title.appendChild(document.createTextNode(entry.title));
|
||||
b.appendChild(title);
|
||||
b.appendChild(el("span", "dash-card-blurb", entry.blurb));
|
||||
if (presentation.detail) b.appendChild(el("span", "dash-card-detail", presentation.detail));
|
||||
if (!presentation.on && presentation.reason) b.appendChild(el("span", "dash-card-off", presentation.reason));
|
||||
|
||||
@@ -254,7 +254,17 @@ function buildHelp() {
|
||||
const list = el("ul");
|
||||
for (const e of SKILL_CATALOG.filter((x) => x.group === g.id)) {
|
||||
const li = el("li");
|
||||
li.appendChild(el("strong", null, e.title + "."));
|
||||
const strong = el("strong", null, e.title + ".");
|
||||
if (e.icon) {
|
||||
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
||||
svg.setAttribute("class", "help-card-icon");
|
||||
svg.setAttribute("aria-hidden", "true");
|
||||
const use = document.createElementNS("http://www.w3.org/2000/svg", "use");
|
||||
use.setAttribute("href", "#ci-" + e.icon);
|
||||
svg.appendChild(use);
|
||||
strong.prepend(svg);
|
||||
}
|
||||
li.appendChild(strong);
|
||||
li.appendChild(document.createTextNode(" " + (e.help || e.blurb)));
|
||||
list.appendChild(li);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user