{"action":"created","comment":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/26448676","id":26448676,"diff_hunk":"@@ -0,0 +1,71 @@\n+﻿#region Copyright & License Information\n+/*\n+ * Copyright 2007-2015 The OpenRA Developers (see AUTHORS)\n+ * This file is part of OpenRA, which is free software. It is made\n+ * available to you under the terms of the GNU General Public License\n+ * as published by the Free Software Foundation. For more information,\n+ * see COPYING.\n+ */\n+#endregion\n+\n+using System;\n+using System.Collections.Generic;\n+using OpenRA.Mods.Common.Orders;\n+using OpenRA.Traits;\n+\n+namespace OpenRA.Mods.Common.Traits\n+{\n+\tpublic class DeployToUpgradeInfo : ITraitInfo, Requires<UpgradeManagerInfo>\n+\t{\n+\t\t[Desc(\"The upgrades to grant when deploying and revoke when undeploying.\")]\n+\t\tpublic readonly string[] Upgrades = { };\n+\n+\t\t[Desc(\"Cursor to display when deploying the actor.\")]\n+\t\tpublic readonly string Cursor = \"deploy\";\n+\n+\t\tpublic object Create(ActorInitializer init) { return new DeployToUpgrade(init.Self, this); }\n+\t}\n+\n+\tpublic class DeployToUpgrade : IResolveOrder, IIssueOrder\n+\t{\n+\t\treadonly DeployToUpgradeInfo info;\n+\t\treadonly UpgradeManager manager;\n+\n+\t\tbool isUpgraded;\n+\n+\t\tpublic DeployToUpgrade(Actor self, DeployToUpgradeInfo info)\n+\t\t{\n+\t\t\tthis.info = info;\n+\t\t\tmanager = self.Trait<UpgradeManager>();\n+\t\t}\n+\n+\t\tpublic IEnumerable<IOrderTargeter> Orders\n+\t\t{\n+\t\t\tget { yield return new DeployOrderTargeter(\"DeployUpgrade\", 5, info.Cursor); }\n+\t\t}\n+\n+\t\tpublic Order IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued)\n+\t\t{\n+\t\t\tif (order.OrderID == \"DeployUpgrade\")\n+\t\t\t\treturn new Order(order.OrderID, self, queued);\n+\n+\t\t\treturn null;\n+\t\t}\n+\n+\t\tpublic void ResolveOrder(Actor self, Order order)\n+\t\t{\n+\t\t\t// DeployTransform is necessary to use the DeployKey (F)","path":"OpenRA.Mods.Common/Traits/Upgrades/DeployToUpgrade.cs","position":57,"original_position":57,"commit_id":"4d02faa994820db035cc99fad2e2dd773619f37b","original_commit_id":"4d02faa994820db035cc99fad2e2dd773619f37b","user":{"login":"Phrohdoh","id":4861023,"avatar_url":"https://avatars.githubusercontent.com/u/4861023?v=3","gravatar_id":"","url":"https://api.github.com/users/Phrohdoh","html_url":"https://github.com/Phrohdoh","followers_url":"https://api.github.com/users/Phrohdoh/followers","following_url":"https://api.github.com/users/Phrohdoh/following{/other_user}","gists_url":"https://api.github.com/users/Phrohdoh/gists{/gist_id}","starred_url":"https://api.github.com/users/Phrohdoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phrohdoh/subscriptions","organizations_url":"https://api.github.com/users/Phrohdoh/orgs","repos_url":"https://api.github.com/users/Phrohdoh/repos","events_url":"https://api.github.com/users/Phrohdoh/events{/privacy}","received_events_url":"https://api.github.com/users/Phrohdoh/received_events","type":"User","site_admin":false},"body":"This has been requested before and my answer was no, that is adding more to a hack that already exist, which I won't do.","created_at":"2015-03-15T15:21:54Z","updated_at":"2015-03-15T15:21:54Z","html_url":"https://github.com/OpenRA/OpenRA/pull/7653#discussion_r26448676","pull_request_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7653","_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/26448676"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/7653#discussion_r26448676"},"pull_request":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7653"}}},"pull_request":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7653","id":31046435,"html_url":"https://github.com/OpenRA/OpenRA/pull/7653","diff_url":"https://github.com/OpenRA/OpenRA/pull/7653.diff","patch_url":"https://github.com/OpenRA/OpenRA/pull/7653.patch","issue_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/7653","number":7653,"state":"open","locked":false,"title":"Implement DeployToUpgrade.","user":{"login":"Phrohdoh","id":4861023,"avatar_url":"https://avatars.githubusercontent.com/u/4861023?v=3","gravatar_id":"","url":"https://api.github.com/users/Phrohdoh","html_url":"https://github.com/Phrohdoh","followers_url":"https://api.github.com/users/Phrohdoh/followers","following_url":"https://api.github.com/users/Phrohdoh/following{/other_user}","gists_url":"https://api.github.com/users/Phrohdoh/gists{/gist_id}","starred_url":"https://api.github.com/users/Phrohdoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phrohdoh/subscriptions","organizations_url":"https://api.github.com/users/Phrohdoh/orgs","repos_url":"https://api.github.com/users/Phrohdoh/repos","events_url":"https://api.github.com/users/Phrohdoh/events{/privacy}","received_events_url":"https://api.github.com/users/Phrohdoh/received_events","type":"User","site_admin":false},"body":"Will be useful once #7638 is merged.\r\n\r\n**Uses**:\r\n* RA2 GI\r\n* TS Nod Artillery (and later GDI Juggernaut) assuming we don't transform them into structures in the same way vanilla TS did\r\n* D2k Thumper","created_at":"2015-03-12T15:25:37Z","updated_at":"2015-03-15T15:21:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d01108b256580412455fe8b40d83d7a72401b59","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7653/commits","review_comments_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7653/comments","review_comment_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/7653/comments","statuses_url":"https://api.github.com/repos/OpenRA/OpenRA/statuses/4d02faa994820db035cc99fad2e2dd773619f37b","head":{"label":"Phrohdoh:deploy-to-upgrade","ref":"deploy-to-upgrade","sha":"4d02faa994820db035cc99fad2e2dd773619f37b","user":{"login":"Phrohdoh","id":4861023,"avatar_url":"https://avatars.githubusercontent.com/u/4861023?v=3","gravatar_id":"","url":"https://api.github.com/users/Phrohdoh","html_url":"https://github.com/Phrohdoh","followers_url":"https://api.github.com/users/Phrohdoh/followers","following_url":"https://api.github.com/users/Phrohdoh/following{/other_user}","gists_url":"https://api.github.com/users/Phrohdoh/gists{/gist_id}","starred_url":"https://api.github.com/users/Phrohdoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phrohdoh/subscriptions","organizations_url":"https://api.github.com/users/Phrohdoh/orgs","repos_url":"https://api.github.com/users/Phrohdoh/repos","events_url":"https://api.github.com/users/Phrohdoh/events{/privacy}","received_events_url":"https://api.github.com/users/Phrohdoh/received_events","type":"User","site_admin":false},"repo":{"id":13488231,"name":"OpenRA","full_name":"Phrohdoh/OpenRA","owner":{"login":"Phrohdoh","id":4861023,"avatar_url":"https://avatars.githubusercontent.com/u/4861023?v=3","gravatar_id":"","url":"https://api.github.com/users/Phrohdoh","html_url":"https://github.com/Phrohdoh","followers_url":"https://api.github.com/users/Phrohdoh/followers","following_url":"https://api.github.com/users/Phrohdoh/following{/other_user}","gists_url":"https://api.github.com/users/Phrohdoh/gists{/gist_id}","starred_url":"https://api.github.com/users/Phrohdoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phrohdoh/subscriptions","organizations_url":"https://api.github.com/users/Phrohdoh/orgs","repos_url":"https://api.github.com/users/Phrohdoh/repos","events_url":"https://api.github.com/users/Phrohdoh/events{/privacy}","received_events_url":"https://api.github.com/users/Phrohdoh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Phrohdoh/OpenRA","description":"OpenRA Contributions","fork":true,"url":"https://api.github.com/repos/Phrohdoh/OpenRA","forks_url":"https://api.github.com/repos/Phrohdoh/OpenRA/forks","keys_url":"https://api.github.com/repos/Phrohdoh/OpenRA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Phrohdoh/OpenRA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Phrohdoh/OpenRA/teams","hooks_url":"https://api.github.com/repos/Phrohdoh/OpenRA/hooks","issue_events_url":"https://api.github.com/repos/Phrohdoh/OpenRA/issues/events{/number}","events_url":"https://api.github.com/repos/Phrohdoh/OpenRA/events","assignees_url":"https://api.github.com/repos/Phrohdoh/OpenRA/assignees{/user}","branches_url":"https://api.github.com/repos/Phrohdoh/OpenRA/branches{/branch}","tags_url":"https://api.github.com/repos/Phrohdoh/OpenRA/tags","blobs_url":"https://api.github.com/repos/Phrohdoh/OpenRA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Phrohdoh/OpenRA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Phrohdoh/OpenRA/git/refs{/sha}","trees_url":"https://api.github.com/repos/Phrohdoh/OpenRA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Phrohdoh/OpenRA/statuses/{sha}","languages_url":"https://api.github.com/repos/Phrohdoh/OpenRA/languages","stargazers_url":"https://api.github.com/repos/Phrohdoh/OpenRA/stargazers","contributors_url":"https://api.github.com/repos/Phrohdoh/OpenRA/contributors","subscribers_url":"https://api.github.com/repos/Phrohdoh/OpenRA/subscribers","subscription_url":"https://api.github.com/repos/Phrohdoh/OpenRA/subscription","commits_url":"https://api.github.com/repos/Phrohdoh/OpenRA/commits{/sha}","git_commits_url":"https://api.github.com/repos/Phrohdoh/OpenRA/git/commits{/sha}","comments_url":"https://api.github.com/repos/Phrohdoh/OpenRA/comments{/number}","issue_comment_url":"https://api.github.com/repos/Phrohdoh/OpenRA/issues/comments{/number}","contents_url":"https://api.github.com/repos/Phrohdoh/OpenRA/contents/{+path}","compare_url":"https://api.github.com/repos/Phrohdoh/OpenRA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Phrohdoh/OpenRA/merges","archive_url":"https://api.github.com/repos/Phrohdoh/OpenRA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Phrohdoh/OpenRA/downloads","issues_url":"https://api.github.com/repos/Phrohdoh/OpenRA/issues{/number}","pulls_url":"https://api.github.com/repos/Phrohdoh/OpenRA/pulls{/number}","milestones_url":"https://api.github.com/repos/Phrohdoh/OpenRA/milestones{/number}","notifications_url":"https://api.github.com/repos/Phrohdoh/OpenRA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Phrohdoh/OpenRA/labels{/name}","releases_url":"https://api.github.com/repos/Phrohdoh/OpenRA/releases{/id}","created_at":"2013-10-11T02:38:22Z","updated_at":"2015-03-12T21:11:27Z","pushed_at":"2015-03-15T04:14:00Z","git_url":"git://github.com/Phrohdoh/OpenRA.git","ssh_url":"git@github.com:Phrohdoh/OpenRA.git","clone_url":"https://github.com/Phrohdoh/OpenRA.git","svn_url":"https://github.com/Phrohdoh/OpenRA","homepage":"","size":88289,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"bleed"}},"base":{"label":"OpenRA:bleed","ref":"bleed","sha":"9a66fc73825bd48f4647046ab18b7ba1fd63a9b0","user":{"login":"OpenRA","id":409046,"avatar_url":"https://avatars.githubusercontent.com/u/409046?v=3","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://avatars.githubusercontent.com/u/409046?v=3","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":"An open-source implementation of the Command & Conquer: Red Alert engine using .NET/Mono and OpenGL. Runs on Windows, Linux 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}","created_at":"2010-10-04T07:38:05Z","updated_at":"2015-03-15T15:15:02Z","pushed_at":"2015-03-15T15:15:01Z","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":162578,"stargazers_count":1780,"watchers_count":1780,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":642,"mirror_url":null,"open_issues_count":729,"forks":642,"open_issues":729,"watchers":1780,"default_branch":"bleed"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7653"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/7653"},"issue":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/7653"},"comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/7653/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7653/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7653/commits"},"statuses":{"href":"https://api.github.com/repos/OpenRA/OpenRA/statuses/4d02faa994820db035cc99fad2e2dd773619f37b"}}}}