{"action":"created","comment":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/170334656","pull_request_review_id":99013593,"id":170334656,"diff_hunk":"@@ -130,6 +131,32 @@ void IResolveOrder.ResolveOrder(Actor self, Order order)\n \t\t\t\t\tforeach (var s in buildingInfo.BuildSounds)\n \t\t\t\t\t\tGame.Sound.PlayToPlayer(SoundType.World, order.Player, s, host.CenterPosition);\n \t\t\t\t}\n+\t\t\t\telse if (os == \"ReplaceBuilding\")\n+\t\t\t\t{\n+\t\t\t\t\tif (!buildingInfo.IsCloseEnoughToBase(self.World, order.Player, order.TargetString, order.TargetLocation))\n+\t\t\t\t\t\treturn;\n+\n+\t\t\t\t\t// Current ReplaceBuilding-Order must contain ReplacementInfo\n+\t\t\t\t\tvar replacementInfo = unit.TraitInfoOrDefault<ReplacementInfo>();\n+\t\t\t\t\tif (replacementInfo == null)\n+\t\t\t\t\t\treturn;\n+\n+\t\t\t\t\t// remove target Actor(s)\n+\t\t\t\t\tforeach (var t in buildingInfo.Tiles(order.TargetLocation))\n+\t\t\t\t\t\tif (self.World.WorldActor.Trait<BuildingInfluence>().GetBuildingAt(t) != null)","path":"OpenRA.Mods.Common/Traits/Player/PlaceBuilding.cs","position":26,"original_position":26,"commit_id":"6be51296ef6fcee91599e7dacb37ec930302576e","original_commit_id":"6be51296ef6fcee91599e7dacb37ec930302576e","user":{"login":"abcdefg30","id":7704140,"avatar_url":"https://avatars1.githubusercontent.com/u/7704140?v=4","gravatar_id":"","url":"https://api.github.com/users/abcdefg30","html_url":"https://github.com/abcdefg30","followers_url":"https://api.github.com/users/abcdefg30/followers","following_url":"https://api.github.com/users/abcdefg30/following{/other_user}","gists_url":"https://api.github.com/users/abcdefg30/gists{/gist_id}","starred_url":"https://api.github.com/users/abcdefg30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abcdefg30/subscriptions","organizations_url":"https://api.github.com/users/abcdefg30/orgs","repos_url":"https://api.github.com/users/abcdefg30/repos","events_url":"https://api.github.com/users/abcdefg30/events{/privacy}","received_events_url":"https://api.github.com/users/abcdefg30/received_events","type":"User","site_admin":false},"body":"We might want to cache `self.World.WorldActor.Trait<BuildingInfluence>()` in a local variable outside of the loop instead of querying it multiple times.","created_at":"2018-02-23T18:51:35Z","updated_at":"2018-02-23T18:51:35Z","html_url":"https://github.com/OpenRA/OpenRA/pull/14850#discussion_r170334656","pull_request_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/14850","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/170334656"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/14850#discussion_r170334656"},"pull_request":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/14850"}}},"pull_request":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/14850","id":171080938,"html_url":"https://github.com/OpenRA/OpenRA/pull/14850","diff_url":"https://github.com/OpenRA/OpenRA/pull/14850.diff","patch_url":"https://github.com/OpenRA/OpenRA/pull/14850.patch","issue_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/14850","number":14850,"state":"open","locked":false,"title":"Allows GDI-Turrets, GDI- and Nod-Gates to be placed on walls.","user":{"login":"fruestueck","id":25386322,"avatar_url":"https://avatars3.githubusercontent.com/u/25386322?v=4","gravatar_id":"","url":"https://api.github.com/users/fruestueck","html_url":"https://github.com/fruestueck","followers_url":"https://api.github.com/users/fruestueck/followers","following_url":"https://api.github.com/users/fruestueck/following{/other_user}","gists_url":"https://api.github.com/users/fruestueck/gists{/gist_id}","starred_url":"https://api.github.com/users/fruestueck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fruestueck/subscriptions","organizations_url":"https://api.github.com/users/fruestueck/orgs","repos_url":"https://api.github.com/users/fruestueck/repos","events_url":"https://api.github.com/users/fruestueck/events{/privacy}","received_events_url":"https://api.github.com/users/fruestueck/received_events","type":"User","site_admin":false},"body":"Allows GDI-Turrets, GDI- and Nod-Gates to be placed on walls.\r\n\r\n![unbenannt](https://user-images.githubusercontent.com/25386322/36609461-2c6af6a2-18cd-11e8-9c4e-d24cd1b921ab.JPG)\r\n_Gates and Turrets built on walls._\r\n\r\nThis implements two Traits `Replaceable` and `Replacement` (simalar to `Plug` and `Pluggable`).\r\n\r\nAdded a `ReplaceBuilding`-Order that allows actors with trait `Replacement` to be build on clear space and on actors with matching `Replaceable` trait.\r\nIt simply disposes any 'replaceable' actors (checked) before building the new one.\r\nIt works fine (execpt plug placement not possible on Turret build on wall) but i would not recommend to merge this yet (see Note).\r\n\r\nNote:\r\n- I've created a new PlaceBuilding-Order instead of modifieing the 'standard' PlaceBuilding-Order to have it seperated. Could be merged into PlaceBuilding-Order.\r\n- Maby some redudant code should be cleard to avoid future developing problems by moving it into BuildingUtils.CanPlaceBuilding. That does also apply to LineBuild.\r\n- Also im sure that there are still some unneccesary code-chunks. Thankful for any feedback : )\r\n\r\nThis PR closes #12088\r\n\r\nFurther notes:\r\n- With this PR it would be possible to build a new 'ungamaged' wall upon a damaged one (like in vanilla ts i assume).\r\n- This PR could mess with AI placing gates wrongfully/ugly - dont know if AI is aware of basedefences yet\r\n- Missing: Allow `Replacement` to replace more than one `Replaceable` Type (by changing the string into a list)","created_at":"2018-02-23T18:11:49Z","updated_at":"2018-02-23T18:51:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30f52a8b5eb2ecc69ca4538a97dd3a1273fb8f99","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/14850/commits","review_comments_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/14850/comments","review_comment_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/14850/comments","statuses_url":"https://api.github.com/repos/OpenRA/OpenRA/statuses/6be51296ef6fcee91599e7dacb37ec930302576e","head":{"label":"fruestueck:replace-ts-wall-gate","ref":"replace-ts-wall-gate","sha":"6be51296ef6fcee91599e7dacb37ec930302576e","user":{"login":"fruestueck","id":25386322,"avatar_url":"https://avatars3.githubusercontent.com/u/25386322?v=4","gravatar_id":"","url":"https://api.github.com/users/fruestueck","html_url":"https://github.com/fruestueck","followers_url":"https://api.github.com/users/fruestueck/followers","following_url":"https://api.github.com/users/fruestueck/following{/other_user}","gists_url":"https://api.github.com/users/fruestueck/gists{/gist_id}","starred_url":"https://api.github.com/users/fruestueck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fruestueck/subscriptions","organizations_url":"https://api.github.com/users/fruestueck/orgs","repos_url":"https://api.github.com/users/fruestueck/repos","events_url":"https://api.github.com/users/fruestueck/events{/privacy}","received_events_url":"https://api.github.com/users/fruestueck/received_events","type":"User","site_admin":false},"repo":{"id":115363049,"name":"OpenRA","full_name":"fruestueck/OpenRA","owner":{"login":"fruestueck","id":25386322,"avatar_url":"https://avatars3.githubusercontent.com/u/25386322?v=4","gravatar_id":"","url":"https://api.github.com/users/fruestueck","html_url":"https://github.com/fruestueck","followers_url":"https://api.github.com/users/fruestueck/followers","following_url":"https://api.github.com/users/fruestueck/following{/other_user}","gists_url":"https://api.github.com/users/fruestueck/gists{/gist_id}","starred_url":"https://api.github.com/users/fruestueck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fruestueck/subscriptions","organizations_url":"https://api.github.com/users/fruestueck/orgs","repos_url":"https://api.github.com/users/fruestueck/repos","events_url":"https://api.github.com/users/fruestueck/events{/privacy}","received_events_url":"https://api.github.com/users/fruestueck/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fruestueck/OpenRA","description":"Open Source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert written in C# using SDL and OpenGL. Runs on Windows, Linux, *BSD and Mac OS X.","fork":true,"url":"https://api.github.com/repos/fruestueck/OpenRA","forks_url":"https://api.github.com/repos/fruestueck/OpenRA/forks","keys_url":"https://api.github.com/repos/fruestueck/OpenRA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fruestueck/OpenRA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fruestueck/OpenRA/teams","hooks_url":"https://api.github.com/repos/fruestueck/OpenRA/hooks","issue_events_url":"https://api.github.com/repos/fruestueck/OpenRA/issues/events{/number}","events_url":"https://api.github.com/repos/fruestueck/OpenRA/events","assignees_url":"https://api.github.com/repos/fruestueck/OpenRA/assignees{/user}","branches_url":"https://api.github.com/repos/fruestueck/OpenRA/branches{/branch}","tags_url":"https://api.github.com/repos/fruestueck/OpenRA/tags","blobs_url":"https://api.github.com/repos/fruestueck/OpenRA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fruestueck/OpenRA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fruestueck/OpenRA/git/refs{/sha}","trees_url":"https://api.github.com/repos/fruestueck/OpenRA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fruestueck/OpenRA/statuses/{sha}","languages_url":"https://api.github.com/repos/fruestueck/OpenRA/languages","stargazers_url":"https://api.github.com/repos/fruestueck/OpenRA/stargazers","contributors_url":"https://api.github.com/repos/fruestueck/OpenRA/contributors","subscribers_url":"https://api.github.com/repos/fruestueck/OpenRA/subscribers","subscription_url":"https://api.github.com/repos/fruestueck/OpenRA/subscription","commits_url":"https://api.github.com/repos/fruestueck/OpenRA/commits{/sha}","git_commits_url":"https://api.github.com/repos/fruestueck/OpenRA/git/commits{/sha}","comments_url":"https://api.github.com/repos/fruestueck/OpenRA/comments{/number}","issue_comment_url":"https://api.github.com/repos/fruestueck/OpenRA/issues/comments{/number}","contents_url":"https://api.github.com/repos/fruestueck/OpenRA/contents/{+path}","compare_url":"https://api.github.com/repos/fruestueck/OpenRA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fruestueck/OpenRA/merges","archive_url":"https://api.github.com/repos/fruestueck/OpenRA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fruestueck/OpenRA/downloads","issues_url":"https://api.github.com/repos/fruestueck/OpenRA/issues{/number}","pulls_url":"https://api.github.com/repos/fruestueck/OpenRA/pulls{/number}","milestones_url":"https://api.github.com/repos/fruestueck/OpenRA/milestones{/number}","notifications_url":"https://api.github.com/repos/fruestueck/OpenRA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fruestueck/OpenRA/labels{/name}","releases_url":"https://api.github.com/repos/fruestueck/OpenRA/releases{/id}","deployments_url":"https://api.github.com/repos/fruestueck/OpenRA/deployments","created_at":"2017-12-25T21:04:52Z","updated_at":"2017-12-26T16:55:26Z","pushed_at":"2018-02-23T18:49:04Z","git_url":"git://github.com/fruestueck/OpenRA.git","ssh_url":"git@github.com:fruestueck/OpenRA.git","clone_url":"https://github.com/fruestueck/OpenRA.git","svn_url":"https://github.com/fruestueck/OpenRA","homepage":"http://www.openra.net","size":131763,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"bleed"}},"base":{"label":"OpenRA:bleed","ref":"bleed","sha":"93513db09e35641add462af6efa345dbce0e37d2","user":{"login":"OpenRA","id":409046,"avatar_url":"https://avatars0.githubusercontent.com/u/409046?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenRA","html_url":"https://github.com/OpenRA","followers_url":"https://api.github.com/users/OpenRA/followers","following_url":"https://api.github.com/users/OpenRA/following{/other_user}","gists_url":"https://api.github.com/users/OpenRA/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenRA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenRA/subscriptions","organizations_url":"https://api.github.com/users/OpenRA/orgs","repos_url":"https://api.github.com/users/OpenRA/repos","events_url":"https://api.github.com/users/OpenRA/events{/privacy}","received_events_url":"https://api.github.com/users/OpenRA/received_events","type":"Organization","site_admin":false},"repo":{"id":959908,"name":"OpenRA","full_name":"OpenRA/OpenRA","owner":{"login":"OpenRA","id":409046,"avatar_url":"https://avatars0.githubusercontent.com/u/409046?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenRA","html_url":"https://github.com/OpenRA","followers_url":"https://api.github.com/users/OpenRA/followers","following_url":"https://api.github.com/users/OpenRA/following{/other_user}","gists_url":"https://api.github.com/users/OpenRA/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenRA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenRA/subscriptions","organizations_url":"https://api.github.com/users/OpenRA/orgs","repos_url":"https://api.github.com/users/OpenRA/repos","events_url":"https://api.github.com/users/OpenRA/events{/privacy}","received_events_url":"https://api.github.com/users/OpenRA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenRA/OpenRA","description":"Open Source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert written in C# using SDL and OpenGL. Runs on Windows, Linux, *BSD and Mac OS X.","fork":false,"url":"https://api.github.com/repos/OpenRA/OpenRA","forks_url":"https://api.github.com/repos/OpenRA/OpenRA/forks","keys_url":"https://api.github.com/repos/OpenRA/OpenRA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenRA/OpenRA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenRA/OpenRA/teams","hooks_url":"https://api.github.com/repos/OpenRA/OpenRA/hooks","issue_events_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/events{/number}","events_url":"https://api.github.com/repos/OpenRA/OpenRA/events","assignees_url":"https://api.github.com/repos/OpenRA/OpenRA/assignees{/user}","branches_url":"https://api.github.com/repos/OpenRA/OpenRA/branches{/branch}","tags_url":"https://api.github.com/repos/OpenRA/OpenRA/tags","blobs_url":"https://api.github.com/repos/OpenRA/OpenRA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenRA/OpenRA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenRA/OpenRA/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenRA/OpenRA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenRA/OpenRA/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenRA/OpenRA/languages","stargazers_url":"https://api.github.com/repos/OpenRA/OpenRA/stargazers","contributors_url":"https://api.github.com/repos/OpenRA/OpenRA/contributors","subscribers_url":"https://api.github.com/repos/OpenRA/OpenRA/subscribers","subscription_url":"https://api.github.com/repos/OpenRA/OpenRA/subscription","commits_url":"https://api.github.com/repos/OpenRA/OpenRA/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenRA/OpenRA/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenRA/OpenRA/contents/{+path}","compare_url":"https://api.github.com/repos/OpenRA/OpenRA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenRA/OpenRA/merges","archive_url":"https://api.github.com/repos/OpenRA/OpenRA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenRA/OpenRA/downloads","issues_url":"https://api.github.com/repos/OpenRA/OpenRA/issues{/number}","pulls_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenRA/OpenRA/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenRA/OpenRA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenRA/OpenRA/labels{/name}","releases_url":"https://api.github.com/repos/OpenRA/OpenRA/releases{/id}","deployments_url":"https://api.github.com/repos/OpenRA/OpenRA/deployments","created_at":"2010-10-04T07:38:05Z","updated_at":"2018-02-23T15:25:26Z","pushed_at":"2018-02-23T18:49:07Z","git_url":"git://github.com/OpenRA/OpenRA.git","ssh_url":"git@github.com:OpenRA/OpenRA.git","clone_url":"https://github.com/OpenRA/OpenRA.git","svn_url":"https://github.com/OpenRA/OpenRA","homepage":"http://www.openra.net","size":131809,"stargazers_count":4966,"watchers_count":4966,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1468,"mirror_url":null,"archived":false,"open_issues_count":1429,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":1468,"open_issues":1429,"watchers":4966,"default_branch":"bleed"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/14850"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/14850"},"issue":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/14850"},"comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/14850/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/14850/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/14850/commits"},"statuses":{"href":"https://api.github.com/repos/OpenRA/OpenRA/statuses/6be51296ef6fcee91599e7dacb37ec930302576e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"abcdefg30"}}