{"action":"created","comment":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/30945516","id":30945516,"diff_hunk":"@@ -19,15 +19,48 @@ class CheckSequences : ILintPass\n \t{\n \t\tpublic void Run(Action<string> emitError, Action<string> emitWarning, Map map)\n \t\t{\n-\t\t\tvar sequences = MiniYaml.MergeLiberal(map.SequenceDefinitions, Game.ModData.Manifest.Sequences.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal));\n+\t\t\tvar sequenceDefinitions = MiniYaml.MergeLiberal(map.SequenceDefinitions,\n+\t\t\t\tGame.ModData.Manifest.Sequences.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal));\n \n \t\t\tforeach (var actorInfo in map.Rules.Actors)\n+\t\t\t{\n \t\t\t\tforeach (var renderInfo in actorInfo.Value.Traits.WithInterface<RenderSimpleInfo>())\n \t\t\t\t{\n \t\t\t\t\tvar image = renderInfo.Image ?? actorInfo.Value.Name;\n-\t\t\t\t\tif (!sequences.Any(s => s.Key == image.ToLowerInvariant()) && !actorInfo.Value.Name.Contains(\"^\"))\n+\t\t\t\t\tif (!sequenceDefinitions.Any(s => s.Key == image.ToLowerInvariant()) && !actorInfo.Value.Name.Contains(\"^\"))\n \t\t\t\t\t\temitWarning(\"Sprite image {0} from actor {1} has no sequence definition.\".F(image, actorInfo.Value.Name));\n \t\t\t\t}\n+\n+\t\t\t\tforeach (var traitInfo in actorInfo.Value.Traits.WithInterface<ITraitInfo>())\n+\t\t\t\t{\n+\t\t\t\t\tforeach (var field in traitInfo.GetType().GetFields())\n+\t\t\t\t\t{\n+\t\t\t\t\t\tif (field.HasAttribute<SequenceReferenceAttribute>())\n+\t\t\t\t\t\t{\n+\t\t\t\t\t\t\tvar sequences = LintExts.GetFieldValues(traitInfo, field, emitError);\n+\t\t\t\t\t\t\tforeach (var sequence in sequences)\n+\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\tif (string.IsNullOrEmpty(sequence))\n+\t\t\t\t\t\t\t\t\tcontinue;\n+\n+\t\t\t\t\t\t\t\tvar renderInfo = actorInfo.Value.Traits.WithInterface<RenderSpritesInfo>().FirstOrDefault();\n+\t\t\t\t\t\t\t\tif (renderInfo == null)\n+\t\t\t\t\t\t\t\t\tcontinue;\n+\n+\t\t\t\t\t\t\t\tvar image = renderInfo.GetImage(actorInfo.Value, map.SequenceProvider, null); // TODO: check all possible races","path":"OpenRA.Mods.Common/Lint/CheckSequences.cs","position":35,"original_position":34,"commit_id":"cc3b9c9b5fa93e2ba5d44e6b11e78c05b25644e7","original_commit_id":"38e992d5d1faca10c4254f350e12c225fb2e62e4","user":{"login":"Mailaender","id":756669,"avatar_url":"https://avatars.githubusercontent.com/u/756669?v=3","gravatar_id":"","url":"https://api.github.com/users/Mailaender","html_url":"https://github.com/Mailaender","followers_url":"https://api.github.com/users/Mailaender/followers","following_url":"https://api.github.com/users/Mailaender/following{/other_user}","gists_url":"https://api.github.com/users/Mailaender/gists{/gist_id}","starred_url":"https://api.github.com/users/Mailaender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mailaender/subscriptions","organizations_url":"https://api.github.com/users/Mailaender/orgs","repos_url":"https://api.github.com/users/Mailaender/repos","events_url":"https://api.github.com/users/Mailaender/events{/privacy}","received_events_url":"https://api.github.com/users/Mailaender/received_events","type":"User","site_admin":false},"body":"I now look up an image reference override so this won't need a hard-coded one anymore.","created_at":"2015-05-23T15:01:44Z","updated_at":"2015-05-23T15:01:44Z","html_url":"https://github.com/OpenRA/OpenRA/pull/7709#discussion_r30945516","pull_request_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7709","_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/30945516"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/7709#discussion_r30945516"},"pull_request":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7709"}}},"pull_request":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7709","id":31690529,"html_url":"https://github.com/OpenRA/OpenRA/pull/7709","diff_url":"https://github.com/OpenRA/OpenRA/pull/7709.diff","patch_url":"https://github.com/OpenRA/OpenRA/pull/7709.patch","issue_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/7709","number":7709,"state":"open","locked":false,"title":"Added checks for missing sequence entries","user":{"login":"Mailaender","id":756669,"avatar_url":"https://avatars.githubusercontent.com/u/756669?v=3","gravatar_id":"","url":"https://api.github.com/users/Mailaender","html_url":"https://github.com/Mailaender","followers_url":"https://api.github.com/users/Mailaender/followers","following_url":"https://api.github.com/users/Mailaender/following{/other_user}","gists_url":"https://api.github.com/users/Mailaender/gists{/gist_id}","starred_url":"https://api.github.com/users/Mailaender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mailaender/subscriptions","organizations_url":"https://api.github.com/users/Mailaender/orgs","repos_url":"https://api.github.com/users/Mailaender/repos","events_url":"https://api.github.com/users/Mailaender/events{/privacy}","received_events_url":"https://api.github.com/users/Mailaender/received_events","type":"User","site_admin":false},"body":"Closes #2283.\r\n\r\nI experienced two crashes recently: \r\n* The sietch not having make animations while testing #4496.\r\n* Deployed Tiberian Sun units not having death animations, a regression from https://github.com/OpenRA/OpenRA/pull/7687.\r\n\r\nI extended the rule to also cover sequence definition on the actor from all traits (including overlays) and discovered some more inconsistencies in seldom used units. Also took some effort to clean things up.","created_at":"2015-03-22T16:41:03Z","updated_at":"2015-05-23T15:01:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66aebe617fa9aa5cb605547011024a9ccaef2832","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7709/commits","review_comments_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7709/comments","review_comment_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/7709/comments","statuses_url":"https://api.github.com/repos/OpenRA/OpenRA/statuses/cc3b9c9b5fa93e2ba5d44e6b11e78c05b25644e7","head":{"label":"Mailaender:lint-sequences","ref":"lint-sequences","sha":"cc3b9c9b5fa93e2ba5d44e6b11e78c05b25644e7","user":{"login":"Mailaender","id":756669,"avatar_url":"https://avatars.githubusercontent.com/u/756669?v=3","gravatar_id":"","url":"https://api.github.com/users/Mailaender","html_url":"https://github.com/Mailaender","followers_url":"https://api.github.com/users/Mailaender/followers","following_url":"https://api.github.com/users/Mailaender/following{/other_user}","gists_url":"https://api.github.com/users/Mailaender/gists{/gist_id}","starred_url":"https://api.github.com/users/Mailaender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mailaender/subscriptions","organizations_url":"https://api.github.com/users/Mailaender/orgs","repos_url":"https://api.github.com/users/Mailaender/repos","events_url":"https://api.github.com/users/Mailaender/events{/privacy}","received_events_url":"https://api.github.com/users/Mailaender/received_events","type":"User","site_admin":false},"repo":{"id":3886414,"name":"OpenRA","full_name":"Mailaender/OpenRA","owner":{"login":"Mailaender","id":756669,"avatar_url":"https://avatars.githubusercontent.com/u/756669?v=3","gravatar_id":"","url":"https://api.github.com/users/Mailaender","html_url":"https://github.com/Mailaender","followers_url":"https://api.github.com/users/Mailaender/followers","following_url":"https://api.github.com/users/Mailaender/following{/other_user}","gists_url":"https://api.github.com/users/Mailaender/gists{/gist_id}","starred_url":"https://api.github.com/users/Mailaender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mailaender/subscriptions","organizations_url":"https://api.github.com/users/Mailaender/orgs","repos_url":"https://api.github.com/users/Mailaender/repos","events_url":"https://api.github.com/users/Mailaender/events{/privacy}","received_events_url":"https://api.github.com/users/Mailaender/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mailaender/OpenRA","description":"An open-source implementation of the Red Alert engine using .NET/mono and OpenGL. Runs on Windows, Linux and OSX.","fork":true,"url":"https://api.github.com/repos/Mailaender/OpenRA","forks_url":"https://api.github.com/repos/Mailaender/OpenRA/forks","keys_url":"https://api.github.com/repos/Mailaender/OpenRA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mailaender/OpenRA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mailaender/OpenRA/teams","hooks_url":"https://api.github.com/repos/Mailaender/OpenRA/hooks","issue_events_url":"https://api.github.com/repos/Mailaender/OpenRA/issues/events{/number}","events_url":"https://api.github.com/repos/Mailaender/OpenRA/events","assignees_url":"https://api.github.com/repos/Mailaender/OpenRA/assignees{/user}","branches_url":"https://api.github.com/repos/Mailaender/OpenRA/branches{/branch}","tags_url":"https://api.github.com/repos/Mailaender/OpenRA/tags","blobs_url":"https://api.github.com/repos/Mailaender/OpenRA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mailaender/OpenRA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mailaender/OpenRA/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mailaender/OpenRA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mailaender/OpenRA/statuses/{sha}","languages_url":"https://api.github.com/repos/Mailaender/OpenRA/languages","stargazers_url":"https://api.github.com/repos/Mailaender/OpenRA/stargazers","contributors_url":"https://api.github.com/repos/Mailaender/OpenRA/contributors","subscribers_url":"https://api.github.com/repos/Mailaender/OpenRA/subscribers","subscription_url":"https://api.github.com/repos/Mailaender/OpenRA/subscription","commits_url":"https://api.github.com/repos/Mailaender/OpenRA/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mailaender/OpenRA/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mailaender/OpenRA/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mailaender/OpenRA/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mailaender/OpenRA/contents/{+path}","compare_url":"https://api.github.com/repos/Mailaender/OpenRA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mailaender/OpenRA/merges","archive_url":"https://api.github.com/repos/Mailaender/OpenRA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mailaender/OpenRA/downloads","issues_url":"https://api.github.com/repos/Mailaender/OpenRA/issues{/number}","pulls_url":"https://api.github.com/repos/Mailaender/OpenRA/pulls{/number}","milestones_url":"https://api.github.com/repos/Mailaender/OpenRA/milestones{/number}","notifications_url":"https://api.github.com/repos/Mailaender/OpenRA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mailaender/OpenRA/labels{/name}","releases_url":"https://api.github.com/repos/Mailaender/OpenRA/releases{/id}","created_at":"2012-03-31T15:36:43Z","updated_at":"2014-12-20T08:50:16Z","pushed_at":"2015-05-23T15:00:48Z","git_url":"git://github.com/Mailaender/OpenRA.git","ssh_url":"git@github.com:Mailaender/OpenRA.git","clone_url":"https://github.com/Mailaender/OpenRA.git","svn_url":"https://github.com/Mailaender/OpenRA","homepage":"http://www.openra.net","size":124439,"stargazers_count":6,"watchers_count":6,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":0,"forks":4,"open_issues":0,"watchers":6,"default_branch":"bleed"}},"base":{"label":"OpenRA:bleed","ref":"bleed","sha":"78f1e9fb2fc0518f2e21555dd7b14cf153e48ba6","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-05-23T11:01:15Z","pushed_at":"2015-05-23T15:00:50Z","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":176723,"stargazers_count":1920,"watchers_count":1920,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":689,"mirror_url":null,"open_issues_count":810,"forks":689,"open_issues":810,"watchers":1920,"default_branch":"bleed"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7709"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/7709"},"issue":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/7709"},"comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/7709/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7709/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7709/commits"},"statuses":{"href":"https://api.github.com/repos/OpenRA/OpenRA/statuses/cc3b9c9b5fa93e2ba5d44e6b11e78c05b25644e7"}}}}