{"action":"created","issue":{"url":"https://api.github.com/repos/karai17/Simple-Tiled-Implementation/issues/188","repository_url":"https://api.github.com/repos/karai17/Simple-Tiled-Implementation","labels_url":"https://api.github.com/repos/karai17/Simple-Tiled-Implementation/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/karai17/Simple-Tiled-Implementation/issues/188/comments","events_url":"https://api.github.com/repos/karai17/Simple-Tiled-Implementation/issues/188/events","html_url":"https://github.com/karai17/Simple-Tiled-Implementation/issues/188","id":346105806,"node_id":"MDU6SXNzdWUzNDYxMDU4MDY=","number":188,"title":"Layer Group support","user":{"login":"meeces2911","id":462278,"node_id":"MDQ6VXNlcjQ2MjI3OA==","avatar_url":"https://avatars2.githubusercontent.com/u/462278?v=4","gravatar_id":"","url":"https://api.github.com/users/meeces2911","html_url":"https://github.com/meeces2911","followers_url":"https://api.github.com/users/meeces2911/followers","following_url":"https://api.github.com/users/meeces2911/following{/other_user}","gists_url":"https://api.github.com/users/meeces2911/gists{/gist_id}","starred_url":"https://api.github.com/users/meeces2911/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meeces2911/subscriptions","organizations_url":"https://api.github.com/users/meeces2911/orgs","repos_url":"https://api.github.com/users/meeces2911/repos","events_url":"https://api.github.com/users/meeces2911/events{/privacy}","received_events_url":"https://api.github.com/users/meeces2911/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-31T09:26:13Z","updated_at":"2018-07-31T09:38:56Z","closed_at":null,"author_association":"NONE","body":"Sorry if this has been mentioned before (I had a look, but didn't notice anything)\r\n\r\nI have my Object layers under a group called 'Objects' in Tiled, but it doesn't seem like sti supports organising layers like this.\r\n\r\n![image](https://user-images.githubusercontent.com/462278/43450698-67d9b974-9507-11e8-8f34-b3bee875014c.png)\r\n\r\nWould you be opposed to adding something like this to the Map:setLayer function\r\n\r\n```Lua\r\nelseif layer.type == \"group\" then\r\n\tfor _, grpLayer in pairs(layer.layers) do\r\n\t\tgrpLayer.name = layer.name .. \".\" .. grpLayer.name\r\n\t\tself:setLayer(grpLayer, path)\r\n\tend\r\nend\r\n```\r\n\r\nWhich translates to\r\n```Lua\r\ntriggers = map:convertToCustomLayer(map.layers[\"Triggers\"].name)\r\nwalls    = map:convertToCustomLayer(map.layers[\"Objects.Walls\"].name)\r\nmonsters = map:convertToCustomLayer(map.layers['Objects.Monsters'].name)\r\ntreasure = map:convertToCustomLayer(map.layers['Objects.Treasure'].name)\r\nswitches = map:convertToCustomLayer(map.layers['Objects.Switches'].name)\r\n```\r\n\r\n(Or if you know of another solution, i'm all for it!)"},"comment":{"url":"https://api.github.com/repos/karai17/Simple-Tiled-Implementation/issues/comments/409160057","html_url":"https://github.com/karai17/Simple-Tiled-Implementation/issues/188#issuecomment-409160057","issue_url":"https://api.github.com/repos/karai17/Simple-Tiled-Implementation/issues/188","id":409160057,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTE2MDA1Nw==","user":{"login":"karai17","id":590332,"node_id":"MDQ6VXNlcjU5MDMzMg==","avatar_url":"https://avatars3.githubusercontent.com/u/590332?v=4","gravatar_id":"","url":"https://api.github.com/users/karai17","html_url":"https://github.com/karai17","followers_url":"https://api.github.com/users/karai17/followers","following_url":"https://api.github.com/users/karai17/following{/other_user}","gists_url":"https://api.github.com/users/karai17/gists{/gist_id}","starred_url":"https://api.github.com/users/karai17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karai17/subscriptions","organizations_url":"https://api.github.com/users/karai17/orgs","repos_url":"https://api.github.com/users/karai17/repos","events_url":"https://api.github.com/users/karai17/events{/privacy}","received_events_url":"https://api.github.com/users/karai17/received_events","type":"User","site_admin":false},"created_at":"2018-07-31T09:38:56Z","updated_at":"2018-07-31T09:38:56Z","author_association":"OWNER","body":"Are directory structures a new Tiled feature? I don't recall being able to\ndo that before. Does it affect how the Lua exports?\n\n---\nLandon Manning\nlmanning17@gmail.com\n\n\nOn Tue, 31 Jul 2018 at 06:26, meeces2911 <notifications@github.com> wrote:\n\n> Sorry if this has been mentioned before (I had a look, but didn't notice\n> anything)\n>\n> I have my Object layers under a group called 'Objects' in Tiled, but it\n> doesn't seem like sti supports organising layers like this.\n>\n> [image: image]\n> <https://user-images.githubusercontent.com/462278/43450698-67d9b974-9507-11e8-8f34-b3bee875014c.png>\n>\n> Would you be opposed to adding something like this to the Map:setLayer\n> function\n>\n> elseif layer.type == \"group\" then\n> \tfor _, grpLayer in pairs(layer.layers) do\n> \t\tgrpLayer.name = layer.name .. \".\" .. grpLayer.name\n> \t\tself:setLayer(grpLayer, path)\n> \tendend\n>\n> Which translates to\n>\n> triggers = map:convertToCustomLayer(map.layers[\"Triggers\"].name)\n> walls    = map:convertToCustomLayer(map.layers[\"Objects.Walls\"].name)\n> monsters = map:convertToCustomLayer(map.layers['Objects.Monsters'].name)\n> treasure = map:convertToCustomLayer(map.layers['Objects.Treasure'].name)\n> switches = map:convertToCustomLayer(map.layers['Objects.Switches'].name)\n>\n> (Or if you know of another solution, i'm all for it!)\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/karai17/Simple-Tiled-Implementation/issues/188>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AAkB_HNCfDX7t26dzUhhVzLk_Aytjq0Lks5uMCK3gaJpZM4Vn5yr>\n> .\n>\n"}}
{"actor":{"display_login":"karai17"}}