Skip to content

feat: give the ruins residents and a straight east wall (#10) - #44

Open
blippip69 wants to merge 1 commit into
Bitcoindefi:mainfrom
blippip69:feat/dungeon-content
Open

feat: give the ruins residents and a straight east wall (#10)#44
blippip69 wants to merge 1 commit into
Bitcoindefi:mainfrom
blippip69:feat/dungeon-content

Conversation

@blippip69

Copy link
Copy Markdown
Contributor

feat: give the ruins residents and a straight east wall (#10)

Comment thread lib/map.js
Comment on lines +1159 to +1163
// The ruins were drawn a few columns short on the right and every row ended
// at a different wall column; padEnd used to hide that from defineMap()'s
// rectangularity check (#10). Normalizing to one fixed width gives the ruins
// a straight east wall, so the check means something again.
].map((row) => (row + '###').slice(0, 60) + '#')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Quality: Row normalization still hides ragged art from the check

.map((row) => (row + '###').slice(0, 60) + '#') forces every dungeon row to exactly 61 chars, so defineMap()'s rectangularity check can never throw for the dungeon — the same masking behavior the comment criticizes about the old padEnd, not a fix for it. It also silently drops the rightmost column of any row longer than 61 (rows here are 62 wide, so their real east-wall column is discarded), and 60-wide rows gain a redundant double wall, leaving the interior right edge jagged by one cell despite the 'straight east wall' claim. Consider fixing the source art to a uniform width and letting defineMap() validate it, rather than reshaping rows at load time.

Was this helpful? React with 👍 / 👎

The dungeon shipped structurally perfect and completely empty: across 941 walkable cells only the exit gate did anything, because MAPS.dungeon never defined npcs. Three residents now camp different chambers using the exact NPC machinery the city already runs, so the header hint, e-to-talk and dialogue all light up underground. The art itself was ragged on the right - rows ended at columns 59, 60 or 61 and padEnd hid that from the defineMap rectangularity check - so rows are normalized to one declared width with wall forced at column 60. Hero head clipping on arrival is already covered by the Bitcoindefi#16 solid-cell clip. Field-style encounters stay open as follow-up.
@blippip69
blippip69 force-pushed the feat/dungeon-content branch from cd8eec5 to 0405c3f Compare August 25, 2026 16:20
@gitar-bot

gitar-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown
CI failed: Code style check failed due to formatting issues in 2 files caught by Prettier.

Overview

1 code style failure found across 1 analyzed log, caused by Prettier formatting violations in change-related files.

Failures

Prettier Code Style Check Failed (confidence: high)

  • Type: tooling
  • Affected jobs: 98040986834
  • Related to change: yes
  • Root cause: Prettier found code style issues in lib/map.js and test/dungeon-content.test.js during the lint step.
  • Suggested fix: Run Prettier locally with npx prettier . --write and commit the formatted files.

Summary

  • Change-related failures: 1 code style/formatting failure
  • Infrastructure/flaky failures: None
  • Recommended action: Format the codebase with Prettier and push the updated commit.
Code Review 👍 Approved with suggestions 0 resolved / 1 findings

Adds residents and a straight east wall to the ruins. Consider addressing the row normalization finding to prevent ragged art from bypassing validation.

💡 Quality: Row normalization still hides ragged art from the check

📄 lib/map.js:1159-1163 📄 lib/map.js:1216-1223

.map((row) => (row + '###').slice(0, 60) + '#') forces every dungeon row to exactly 61 chars, so defineMap()'s rectangularity check can never throw for the dungeon — the same masking behavior the comment criticizes about the old padEnd, not a fix for it. It also silently drops the rightmost column of any row longer than 61 (rows here are 62 wide, so their real east-wall column is discarded), and 60-wide rows gain a redundant double wall, leaving the interior right edge jagged by one cell despite the 'straight east wall' claim. Consider fixing the source art to a uniform width and letting defineMap() validate it, rather than reshaping rows at load time.

🤖 Prompt for agents
Code Review: Adds residents and a straight east wall to the ruins. Consider addressing the row normalization finding to prevent ragged art from bypassing validation.

1. 💡 Quality: Row normalization still hides ragged art from the check
   Files: lib/map.js:1159-1163, lib/map.js:1216-1223

   `.map((row) => (row + '###').slice(0, 60) + '#')` forces every dungeon row to exactly 61 chars, so `defineMap()`'s rectangularity check can never throw for the dungeon — the same masking behavior the comment criticizes about the old `padEnd`, not a fix for it. It also silently drops the rightmost column of any row longer than 61 (rows here are 62 wide, so their real east-wall column is discarded), and 60-wide rows gain a redundant double wall, leaving the interior right edge jagged by one cell despite the 'straight east wall' claim. Consider fixing the source art to a uniform width and letting `defineMap()` validate it, rather than reshaping rows at load time.

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Important

Your trial ends in 7 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

@leocagli

Copy link
Copy Markdown
Collaborator

Merged onto current main, the tests pass. npm run lint does not:

Checking formatting...
[warn] <the new test file>
[warn] Code style issues found in the above file. Run Prettier with --write to fix.

The repository runs prettier . --check as part of npm run lint, and CI runs
lint as its own job, so this alone turns the build red.

npm run format fixes it in one pass. Nothing else needs to change; the code itself
is fine.

@leocagli

Copy link
Copy Markdown
Collaborator

El CI ya corrio (habilite la ejecucion, estaba esperando aprobacion de mantenedor). Dejé el detalle de todos tus PRs juntos en #50 para no repetirlo seis veces: #50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants