Skip to content

Commit

Permalink
Yet more formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gausie committed Dec 4, 2023
1 parent c38146f commit 4276a0c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
8 changes: 6 additions & 2 deletions src/future.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ export function getBestAutomatedFutureSide() {
if (stored) return stored;

const page = visitUrl("place.php?whichplace=twitch");
const springbros = Number(page.match(/title='(-?\d+)' href=adventure.php\?snarfblat=581/)?.[1] ?? "0");
const boltsmann = Number(page.match(/title='(-?\d+)' href=adventure.php\?snarfblat=582/)?.[1] ?? "0");
const springbros = Number(
page.match(/title='(-?\d+)' href=adventure.php\?snarfblat=581/)?.[1] ?? "0",
);
const boltsmann = Number(
page.match(/title='(-?\d+)' href=adventure.php\?snarfblat=582/)?.[1] ?? "0",
);
const best = springbros > boltsmann ? "springbros" : "boltsmann";
sessionStorage.setItem("automatedFutureBest", best);
return best;
Expand Down
17 changes: 14 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,17 @@ export function main(command?: string) {
have($item`Spring Bros. ID badge`) && have($item`Boltsmann ID badge`),
completed: () => get("_automatedFutureManufactures") >= 11,
// eslint-disable-next-line libram/verify-constants
do: () => getBestAutomatedFutureSide() === "springbros" ? $location`Spring Bros. Solenoids` : $location`Boltsmann Bearings`,
do: () =>
getBestAutomatedFutureSide() === "springbros"
? $location`Spring Bros. Solenoids`

Check failure on line 228 in src/main.ts

View workflow job for this annotation

GitHub Actions / lint

Unrecognized enumerated value name "Spring Bros. Solenoids"
: $location`Boltsmann Bearings`,

Check failure on line 229 in src/main.ts

View workflow job for this annotation

GitHub Actions / lint

Unrecognized enumerated value name "Boltsmann Bearings"
// eslint-disable-next-line libram/verify-constants
outfit: () => ({ acc1: getBestAutomatedFutureSide() === "springbros" ? $item`Spring Bros. ID badge` : $item`Boltsmann ID badge` }),
outfit: () => ({
acc1:
getBestAutomatedFutureSide() === "springbros"
? $item`Spring Bros. ID badge`

Check failure on line 234 in src/main.ts

View workflow job for this annotation

GitHub Actions / lint

Unrecognized enumerated value name "Spring Bros. ID badge"
: $item`Boltsmann ID badge`,

Check failure on line 235 in src/main.ts

View workflow job for this annotation

GitHub Actions / lint

Unrecognized enumerated value name "Boltsmann ID badge"
}),
choices: {
1512: 1,
1513: 1,
Expand All @@ -237,7 +245,10 @@ export function main(command?: string) {
do: () => {
const turns = totalTurnsPlayed();
adv1($location`The Cave Before Time`, 0, "");
if (totalTurnsPlayed() > turns && get("lastEncounter") !== "Time Cave. Period.") {
if (
totalTurnsPlayed() > turns &&
get("lastEncounter") !== "Time Cave. Period."
) {
throw "We expected to force the NC";
}
},
Expand Down

0 comments on commit 4276a0c

Please sign in to comment.