`objectLayersAddType` does not handle Tiled's lists

Open Beginner friendly
#188 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
70/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript
Domain
game-dev

Research direction

Read src/engineTileLayer.js around lines 81-86 for the tile-layer type declarations and around lines 825-873 for objectLayersProperties, which currently converts Tiled property types but ignores the list type. Compare against Tiled's documented property structure so each list item's wrapped value is unwrapped into a plain JS array. Done looks like list properties come out of objectLayersProperties as arrays of unwrapped values, with the type declarations updated to match.

Written by the indexing model from the issue text.

Description

The fact that Tiled has a list property type, is neither acknowledged by the type declarations:
https://github.com/KilledByAPixel/LittleJS/blob/47bdb56e2b967a827bdaeb5d25f0c26e55d0d2d7/src/engineTileLayer.js#L81-L86

nor by objectLayersProperties, which does not convert the list to a JS array (each item is basically an object, which wraps the actual value in a property):
https://github.com/KilledByAPixel/LittleJS/blob/47bdb56e2b967a827bdaeb5d25f0c26e55d0d2d7/src/engineTileLayer.js#L825-L873

Dominant language
JavaScript
Stars
4.4k
Forks
243
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 KilledByAPixel/LittleJS

All issues in KilledByAPixel/LittleJS

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.