Room builder silently overwrites a prop stamped on a big sprite's top-left cell

Open Beginner friendly
#74 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
tooling

Research direction

Start in tools/roomgen.py at Builder.put, where a stamp on a non-Floor layer replaces the existing key without any check. Reproduce by placing a prop on the top-left cell of a multi-cell sprite and confirm the sprite is dropped while its collider remains. Done when put raises or warns on a different-key replacement on a non-Floor layer, or qa_port.py flags colliders whose sprite was replaced, and the change is covered by a test.

Written by the indexing model from the issue text.

Description

Layers hold one tile per cell, and a multi-cell sprite occupies only its top-left cell. In tools/roomgen.py, Builder.put overwrites silently, so stamping e.g. a lantern on the cell where a tall landmark's sprite is anchored drops one of the two sprites while leaving the collider behind (hit while building Osaka: a bridge lantern lost its post to the Tsutenkaku sprite). Make Builder.put raise or warn when it replaces a different key on a non-Floor layer, or have qa_port.py flag colliders whose sprite was replaced.

Found while implementing #17.

Dominant language
JavaScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from devhou-se/game

All issues in devhou-se/game

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.