Custom Map Format's extension can't include dot on MacOS
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 12.9k
- Forks
- 2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 8
Description
ENV:
MacOS: 10.15
Tiled: 1.3RC
Fllow http://doc.mapeditor.org/en/latest/reference/scripting/#script-registermapformat:
```javascript
var customMapFormat = {
name: "Custom map format",
extension: "custom.txt",
write: function(map, fileName) {
var m = {
width: map.width,
height: map.height,
layers: []
};
for (var i = 0; i < map.layerCount; ++i) {
var layer = map.layerAt(i);
if (layer.isTileLayer) {
var rows = [];
for (y = 0; y < layer.height; ++y) {
var row = [];
for (x = 0; x < layer.width; ++x)
row.push(layer.cellAt(x, y).tileId);
rows.push(row);
}
m.layers.push(rows);
}
}
return JSON.stringify(m);
},
}
tiled.registerMapFormat("custom", customMapFormat)
```
When I select the custom format in the export dialog, the export box is hung up.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the export-dialog hang on macOS using the documented registerMapFormat example with extension "custom.txt". Trace the registerMapFormat and export-dialog path; done means selecting the custom format no longer hangs and the map exports with the dotted extension.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, macos
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100