{"action":"created","comment":{"url":"https://api.github.com/repos/noam-c/EDEn/pulls/comments/75606631","id":75606631,"diff_hunk":"@@ -33,65 +35,82 @@ class Layer;\n  */\n class Map\n {\n-   /** The name of this map */\n-   std::string m_name;\n-\n-   /** Background layers, which are drawn behind the sprite layer (behind NPCs, player, etc.) */\n-   std::vector<std::unique_ptr<Layer>> m_backgroundLayers;\n-\n-   /** Foreground layers, which are drawn in front of the sprite layer (in front of NPCs, player, etc.) */\n-   std::vector<std::unique_ptr<Layer>> m_foregroundLayers;\n-\n-   /** The passibility of the map. Typed as int to avoid vector<bool> specialization. */\n-   Grid<int> m_passibilityMap;\n+   public:\n+      struct NPCSpawnPoint\n+      {\n+         std::string name;\n+         std::string spritesheet;\n+         geometry::Point2D location;\n+         geometry::Size size;\n+         geometry::Direction direction;\n+      };\n+      \n+   private:\n+      /** The name of this map */\n+      std::string m_name;\n+\n+      /** Background layers, which are drawn behind the sprite layer (behind NPCs, player, etc.) */\n+      std::vector<std::unique_ptr<Layer>> m_backgroundLayers;\n+\n+      /** Foreground layers, which are drawn in front of the sprite layer (in front of NPCs, player, etc.) */\n+      std::vector<std::unique_ptr<Layer>> m_foregroundLayers;\n+\n+      /** The passibility of the map. Typed as int to avoid vector<bool> specialization. */\n+      Grid<int> m_passibilityMap;\n+\n+      /** The list of the map's trigger zones */\n+      std::vector<TriggerZone> m_triggerZones;\n+\n+      /** The list of the map's entrances */\n+      std::map<std::string, geometry::Point2D> m_mapEntrances;\n+\n+      /** The list of the map's exits */\n+      std::vector<MapExit> m_mapExits;\n+      \n+      std::vector<NPCSpawnPoint> m_npcsToSpawn;","path":"src/TileEngine/Map.h","position":69,"original_position":69,"commit_id":"180d06ffe5a22c097d40c8d6f83739158c7e1672","original_commit_id":"180d06ffe5a22c097d40c8d6f83739158c7e1672","user":{"login":"noam-c","id":1154988,"avatar_url":"https://avatars.githubusercontent.com/u/1154988?v=3","gravatar_id":"","url":"https://api.github.com/users/noam-c","html_url":"https://github.com/noam-c","followers_url":"https://api.github.com/users/noam-c/followers","following_url":"https://api.github.com/users/noam-c/following{/other_user}","gists_url":"https://api.github.com/users/noam-c/gists{/gist_id}","starred_url":"https://api.github.com/users/noam-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noam-c/subscriptions","organizations_url":"https://api.github.com/users/noam-c/orgs","repos_url":"https://api.github.com/users/noam-c/repos","events_url":"https://api.github.com/users/noam-c/events{/privacy}","received_events_url":"https://api.github.com/users/noam-c/received_events","type":"User","site_admin":false},"body":"Add comment; this one isn't really straightforward.","created_at":"2016-08-22T00:11:59Z","updated_at":"2016-08-22T00:11:59Z","html_url":"https://github.com/noam-c/EDEn/pull/48#discussion_r75606631","pull_request_url":"https://api.github.com/repos/noam-c/EDEn/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/noam-c/EDEn/pulls/comments/75606631"},"html":{"href":"https://github.com/noam-c/EDEn/pull/48#discussion_r75606631"},"pull_request":{"href":"https://api.github.com/repos/noam-c/EDEn/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/noam-c/EDEn/pulls/48","id":78582723,"html_url":"https://github.com/noam-c/EDEn/pull/48","diff_url":"https://github.com/noam-c/EDEn/pull/48.diff","patch_url":"https://github.com/noam-c/EDEn/pull/48.patch","issue_url":"https://api.github.com/repos/noam-c/EDEn/issues/48","number":48,"state":"open","locked":false,"title":"Allow for placing NPCs using Tiled Map Editor","user":{"login":"noam-c","id":1154988,"avatar_url":"https://avatars.githubusercontent.com/u/1154988?v=3","gravatar_id":"","url":"https://api.github.com/users/noam-c","html_url":"https://github.com/noam-c","followers_url":"https://api.github.com/users/noam-c/followers","following_url":"https://api.github.com/users/noam-c/following{/other_user}","gists_url":"https://api.github.com/users/noam-c/gists{/gist_id}","starred_url":"https://api.github.com/users/noam-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noam-c/subscriptions","organizations_url":"https://api.github.com/users/noam-c/orgs","repos_url":"https://api.github.com/users/noam-c/repos","events_url":"https://api.github.com/users/noam-c/events{/privacy}","received_events_url":"https://api.github.com/users/noam-c/received_events","type":"User","site_admin":false},"body":"While it’s extremely helpful to expose NPC creation to Lua scripts, it’s\r\na pain to have to create NPCs without being able to directly visualize\r\nwhere on the map they are. This change adds support for an object layer\r\ncalled ‘npcs’.\r\nIn addition, added a string->Direction conversion helper. It would be\r\nnice to be able to genericize this to all enums, but that’s likely\r\nnon-trivial.","created_at":"2016-07-23T21:15:12Z","updated_at":"2016-08-22T00:11:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"173bff2423df0465a36077658aa7ec5009461ce8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/noam-c/EDEn/pulls/48/commits","review_comments_url":"https://api.github.com/repos/noam-c/EDEn/pulls/48/comments","review_comment_url":"https://api.github.com/repos/noam-c/EDEn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/noam-c/EDEn/issues/48/comments","statuses_url":"https://api.github.com/repos/noam-c/EDEn/statuses/180d06ffe5a22c097d40c8d6f83739158c7e1672","head":{"label":"noam-c:npc-tiled-layer","ref":"npc-tiled-layer","sha":"180d06ffe5a22c097d40c8d6f83739158c7e1672","user":{"login":"noam-c","id":1154988,"avatar_url":"https://avatars.githubusercontent.com/u/1154988?v=3","gravatar_id":"","url":"https://api.github.com/users/noam-c","html_url":"https://github.com/noam-c","followers_url":"https://api.github.com/users/noam-c/followers","following_url":"https://api.github.com/users/noam-c/following{/other_user}","gists_url":"https://api.github.com/users/noam-c/gists{/gist_id}","starred_url":"https://api.github.com/users/noam-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noam-c/subscriptions","organizations_url":"https://api.github.com/users/noam-c/orgs","repos_url":"https://api.github.com/users/noam-c/repos","events_url":"https://api.github.com/users/noam-c/events{/privacy}","received_events_url":"https://api.github.com/users/noam-c/received_events","type":"User","site_admin":false},"repo":{"id":2841347,"name":"EDEn","full_name":"noam-c/EDEn","owner":{"login":"noam-c","id":1154988,"avatar_url":"https://avatars.githubusercontent.com/u/1154988?v=3","gravatar_id":"","url":"https://api.github.com/users/noam-c","html_url":"https://github.com/noam-c","followers_url":"https://api.github.com/users/noam-c/followers","following_url":"https://api.github.com/users/noam-c/following{/other_user}","gists_url":"https://api.github.com/users/noam-c/gists{/gist_id}","starred_url":"https://api.github.com/users/noam-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noam-c/subscriptions","organizations_url":"https://api.github.com/users/noam-c/orgs","repos_url":"https://api.github.com/users/noam-c/repos","events_url":"https://api.github.com/users/noam-c/events{/privacy}","received_events_url":"https://api.github.com/users/noam-c/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/noam-c/EDEn","description":"Exodus Draconis RPG Engine","fork":false,"url":"https://api.github.com/repos/noam-c/EDEn","forks_url":"https://api.github.com/repos/noam-c/EDEn/forks","keys_url":"https://api.github.com/repos/noam-c/EDEn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/noam-c/EDEn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/noam-c/EDEn/teams","hooks_url":"https://api.github.com/repos/noam-c/EDEn/hooks","issue_events_url":"https://api.github.com/repos/noam-c/EDEn/issues/events{/number}","events_url":"https://api.github.com/repos/noam-c/EDEn/events","assignees_url":"https://api.github.com/repos/noam-c/EDEn/assignees{/user}","branches_url":"https://api.github.com/repos/noam-c/EDEn/branches{/branch}","tags_url":"https://api.github.com/repos/noam-c/EDEn/tags","blobs_url":"https://api.github.com/repos/noam-c/EDEn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/noam-c/EDEn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/noam-c/EDEn/git/refs{/sha}","trees_url":"https://api.github.com/repos/noam-c/EDEn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/noam-c/EDEn/statuses/{sha}","languages_url":"https://api.github.com/repos/noam-c/EDEn/languages","stargazers_url":"https://api.github.com/repos/noam-c/EDEn/stargazers","contributors_url":"https://api.github.com/repos/noam-c/EDEn/contributors","subscribers_url":"https://api.github.com/repos/noam-c/EDEn/subscribers","subscription_url":"https://api.github.com/repos/noam-c/EDEn/subscription","commits_url":"https://api.github.com/repos/noam-c/EDEn/commits{/sha}","git_commits_url":"https://api.github.com/repos/noam-c/EDEn/git/commits{/sha}","comments_url":"https://api.github.com/repos/noam-c/EDEn/comments{/number}","issue_comment_url":"https://api.github.com/repos/noam-c/EDEn/issues/comments{/number}","contents_url":"https://api.github.com/repos/noam-c/EDEn/contents/{+path}","compare_url":"https://api.github.com/repos/noam-c/EDEn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/noam-c/EDEn/merges","archive_url":"https://api.github.com/repos/noam-c/EDEn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/noam-c/EDEn/downloads","issues_url":"https://api.github.com/repos/noam-c/EDEn/issues{/number}","pulls_url":"https://api.github.com/repos/noam-c/EDEn/pulls{/number}","milestones_url":"https://api.github.com/repos/noam-c/EDEn/milestones{/number}","notifications_url":"https://api.github.com/repos/noam-c/EDEn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/noam-c/EDEn/labels{/name}","releases_url":"https://api.github.com/repos/noam-c/EDEn/releases{/id}","deployments_url":"https://api.github.com/repos/noam-c/EDEn/deployments","created_at":"2011-11-24T06:02:16Z","updated_at":"2016-08-22T00:07:40Z","pushed_at":"2016-08-22T00:07:40Z","git_url":"git://github.com/noam-c/EDEn.git","ssh_url":"git@github.com:noam-c/EDEn.git","clone_url":"https://github.com/noam-c/EDEn.git","svn_url":"https://github.com/noam-c/EDEn","homepage":"","size":26495,"stargazers_count":13,"watchers_count":13,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":20,"forks":3,"open_issues":20,"watchers":13,"default_branch":"master"}},"base":{"label":"noam-c:master","ref":"master","sha":"36137b059a798af7e55b65545c6d3a1bb03bb826","user":{"login":"noam-c","id":1154988,"avatar_url":"https://avatars.githubusercontent.com/u/1154988?v=3","gravatar_id":"","url":"https://api.github.com/users/noam-c","html_url":"https://github.com/noam-c","followers_url":"https://api.github.com/users/noam-c/followers","following_url":"https://api.github.com/users/noam-c/following{/other_user}","gists_url":"https://api.github.com/users/noam-c/gists{/gist_id}","starred_url":"https://api.github.com/users/noam-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noam-c/subscriptions","organizations_url":"https://api.github.com/users/noam-c/orgs","repos_url":"https://api.github.com/users/noam-c/repos","events_url":"https://api.github.com/users/noam-c/events{/privacy}","received_events_url":"https://api.github.com/users/noam-c/received_events","type":"User","site_admin":false},"repo":{"id":2841347,"name":"EDEn","full_name":"noam-c/EDEn","owner":{"login":"noam-c","id":1154988,"avatar_url":"https://avatars.githubusercontent.com/u/1154988?v=3","gravatar_id":"","url":"https://api.github.com/users/noam-c","html_url":"https://github.com/noam-c","followers_url":"https://api.github.com/users/noam-c/followers","following_url":"https://api.github.com/users/noam-c/following{/other_user}","gists_url":"https://api.github.com/users/noam-c/gists{/gist_id}","starred_url":"https://api.github.com/users/noam-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noam-c/subscriptions","organizations_url":"https://api.github.com/users/noam-c/orgs","repos_url":"https://api.github.com/users/noam-c/repos","events_url":"https://api.github.com/users/noam-c/events{/privacy}","received_events_url":"https://api.github.com/users/noam-c/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/noam-c/EDEn","description":"Exodus Draconis RPG Engine","fork":false,"url":"https://api.github.com/repos/noam-c/EDEn","forks_url":"https://api.github.com/repos/noam-c/EDEn/forks","keys_url":"https://api.github.com/repos/noam-c/EDEn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/noam-c/EDEn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/noam-c/EDEn/teams","hooks_url":"https://api.github.com/repos/noam-c/EDEn/hooks","issue_events_url":"https://api.github.com/repos/noam-c/EDEn/issues/events{/number}","events_url":"https://api.github.com/repos/noam-c/EDEn/events","assignees_url":"https://api.github.com/repos/noam-c/EDEn/assignees{/user}","branches_url":"https://api.github.com/repos/noam-c/EDEn/branches{/branch}","tags_url":"https://api.github.com/repos/noam-c/EDEn/tags","blobs_url":"https://api.github.com/repos/noam-c/EDEn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/noam-c/EDEn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/noam-c/EDEn/git/refs{/sha}","trees_url":"https://api.github.com/repos/noam-c/EDEn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/noam-c/EDEn/statuses/{sha}","languages_url":"https://api.github.com/repos/noam-c/EDEn/languages","stargazers_url":"https://api.github.com/repos/noam-c/EDEn/stargazers","contributors_url":"https://api.github.com/repos/noam-c/EDEn/contributors","subscribers_url":"https://api.github.com/repos/noam-c/EDEn/subscribers","subscription_url":"https://api.github.com/repos/noam-c/EDEn/subscription","commits_url":"https://api.github.com/repos/noam-c/EDEn/commits{/sha}","git_commits_url":"https://api.github.com/repos/noam-c/EDEn/git/commits{/sha}","comments_url":"https://api.github.com/repos/noam-c/EDEn/comments{/number}","issue_comment_url":"https://api.github.com/repos/noam-c/EDEn/issues/comments{/number}","contents_url":"https://api.github.com/repos/noam-c/EDEn/contents/{+path}","compare_url":"https://api.github.com/repos/noam-c/EDEn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/noam-c/EDEn/merges","archive_url":"https://api.github.com/repos/noam-c/EDEn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/noam-c/EDEn/downloads","issues_url":"https://api.github.com/repos/noam-c/EDEn/issues{/number}","pulls_url":"https://api.github.com/repos/noam-c/EDEn/pulls{/number}","milestones_url":"https://api.github.com/repos/noam-c/EDEn/milestones{/number}","notifications_url":"https://api.github.com/repos/noam-c/EDEn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/noam-c/EDEn/labels{/name}","releases_url":"https://api.github.com/repos/noam-c/EDEn/releases{/id}","deployments_url":"https://api.github.com/repos/noam-c/EDEn/deployments","created_at":"2011-11-24T06:02:16Z","updated_at":"2016-08-22T00:07:40Z","pushed_at":"2016-08-22T00:07:40Z","git_url":"git://github.com/noam-c/EDEn.git","ssh_url":"git@github.com:noam-c/EDEn.git","clone_url":"https://github.com/noam-c/EDEn.git","svn_url":"https://github.com/noam-c/EDEn","homepage":"","size":26495,"stargazers_count":13,"watchers_count":13,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":20,"forks":3,"open_issues":20,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/noam-c/EDEn/pulls/48"},"html":{"href":"https://github.com/noam-c/EDEn/pull/48"},"issue":{"href":"https://api.github.com/repos/noam-c/EDEn/issues/48"},"comments":{"href":"https://api.github.com/repos/noam-c/EDEn/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/noam-c/EDEn/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/noam-c/EDEn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/noam-c/EDEn/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/noam-c/EDEn/statuses/180d06ffe5a22c097d40c8d6f83739158c7e1672"}}}}
{"actor":{"display_login":"noam-c"}}