Skip to content

feat: add auction house to all village sectors#1259

Merged
MathiasGruber merged 2 commits intostudie-tech:mainfrom
ifroshty:feat/auction-house-villages-1258
Mar 19, 2026
Merged

feat: add auction house to all village sectors#1259
MathiasGruber merged 2 commits intostudie-tech:mainfrom
ifroshty:feat/auction-house-villages-1258

Conversation

@ifroshty
Copy link
Copy Markdown
Contributor

@ifroshty ifroshty commented Mar 17, 2026

Pull Request

Adds the Auction House as a building to all village sectors (Current, Glacier,
Tsukimori, Shroud, Shine, Freedom State, Horizon) and Wake Island. Previously
the auction house was only accessible from Wake Island.

How:
Adds Auction House VillageStructure to all VILLAGE type villages and Wake Island, making it accessible from villages in addition to its existing Wake Island location. Shown in village menu via showInVillagePage and accessible to allies.

Changes:

  • Added Auction House VillageStructure entries to all VILLAGE-type villages (villages.sql), making the building appear on each village's travel map sector
  • Set showInVillagePage = 1 so the Auction House appears in the village menu alongside other buildings
  • Set allyAccess = 1 so allied villages can also use it
  • Preserved the existing Wake Island Auction House entry with its original ID and coordinates from migration 0254_mushy_rogue.sql
  • Added IMG_AUCTION_HOUSE constant to constants.ts. t=The image URL was already in the game (introduced with Wake Island's auction house) but was never saved as a constant. Tracked it down from the original migration and saved it for consistency with how other building images are stored
Screenshot_2026-03-17_12-35-35 Screenshot_2026-03-17_12-35-54

License

By making this pull request, I confirm that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the Studie-Tech ApS organization has the copyright to use and modify my contribution for perpetuity.

Closes #1258

Summary by CodeRabbit

  • New Features

    • Added multiple new Auction House structures across villages to expand trading.
    • Auction listing states expanded to include "EXPIRED" and "CANCELLED" for clearer marketplace status.
  • Chores

    • Updated Administration Building image/visibility and added a new Auction House image resource.

@ifroshty ifroshty requested a review from MathiasGruber as a code owner March 17, 2026 18:27
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 17, 2026

@ifroshty is attempting to deploy a commit to the TheNinja-RPG Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 17, 2026

Walkthrough

Adds Auction House rows to village seed data, introduces an image constant for the Auction House, expands auction listing states, and swaps the pre-commit runner from npx to bunx.

Changes

Cohort / File(s) Summary
Village data updates
app/data/villages.sql
Inserts multiple new VillageStructure rows for Auction House across several villages (new entries with full fields including lastUpgradedAt and showInVillagePage).
Drizzle constants
app/drizzle/constants.ts
Adds IMG_AUCTION_HOUSE constant (image URL) and expands AUCTION_LISTING_STATES from ["ACTIVE","SOLD"] to include EXPIRED and CANCELLED.
Git hook
.husky/pre-commit
Replaces npx invocation with bunx for the pre-commit lint-staged command.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant Server
  participant Database
  Client->>Server: Request village page
  Server->>Database: Query VillageStructure for villageId (includes Auction House rows)
  Database-->>Server: Return structures (Auction House entries present)
  Server-->>Client: Render village page with Auction House data (uses IMG_AUCTION_HOUSE, listing states)
  Client->>Client: Display Auction House UI (listing states: ACTIVE, SOLD, EXPIRED, CANCELLED)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through rows of stone and tile,

New booths appear in every aisle,
Auctions ring from square to square,
A pinch more joy and market flair,
Carrots traded with extra style!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes an out-of-scope change: updating the pre-commit hook from npx to bunx in .husky/pre-commit, which is unrelated to the Auction House feature in issue #1258. Remove the pre-commit hook change (.husky/pre-commit) or address it as a separate PR; this change is outside the scope of adding Auction House to villages.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding the Auction House building to all village sectors, which is the primary objective of this PR.
Linked Issues check ✅ Passed The PR successfully implements both requirements from issue #1258: adds Auction House VillageStructure entries to villages and enables showInVillagePage to make it visible in the village menu.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description comprehensively covers what was implemented, why changes were made, includes implementation details, provides screenshots, specifies affected files, and includes the required license waiver.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 17, 2026

Confidence Score: 4/5

  • Safe to merge — purely additive SQL seed rows and a TypeScript constant sync with no migration required.
  • All changes are net-new rows in a seed file and a constant addition. The new EXPIRED/CANCELLED states were already in the DB migration, so there is no schema drift. The only issue is a non-standard human-readable ID for the Wake Island entry, which is a style concern rather than a functional bug.
  • app/data/villages.sql — minor non-standard ID for the Wake Island Auction House entry.

Important Files Changed

Filename Overview
app/data/villages.sql Adds 8 new Auction House VillageStructure rows for all VILLAGE-type villages and Wake Island. All entries use correct image URL, allyAccess=1, showInVillagePage=1, and /auctionhouse route. Minor style issue: Wake Island entry uses non-standard human-readable ID "AuctionHouse_WakeIsland" instead of a nanoid-style string like all other entries.
app/drizzle/constants.ts Adds IMG_AUCTION_HOUSE constant for the auction house image URL, and syncs AUCTION_LISTING_STATES TypeScript constant with the already-existing database enum ('EXPIRED' and 'CANCELLED' were already present in the DB migration at 0000_omniscient_ben_parker.sql line 108). No migration required.
.husky/pre-commit Switches lint-staged runner from npx to bunx to align with the project's Bun package manager. Straightforward, low-risk change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    AH["Auction House (/auctionhouse)"]
    AH --> WI["Wake Island\n(AuctionHouse_WakeIsland)"]
    AH --> CU["Current\n(pR7kBmZxQ2-TvNjHwY4L)"]
    AH --> GL["Glacier\n(rT9mDoByS4-VxPlJyA6N)"]
    AH --> TS["Tsukimori\n(sU0nEpCzT5-WyQmKzB7O)"]
    AH --> SH["Shroud\n(tV1oFqDaU6-XzRnLaC8P)"]
    AH --> SI["Shine\n(uW2pGrEbV7-YaSnMbD9Q)"]
    AH --> FS["Freedom State\n(vX3qHsFcW8-ZbToNcE0R)"]
    AH --> HO["Horizon\n(wY4rItGdX9-AcUpOdF1S)"]

    subgraph "VillageStructure properties (all entries)"
        P1["level=1, maxLevel=1"]
        P2["curSp=100, maxSp=100"]
        P3["showInVillagePage=1"]
        P4["allyAccess=1"]
    end
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: app/data/villages.sql
Line: 160

Comment:
**Non-standard ID format for Wake Island entry**

All other `VillageStructure` IDs in this file use nanoid-style strings (e.g., `pR7kBmZxQ2-TvNjHwY4L`, `rT9mDoByS4-VxPlJyA6N`). The Wake Island entry uses the human-readable string `AuctionHouse_WakeIsland`, which breaks this convention. While the `id` column is just a `varchar(191)` primary key and won't cause a runtime error, an inconsistent ID could make queries and debugging harder and may clash with ID-generation assumptions elsewhere in the codebase.

Consider replacing it with a properly-formatted nanoid-style ID like the other entries:

```suggestion
	('AuHouseWakeIslandXYZ1', 'Auction House', 'https://ui0arpl8sm.ufs.sh/f/Hzww9EQvYURJmcDNSqHE4IMO5Goa7cgLxPJ0VC6lU8vbt1Ap', '1nSqxViGqnXp_xXAPeQMC', '1', '1', '100', '100', '1', '9', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '10000', '1', '/auctionhouse', '2026-03-17 00:00:00.000', '1'),
```
(Replace `AuHouseWakeIslandXYZ1` with a proper nanoid-generated value.)

How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: 22ef9e1

Comment thread app/data/villages.sql Outdated
Comment thread app/data/villages.sql Outdated
Adds Auction House VillageStructure to all VILLAGE type villages
and Wake Island, making it accessible from villages in addition
to its existing Wake Island location. Shown in village menu via
showInVillagePage and accessible to allies.

Closes studie-tech#1258
@ifroshty ifroshty force-pushed the feat/auction-house-villages-1258 branch from c2e67be to 4782279 Compare March 17, 2026 19:26
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/data/villages.sql`:
- Line 131: The INSERT row for the Wake Island "Administration Building" (tuple
id 'YMV7Kbo1OduGfNDYfq5' / name "Administration Building") is using the Auction
House image URL; open app/data/villages.sql, find that tuple and replace the
incorrect Auction House URL (https://ui0arpl8sm.ufs.sh/...) with the correct
Wake Island Administration Building image URL (upload or use the proper asset
instead of the Freedom State/Auction House URL), ensure the new URL points to
the Wake Island building image, save and commit the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b80b3b98-6503-470c-9368-8fcc2cdebbb4

📥 Commits

Reviewing files that changed from the base of the PR and between c2e67be and 4782279.

📒 Files selected for processing (2)
  • app/data/villages.sql
  • app/drizzle/constants.ts

Comment thread app/data/villages.sql Outdated
- Restore Administration Building image URL in villages.sql that was
  accidentally overwritten with the auction house image
- Fix pre-commit hook to use bunx instead of npx (npx not available in
  bun environment)
@Phrosfire Phrosfire added the QoL Quality of life improvements label Mar 19, 2026
Copy link
Copy Markdown
Collaborator

@MathiasGruber MathiasGruber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@MathiasGruber MathiasGruber merged commit e232be0 into studie-tech:main Mar 19, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Completed QoL Quality of life improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add auction house to villages

3 participants