{"action":"created","issue":{"url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9356","labels_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9356/labels{/name}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9356/comments","events_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9356/events","html_url":"https://github.com/OpenRA/OpenRA/pull/9356","id":106694586,"number":9356,"title":"Remove redundant IBodyOrientation[Info] & replace with BodyOrientation[Info]","user":{"login":"atlimit8","id":4957137,"avatar_url":"https://avatars.githubusercontent.com/u/4957137?v=3","gravatar_id":"","url":"https://api.github.com/users/atlimit8","html_url":"https://github.com/atlimit8","followers_url":"https://api.github.com/users/atlimit8/followers","following_url":"https://api.github.com/users/atlimit8/following{/other_user}","gists_url":"https://api.github.com/users/atlimit8/gists{/gist_id}","starred_url":"https://api.github.com/users/atlimit8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atlimit8/subscriptions","organizations_url":"https://api.github.com/users/atlimit8/orgs","repos_url":"https://api.github.com/users/atlimit8/repos","events_url":"https://api.github.com/users/atlimit8/events{/privacy}","received_events_url":"https://api.github.com/users/atlimit8/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenRA/OpenRA/labels/PR:%20Needs%20+2","name":"PR: Needs +2","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-16T04:05:15Z","updated_at":"2015-09-17T23:11:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/9356","html_url":"https://github.com/OpenRA/OpenRA/pull/9356","diff_url":"https://github.com/OpenRA/OpenRA/pull/9356.diff","patch_url":"https://github.com/OpenRA/OpenRA/pull/9356.patch"},"body":"`BodyOrientation[Info]` is the only implementation of `IBodyOrientation[Info]`. Having the redundant interfaces provides inconsistent code (currently uses both to do the same thing). That also has the effect of making `TraitDictionary` keep two identical pairs of lists for the `BodyOrientation` traits and their actors.\r\nI found 9 info classes with `var body = init.Actor.Traits.Get<BodyOrientationInfo>();` in a preview render method:\r\n```c#\r\nRenderVoxels\r\n\tRenderPreview(ActorPreviewInitializer init)\r\n\r\nWithBarrelInfo\r\n\tRenderPreviewSprites(ActorPreviewInitializer init, RenderSpritesInfo rs, string image, int facings, PaletteReference p)\r\n\r\nWithIdleOverlayInfo\r\n\tRenderPreviewSprites(ActorPreviewInitializer init, RenderSpritesInfo rs, string image, int facings, PaletteReference p)\r\n\r\nWithParachuteInfo\r\n\tRenderPreviewSprites(ActorPreviewInitializer init, RenderSpritesInfo rs, string image, int facings, PaletteReference p)\r\n\r\nWithRotorInfo\r\n\tRenderPreviewSprites(ActorPreviewInitializer init, RenderSpritesInfo rs, string image, int facings, PaletteReference p)\r\n\r\nWithTurretInfo\r\n\tRenderPreviewSprites(ActorPreviewInitializer init, RenderSpritesInfo rs, string image, int facings, PaletteReference p)\r\n\r\nWithVoxelBodyInfo\r\n\tRenderPreviewVoxels(ActorPreviewInitializer init, RenderVoxelsInfo rv, string image, WRot orientation, int facings, PaletteReference p)\r\n\r\nWithVoxelTurretInfo\r\n\tRenderPreviewVoxels(ActorPreviewInitializer init, RenderVoxelsInfo rv, string image, WRot orientation, int facings, PaletteReference p)\r\n\r\nWithVoxelUnloadBodyInfo\r\n\tRenderPreviewVoxels(ActorPreviewInitializer init, RenderVoxelsInfo rv, string image, WRot orientation, int facings, PaletteReference p)\r\n```\r\n`WithVoxel*Info` use `RenderVoxelsInfo` which had `Requires<IBodyOrientationInfo>`."},"comment":{"url":"https://api.github.com/repos/OpenRA/OpenRA/issues/comments/141266001","html_url":"https://github.com/OpenRA/OpenRA/pull/9356#issuecomment-141266001","issue_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/9356","id":141266001,"user":{"login":"reaperrr","id":2857877,"avatar_url":"https://avatars.githubusercontent.com/u/2857877?v=3","gravatar_id":"","url":"https://api.github.com/users/reaperrr","html_url":"https://github.com/reaperrr","followers_url":"https://api.github.com/users/reaperrr/followers","following_url":"https://api.github.com/users/reaperrr/following{/other_user}","gists_url":"https://api.github.com/users/reaperrr/gists{/gist_id}","starred_url":"https://api.github.com/users/reaperrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reaperrr/subscriptions","organizations_url":"https://api.github.com/users/reaperrr/orgs","repos_url":"https://api.github.com/users/reaperrr/repos","events_url":"https://api.github.com/users/reaperrr/events{/privacy}","received_events_url":"https://api.github.com/users/reaperrr/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T23:11:50Z","updated_at":"2015-09-17T23:11:50Z","body":":+1: "}}