defold icon indicating copy to clipboard operation
defold copied to clipboard

Show on the tile select screen the ID of the tile

Open AenigmaOmni opened this issue 4 years ago • 3 comments

It would be nice for those of us that use procgen to manipulate tilemaps if we could easily get the ID of a specific tile for use with tilemap.set_tile() this is the screen I'm talking about Screenshot_1

Also I have made a post on the forums about it. (https://forum.defold.com/t/suggestion-tilemap-selection-id/68880)

AenigmaOmni avatar Jul 18 '21 10:07 AenigmaOmni

How can I begin working on this feature as a new contributor?

andrewruales avatar Sep 14 '22 03:09 andrewruales

How can I begin working on this feature as a new contributor?

Thank you for showing an interest in contributing to Defold!

  1. Step one is to make sure you can build the editor. Please have a look at the setup instructions here: https://github.com/defold/defold/blob/dev/editor/README.md
  2. Once you have everything set up you can start contributing. Are you familiar with Clojure, the language most of the editor is written in?

@matgis and @vlaaad will provide some pointers to the relevant files and some getting started instructions!

britzl avatar Sep 14 '22 06:09 britzl

I believe the "Cell 1, 1" string is produced here: https://github.com/defold/defold/blob/dev/editor/src/clj/editor/tile_map.clj#L1144

You should be able to calculate the tile ID using the tile-dimensions that are also available there and add it to the string.

matgis avatar Sep 14 '22 07:09 matgis

It seems like I can rewrite this line with the x and y position of the cursor divided by the width and height of a tile. I have written this and would like to try opening a pull request but am receiving a "permission denied" message when trying to do so. What are your thoughts on this?

andrewruales avatar Sep 30 '22 06:09 andrewruales

I have written this and would like to try opening a pull request but am receiving a "permission denied" message when trying to do so. What are your thoughts on this?

In order to create a pull request you need to first fork the repository to your own account. Once that is done and you have added and tested your changes you can create a pull request to the upstream repository (ie this one)

britzl avatar Sep 30 '22 07:09 britzl