Skip to content

Add base file support for general data to preserve potion type values across scrapes#271

Merged
DaanV2 merged 2 commits intocreate-pull-request/patchfrom
copilot/sub-pr-256
Mar 9, 2026
Merged

Add base file support for general data to preserve potion type values across scrapes#271
DaanV2 merged 2 commits intocreate-pull-request/patchfrom
copilot/sub-pr-256

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 8, 2026

The scraper was overwriting potion_types.ts with an empty array on each run because General had no base-loading mechanism — unlike BP/RP containers which seed from src/base/ before scraping.

Changes

  • New base JSON files in packages/bedrock-vanilla-data/src/base/general/:

    • potion_types.json — seeds the known values ["Consume", "ThrownLingering", "ThrownSplash"]
    • potion_modifiers.json — empty placeholder following the same pattern
  • General.load(folder) — new static method on the General class that reads base values from JSON files before scraping populates the rest

  • Output.load() — updated to call General.load(baseFolder/general) alongside the existing edu/vanilla OutputSet loads

  • loadStringArray(filepath) — new helper in json.ts for loading plain string arrays; loadEnsure<string> silently wraps string items into { id } objects (by design for BP/RP data), which is incorrect for simple string fields on General

The flow is now consistent with BP/RP containers: base values are loaded first, scraped values are merged on top, and cleanStrings() deduplicates before saving.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

… potion types

Co-authored-by: DaanV2 <2393905+DaanV2@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on base file for scraped data values retention Add base file support for general data to preserve potion type values across scrapes Mar 8, 2026
@DaanV2 DaanV2 marked this pull request as ready for review March 9, 2026 09:34
@DaanV2 DaanV2 merged commit feee0b9 into create-pull-request/patch Mar 9, 2026
1 check passed
@DaanV2 DaanV2 deleted the copilot/sub-pr-256 branch March 19, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants