Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Svelte 5 + TypeScript + Vite. Public repository.
| Shut-down businesses (owned, not running) | `isRunning` in `lib/properties.ts` (020) |
| Bunker staff on manufacturing/both/research | `staffSplit` in `data/production.ts` (025) |
| Real-time timers: Lucky Wheel, Mansion boost | `data/timers.ts`, `lib/timers.ts` (022) |
| Weekly events and the Weekly tab | `data/weekly.ts`, `lib/weekly.ts` (decision 027) |
| Overview tab, next events, notifications | `lib/events.ts`, `lib/overview.ts` (dec. 023) |
| Theme tokens | `src/app.css` (decision 009) |
| Link previews (Open Graph), preview image | `index.html`, `scripts/og-image.html` |
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ emptying.
collected, spun), and get optional alerts as pop-ups or browser notifications.
- **Resync anytime.** When an estimate drifts from what the game shows, click the value and type
the real one.
- **Weekly events** (bonuses, discounts) come from a data file in this repo that's updated weekly.
- **Weekly events** (bonuses, discounts, rotations) come from a data file in this repo that's updated
weekly, copied from gta.wiki. They're on the Weekly tab.

Targets the current-gen edition (PC Enhanced, PS5, Xbox Series X|S).

Expand Down
69 changes: 69 additions & 0 deletions docs/decisions/027-weekly-contents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 027: Weekly events: one typed file per week, its contents, week and source

2026-10-15, issue #16 (format) and #17 (routine). Builds on decision 005.

## Decision

- **One typed TypeScript file, not JSON.** The week is `WEEK` in `src/data/weekly.ts`, typed by
`Week` in `src/lib/weekly.ts`, and bundled with the site. The type checker is the schema, and
a unit test runs `weekProblems` on it (dates in order, factors above 1, discounts 1 to 100%,
known property ids, a gta.wiki source), so `npm run verify` and CI reject a bad week before it
merges. No fetch, loading state or runtime validator. This replaces the `public/weekly.json`
of issue #16; decision 005 (a committed file, updated by pull request) still holds. Most
entries are plain strings, copied as the wiki words them; only what the UI sorts or groups
by has fields (a multiplier's factor and property, a discount's kind and percent).
- **Contents**, per week:
- **Money multipliers**: activity, factor (2x, 3x, ...), what it pays (GTA$, RP or both).
- **Weekly Challenge**: the objective and its reward.
- **Rotations**: Salvage Yard robbery vehicles, FIB Priority File, Kortz Center paintings,
Lucky Wheel podium vehicle, Prize Ride (vehicle and condition), LS Car Meet Test Rides,
Luxury Autos and Premium Deluxe Motorsport showrooms, Gun Van weapon stock, Premium Race,
Time Trial, HSW Time Trial and HSW Premium Test Ride.
- **Discounts**: vehicles, properties and Gun Van weapons, each with its percentage (free = 100).
- **Gifts and one-off bonuses**: free items, and rewards for doing something this week
(e.g. "complete X, get GTA$500,000 within 72 hours"), with any deadline.
- **Still running**: seasonal activities carried over from earlier weeks without a bonus
this week (e.g. Ghosts Exposed, Phantom Car), names only. Shown below the week's events,
more out of the way, in a collapsed "Also running" list.
- **Week**: start and end as exact UTC instants, plus the source link.
- **Left out:**
- **GTA+**: no member-only multipliers, discounts or monthly benefits. Where an entry has a
separate GTA+ value (e.g. "3x, 6x for GTA+"), only the standard value is kept.
- **Daily, map-bound rotations**: the Gun Van's location, and the daily Junk Energy and RC
Time Trials. They change every day and only make sense on a map, which LSOS does not have.
The Gun Van's weekly stock and discounts stay (they are not tied to a place).
- **Shown on the Weekly tab only**: a header with the week's dates, a status pill (live with
time left, or out of date) and the source links; bonus payouts (factor badge, activity, what
it pays) next to the Weekly Challenge and gifts; the rotation and the discounts (by vehicles,
properties and Gun Van, then by percentage) as labelled blocks of chips; then a collapsed
"Also running" list. The panels keep a fixed order: unlike the business cards, there is
nothing to compare between them.
- **No Breaking News bar.** Issue #16 asked for a ticker on every tab; it was built and taken
out again before merging: more distracting than helpful. A multiplier names its `property` id when it pays through one (e.g. bounties
through the Bail Office), so owners see it first.
- **Out of date:** once `now >= end` the pill says "Out of date" and a warning says the events
are last week's; the old week stays readable below it, greyed and dimmed, instead of shown as
current or hidden.
- **The week** runs Thursday to the next Thursday. The file stores explicit `start` and `end`
instants and the site uses only those (staleness: `now >= end`), never a weekday rule: some
events ran 12 to 14 days (gta.wiki, Lucky Wheel). Instants are written as Thursday 2:00 AM US
Pacific time: 09:00 UTC while the US is on daylight saving time, 10:00 UTC otherwise.
Community guides give this time; no official source states it, so it is a convention for
writing the file, not a game fact used in logic.
- **Source: gta.wiki**, the weekly event page (`Category:Weekly events`, infobox
`type = weeklyevent`, e.g. "Halloween 2026 (Week 3)"). The routine reads its wikitext through
the MediaWiki API (`https://gta.wiki/api.php?action=parse&page=<title>&prop=wikitext&format=json`).
The page's Rockstar Newswire link is kept as a second link in the file.
- **Routine time** (#17): Thursday late afternoon, about 16:00 UTC, so the wiki page is complete.

## Why

- The contents are the ones that matter to someone planning a session's money; GTA+ and map
widgets were declined for this project.
- gta.wiki is trusted for game facts (CLAUDE.md) and its weekly pages list every category above
under fixed headings, with a previous and next week link. The Rockstar Newswire needs
JavaScript to show its text, its API was not reachable from the cloud environment, and it
often posts one article for a whole month of weeks.
- Timing seen on 2026-10-15: the week's wiki page was created on 2026-10-14 at 23:53 UTC (before
the reset, likely from leaks) and its Gun Van, Salvage Yard and Prize Ride parts were filled in
between 11:52 and 11:57 UTC on Thursday. A run right after the reset would miss them.
1 change: 1 addition & 0 deletions docs/decisions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ free number, add one line below. **Replacing one:** write a new decision, then m
- [024](024-several-tabs.md) Several tabs: a tab takes the state another tab saves (`storage` event); only the tab that last started counting counts play time (`BroadcastChannel`)
- [025](025-bunker-staff.md) Bunker staff on Manufacturing, Both or Research: a stock share (Both 0.5, Research 0) on the sourced rates, supplies used as fast on every option (est.), research progress not tracked
- [026](026-movable-cards-everywhere.md) Movable cards on Businesses, Safes and Timers (`ui/CardGrid`): picked up by the title bar; swap by the dragged card's middle, 10% in; orders saved per tab
- [027](027-weekly-contents.md) Weekly events: typed `src/data/weekly.ts` (no JSON, no fetch), checked by a test; Weekly tab only (no news bar); out of date: warning over the dimmed old week; contents: multipliers, Weekly Challenge, rotations, discounts, gifts, a less prominent "Also running" list; no GTA+, no daily map-bound items; explicit UTC start/end (Thursday 2:00 AM US Pacific); source gta.wiki weekly page; routine Thursday ~16:00 UTC
35 changes: 35 additions & 0 deletions docs/weekly-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Writing a week's events

Each Thursday's GTA Online events go into `src/data/weekly.ts` (decision 027), replaced in full
by one pull request. By hand or by the weekly routine (#17), the steps are the same.

1. **Wait for the page.** Find the week's page on gta.wiki: the newest in
[Category:Weekly events](https://gta.wiki/w/Category:Weekly_events), e.g. "Halloween 2026
(Week 3)". It is filled in during Thursday; write the file in the late afternoon (UTC), when
the Gun Van, Salvage Yard and Prize Ride parts are in. Raw text:
`https://gta.wiki/api.php?action=parse&page=<title>&prop=wikitext&format=json`.
2. **Week.** `title` is the page title, `source` its URL (`https://gta.wiki/w/<Title_with_underscores>`),
`newswire` the Rockstar link in its infobox, if any. `start` is the Thursday the page names at
2:00 AM US Pacific, `end` the day after its last day at the same time: `09:00:00Z` while the
US is on daylight saving time (mid-March to early November), `10:00:00Z` otherwise. For a week
longer than seven days, `end` follows the page's dates.
3. **Copy the sections**, standard values only. Leave out anything GTA+ only, and the daily
Junk Energy and RC Time Trials.

| Wiki section | Field |
| ------------------------------------ | ------------------------------------------------- |
| Standard Bonuses: "3x GTA$ and RP …" | `multipliers` (`factor`, `pays`, `activity`) |
| Weekly Challenge | `challenge` (`task`, `reward`) |
| Bonuses: free items, one-off rewards | `gifts`, one line each with its deadline |
| Job Updates, Standard Bonuses, Races | `rotations` (`label`, `items`, optional `note`) |
| Discounts | `discounts` (`kind`, `item`, `percent`; free 100) |
| Job Updates: still-available events | `alsoRunning`, only those with no bonus this week |

A multiplier that pays through a property LSOS knows gets that `property` id from
`src/data/properties.ts` (e.g. bounties: `bail-office`), so owners see it first. The Prize
Ride's challenge is on the wiki's Prize Ride Challenge page; put it in the rotation's `note`.
Keep the rotation labels of the previous week, so the tab reads the same each week.

4. **Check.** `npm run verify 2>&1 | tail -n 5`. The type and the `weekly` test catch missing
fields, an end before the start, odd numbers and unknown property ids.
5. **Pull request** titled `Weekly events: <title>`, linking the wiki page.
4 changes: 4 additions & 0 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
import SaveStatus from './components/SaveStatus.svelte'
import Settings from './components/Settings.svelte'
import Timers from './components/Timers.svelte'
import Weekly from './components/Weekly.svelte'
import TabBar from './components/ui/TabBar.svelte'
import { GOODS } from './data/nightclub'
import { PRODUCTION } from './data/production'
import { PROPERTIES } from './data/properties'
import { SAFES } from './data/safes'
import { WEEK } from './data/weekly'
import { clocks } from './lib/clock.svelte'
import { dismissPopup, overview, quick, undoQuick } from './lib/overview.svelte'
import './lib/production.svelte'
Expand Down Expand Up @@ -125,6 +127,8 @@
order={store.state.timerOrder}
onorder={(order) => (store.state.timerOrder = order)}
/>
{:else if active === 'weekly'}
<Weekly week={WEEK} owned={store.state.properties} now={clocks.now} />
{:else if active === 'settings'}
<Settings />
{:else}
Expand Down
Loading
Loading