From b66e65e2e2a071eb29089a3ce2579a4e2b9504b4 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 15 Oct 2026 09:34:35 +0000 Subject: [PATCH 1/3] Mark a business as shut down, apart from owned Biker businesses and the Bunker get a "Shut down" checkbox in their settings. While shut down a business makes no stock and uses no supplies, its nightclub goods count as locked, and it adds nothing to the Money Fronts safe. Data version 10 (no-op migration: the flag is optional). Decision 020. Closes #38 Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 1 + docs/decisions/015-nightclub-warehouse.md | 2 +- docs/decisions/018-money-fronts.md | 5 ++- docs/decisions/020-shut-down.md | 26 +++++++++++++++ docs/decisions/README.md | 1 + src/components/BusinessProduction.svelte | 15 +++++++-- src/components/Businesses.svelte | 13 +++++++- src/components/MoneyFrontsCard.svelte | 4 +-- src/components/NightclubWarehouse.svelte | 2 +- src/components/PropertySettings.svelte | 17 ++++++++-- src/data/properties.ts | 15 ++++++++- src/lib/fronts.test.ts | 7 +++- src/lib/fronts.ts | 9 +++-- src/lib/nightclub.test.ts | 11 ++++++- src/lib/nightclub.ts | 6 ++-- src/lib/production.test.ts | 9 ++++- src/lib/production.ts | 7 ++-- src/lib/properties.test.ts | 40 +++++++++++++++++++++++ src/lib/properties.ts | 26 +++++++++++++++ src/lib/state.test.ts | 40 ++++++++++++++++++----- src/lib/state.ts | 7 ++-- 21 files changed, 227 insertions(+), 36 deletions(-) create mode 100644 docs/decisions/020-shut-down.md diff --git a/CLAUDE.md b/CLAUDE.md index 3673ee7..0210bfb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -27,6 +27,7 @@ Svelte 5 + TypeScript + Vite. Public repository. | Acid Lab, production boost | `data/production.ts`, `lib/production.ts` (017) | | Money Fronts safe and heat | `data/fronts.ts`, `lib/fronts.ts` (018) | | Value bonus for owning a front | `ownedBonus` in `data/production.ts` (019) | +| Shut-down businesses (owned, not running) | `isRunning` in `lib/properties.ts` (020) | | Theme tokens | `src/app.css` (decision 009) | | CI, templates | `.github/` | | Skills: `handoff`, `finish-pr`; agent: `scout` | `.claude/` | diff --git a/docs/decisions/015-nightclub-warehouse.md b/docs/decisions/015-nightclub-warehouse.md index 5e0f600..5b9d70c 100644 --- a/docs/decisions/015-nightclub-warehouse.md +++ b/docs/decisions/015-nightclub-warehouse.md @@ -15,7 +15,7 @@ - **Only ownership is needed.** The source says technicians need no supplies, so goods do not depend on the linked business's stock or supplies. Goods whose business is not owned do not run and the card says "Locked". Two technicians on one type count once (the game allows one). - A shut-down business locks its goods too; marking one shut down is issue #38. + A shut-down business locks its goods too (decision 020). - **Saved state** (version 6): `nightclub` maps a goods id to crates, fractions included. Crates, not percent, so changing the floors keeps the count the game shows. Stock above the capacity (fewer floors set) stays until changed. diff --git a/docs/decisions/018-money-fronts.md b/docs/decisions/018-money-fronts.md index 2d8f2dd..00e3960 100644 --- a/docs/decisions/018-money-fronts.md +++ b/docs/decisions/018-money-fronts.md @@ -16,9 +16,8 @@ - **Payout** (`src/data/fronts.ts`), every in-game day (48 minutes of play time), up to $100,000: $750 per front ($1,500 after 15 laundering missions) plus a fixed amount for each other business owned, from the in-game safe screen (data comment has the sources). A front at - 100% heat pays nothing; the Car Wash at 100% stops the whole safe. LSOS counts every owned - business; the game skips biker businesses and the Bunker while shut down or not set up, which - the card says (shutting down: issue #38). + 100% heat pays nothing; the Car Wash at 100% stops the whole safe. A shut-down business + adds nothing (decision 020); one bought but not set up still counts in LSOS. - **Heat** per front, saved with the safe (`heat` by front id, data version 9). At the end of each day, after the payout, every front below 100% gains 10%, one less per other front below 100% (8% with all three). A laundering mission or Mr. Faber job adds 10% to the front it was diff --git a/docs/decisions/020-shut-down.md b/docs/decisions/020-shut-down.md new file mode 100644 index 0000000..2e9de6d --- /dev/null +++ b/docs/decisions/020-shut-down.md @@ -0,0 +1,26 @@ +# 020: Shut-down businesses + +2026-10-15, issue #38. Builds on decisions 011, 012, 015 and 018. + +## Decision + +- **A flag apart from owned:** `shutDown` in a property's saved settings, next to `owned` and + the upgrades (data version 10). Absent means running, so older entries need no change. Owning + or selling keeps it, like the upgrades. +- **Only businesses the game can shut down** get the "Shut down" checkbox (`canShutDown` in + `src/data/properties.ts`): the five biker businesses and the Bunker, the ones decision 018 + names. The Acid Lab is left out: no source says it can be shut down. +- **Shut down means "not running" everywhere** (`isRunning` in `lib/properties.ts`): + - production (decision 012) makes no stock and uses no supplies; the card shows the bars and + value as they are, says "Shut down", and hides the countdowns and the boost; + - nightclub goods (decision 015) whose only unlocking business is shut down count as locked, + so the Locked note and the best-setup suggestion follow; + - the Money Fronts safe (decision 018) gets nothing from it. +- **Not modelled:** whether a nightclub technician must be reassigned after the business starts + again. LSOS keeps the assignment and resumes counting. + +## Why + +Marking a shut-down business "Not owned" hid its stock and lost the card. The flag keeps both. +gta.wiki does not describe shutting down from the laptop (checked 2026-10-15); the nightclub +and Money Fronts rules rest on the sources in decisions 015 and 018 and the issue. diff --git a/docs/decisions/README.md b/docs/decisions/README.md index 06c64ca..3152f2f 100644 --- a/docs/decisions/README.md +++ b/docs/decisions/README.md @@ -30,3 +30,4 @@ free number, add one line below. **Replacing one:** write a new decision, then m - [017](017-production-boost.md) Acid Lab: optional far sale, value bonus (named product), no raids; production boost by units made or 24 real hours, once a day - [018](018-money-fronts.md) Money Fronts: one Car Wash safe card on the Safes tab, paid by the fronts and other businesses, heat per front (est.), missions and legal jobs - [019](019-owned-value-bonus.md) Money Front value bonus: owning Car Wash or Smoke on the Water adds 35% to Counterfeit Cash or Weed, far value adds the bonuses (est.), Helitours left out +- [020](020-shut-down.md) Shut-down businesses: a flag apart from owned for biker businesses and the Bunker; no production, nightclub goods locked, nothing to the Money Fronts safe diff --git a/src/components/BusinessProduction.svelte b/src/components/BusinessProduction.svelte index a269662..0b4f002 100644 --- a/src/components/BusinessProduction.svelte +++ b/src/components/BusinessProduction.svelte @@ -27,6 +27,8 @@ rate: ProductionRate | undefined /** The same rate if it can run on its own (its supply use is known). */ running: KnownRate | undefined + /** Shut down from its laptop: nothing is made or used until it runs again (issue #38). */ + shutDown?: boolean bars: Bars /** Wall-clock time, for supply deliveries. */ now: number @@ -47,6 +49,7 @@ production, rate, running, + shutDown = false, bars, now, editing, @@ -71,7 +74,9 @@ const boosting = $derived(boostRunning(boost, production.boost, now)) const nextBoost = $derived(production.boost ? nextBoostAt(boost, production.boost) : 0) const ahead = $derived( - running ? forecast(current, production, running, boosting ? boost!.unitsLeft : 0) : null, + running && !shutDown + ? forecast(current, production, running, boosting ? boost!.unitsLeft : 0) + : null, ) const percent = (value: number) => formatValue(value, 'percent') // Numbers resting on estimated rates say so (decision 013). The value also counts units made @@ -115,7 +120,7 @@ {/if} -{#if production.boost && running?.boostedMinutesPerUnit !== undefined} +{#if production.boost && running?.boostedMinutesPerUnit !== undefined && !shutDown}
{#if boosting} @@ -137,7 +142,11 @@ {/if} {/if} -{#if ahead} +{#if shutDown} +

+ Shut down. No stock is made and no supplies are used until you start it again. +

+{:else if ahead} {#if ahead.fullInMs !== null} { const value = upgradeValue(owned, property.id, upgrade) if (upgrade.kind === 'toggle') return value === true ? [upgrade.label] : [] @@ -251,6 +261,7 @@ {production} rate={matchingRate(production, owned, property)} running={rateFor(production, owned, property)} + shutDown={isShutDown(owned, property.id)} bars={businesses[property.id] ?? emptyBars()} {now} editing={editing === property.id} diff --git a/src/components/MoneyFrontsCard.svelte b/src/components/MoneyFrontsCard.svelte index 900e2a3..71858ec 100644 --- a/src/components/MoneyFrontsCard.svelte +++ b/src/components/MoneyFrontsCard.svelte @@ -131,8 +131,8 @@ {money(parts.fronts + parts.others)} a day

- Fronts {money(parts.fronts)} + your other businesses {money(parts.others)}. Biker businesses and - the Bunker only count while set up and not shut down. + Fronts {money(parts.fronts)} + your other businesses {money(parts.others)}. A shut-down business + adds nothing.

diff --git a/src/components/NightclubWarehouse.svelte b/src/components/NightclubWarehouse.svelte index d0a4a6d..1683bfc 100644 --- a/src/components/NightclubWarehouse.svelte +++ b/src/components/NightclubWarehouse.svelte @@ -160,7 +160,7 @@

Locked. {locked.map((g) => g.label).join(', ')}: own the business that makes - {locked.length === 1 ? 'it' : 'them'} to start production. + {locked.length === 1 ? 'it' : 'them'}, and keep it running, to start production.

{/if} {#if setup.doubled} diff --git a/src/components/PropertySettings.svelte b/src/components/PropertySettings.svelte index e4d2ac5..c86dfb0 100644 --- a/src/components/PropertySettings.svelte +++ b/src/components/PropertySettings.svelte @@ -1,11 +1,13 @@ - {#each catalog as property (property.id)} - - {:else} -

No properties yet. They appear here as their trackers are built.

- {/each} +
+ {#each catalog as property (property.id)} + + {:else} +

No properties yet. They appear here as their trackers are built.

+ {/each} +

Trackers show only what you own. Upgrades change how fast they count.

diff --git a/src/components/Businesses.svelte b/src/components/Businesses.svelte index 3ad2154..fb49100 100644 --- a/src/components/Businesses.svelte +++ b/src/components/Businesses.svelte @@ -321,10 +321,9 @@ outline-offset: -1px; } - /* A shut-down business is greyed out but stays readable (issue #38). */ + /* A shut-down business is dimmed like a disabled control: same colours, darker (issue #38). */ .lift.shut { - filter: grayscale(1); - opacity: 0.75; + filter: brightness(0.65); } .lift.lifted {