feat: add auction house to all village sectors#1259
feat: add auction house to all village sectors#1259MathiasGruber merged 2 commits intostudie-tech:mainfrom
Conversation
|
@ifroshty is attempting to deploy a commit to the TheNinja-RPG Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughAdds 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 Changes
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)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
Confidence Score: 4/5
Important Files Changed
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
Prompt To Fix All With AIThis 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 |
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
c2e67be to
4782279
Compare
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
app/data/villages.sqlapp/drizzle/constants.ts
- 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)
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:
Auction HouseVillageStructureentries to all VILLAGE-type villages (villages.sql), making the building appear on each village's travel map sectorshowInVillagePage = 1so the Auction House appears in the village menu alongside other buildingsallyAccess = 1so allied villages can also use itAuction Houseentry with its original ID and coordinates from migration0254_mushy_rogue.sqlIMG_AUCTION_HOUSEconstant toconstants.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 storedLicense
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
Chores