{"action":"created","issue":{"url":"https://api.github.com/repos/Kitteh6660/Corruption-of-Champions-Mod/issues/368","repository_url":"https://api.github.com/repos/Kitteh6660/Corruption-of-Champions-Mod","labels_url":"https://api.github.com/repos/Kitteh6660/Corruption-of-Champions-Mod/issues/368/labels{/name}","comments_url":"https://api.github.com/repos/Kitteh6660/Corruption-of-Champions-Mod/issues/368/comments","events_url":"https://api.github.com/repos/Kitteh6660/Corruption-of-Champions-Mod/issues/368/events","html_url":"https://github.com/Kitteh6660/Corruption-of-Champions-Mod/pull/368","id":197840165,"number":368,"title":"BodyParts.Skin implementation","user":{"login":"Stadler76","id":13157984,"avatar_url":"https://avatars.githubusercontent.com/u/13157984?v=3","gravatar_id":"","url":"https://api.github.com/users/Stadler76","html_url":"https://github.com/Stadler76","followers_url":"https://api.github.com/users/Stadler76/followers","following_url":"https://api.github.com/users/Stadler76/following{/other_user}","gists_url":"https://api.github.com/users/Stadler76/gists{/gist_id}","starred_url":"https://api.github.com/users/Stadler76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stadler76/subscriptions","organizations_url":"https://api.github.com/users/Stadler76/orgs","repos_url":"https://api.github.com/users/Stadler76/repos","events_url":"https://api.github.com/users/Stadler76/events{/privacy}","received_events_url":"https://api.github.com/users/Stadler76/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-28T11:40:58Z","updated_at":"2016-12-29T01:04:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Kitteh6660/Corruption-of-Champions-Mod/pulls/368","html_url":"https://github.com/Kitteh6660/Corruption-of-Champions-Mod/pull/368","diff_url":"https://github.com/Kitteh6660/Corruption-of-Champions-Mod/pull/368.diff","patch_url":"https://github.com/Kitteh6660/Corruption-of-Champions-Mod/pull/368.patch"},"body":"### Gameplay changes\r\n**None!**\r\n\r\n### Internal changes\r\n- **Update:** Many TFs leave the skintone untouched and only reset the other values. Hence I've added `keepTone:Boolean = false` to `restore` and `setAllProps`\r\n- Added the container-class `classes.BodyParts.Skin` as a container for the skin-propertys and aliased the old values to the class-propertys for BC reasons\r\n\r\n  | Old (aliased) Property |    New Skin property   |\r\n  |------------------------|------------------------|\r\n  | `player.skinType`      | `player.skinData.type` |\r\n  | `player.skinTone`      | `player.skinData.tone` |\r\n  | `player.skinDesc`      | `player.skinData.desc` |\r\n  | `player.skinAdj`       | `player.skinData.adj`  |\r\n\r\n### Notes\r\n- Savegames are not affected yet, but I'd suggest, that the old save values are converted in favor of storing the new class-based approach, when 1.4 Final or a Beta- or RC-Version is released. Probably with bumping the modSaveVersion to 14.\r\n- I've tried to minimize the impact. So there shouldn't be any BC breaks.\r\n- The main reason for this is to use it in upcoming BodyParts-classes and to be able to set all of them at once, so its less likely, that you miss one of them.\r\n\r\n### Examples\r\nOne line:\r\n```as3\r\nplayer.skinData.setProps({type: SKIN_TYPE_DRAGON_SCALES, adj: \"tough\", desc: \"shield-shaped dragon scales\"});\r\n```\r\n\r\nMultiple lines:\r\n```as3\r\nplayer.skinData.setProps({\r\n\ttype: SKIN_TYPE_LIZARD_SCALES,\r\n\tadj: \"\",\r\n\tdesc: \"scales\"\r\n});\r\n```\r\n\r\nBoth examples leave the skintone (`player.skinData.tone`) untouched, since this is set elsewhere. If you have used `setAllProps` instead:\r\n```as3\r\nplayer.skinData.setAllProps({\r\n\ttype: SKIN_TYPE_LIZARD_SCALES,\r\n\tadj: \"\",\r\n\tdesc: \"scales\"\r\n});\r\n```\r\n... the skintone would be reset to its default in this example.\r\n\r\nYou can even set those values one by one:\r\n```as3\r\nplayer.skinData.type = SKIN_TYPE_LIZARD_SCALES;\r\nplayer.skinData.tone = \"green\";\r\nplayer.skinData.adj  = \"\";\r\nplayer.skinData.desc = \"scales\";\r\n```"},"comment":{"url":"https://api.github.com/repos/Kitteh6660/Corruption-of-Champions-Mod/issues/comments/269566239","html_url":"https://github.com/Kitteh6660/Corruption-of-Champions-Mod/pull/368#issuecomment-269566239","issue_url":"https://api.github.com/repos/Kitteh6660/Corruption-of-Champions-Mod/issues/368","id":269566239,"user":{"login":"Stadler76","id":13157984,"avatar_url":"https://avatars.githubusercontent.com/u/13157984?v=3","gravatar_id":"","url":"https://api.github.com/users/Stadler76","html_url":"https://github.com/Stadler76","followers_url":"https://api.github.com/users/Stadler76/followers","following_url":"https://api.github.com/users/Stadler76/following{/other_user}","gists_url":"https://api.github.com/users/Stadler76/gists{/gist_id}","starred_url":"https://api.github.com/users/Stadler76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stadler76/subscriptions","organizations_url":"https://api.github.com/users/Stadler76/orgs","repos_url":"https://api.github.com/users/Stadler76/repos","events_url":"https://api.github.com/users/Stadler76/events{/privacy}","received_events_url":"https://api.github.com/users/Stadler76/received_events","type":"User","site_admin":false},"created_at":"2016-12-29T01:04:54Z","updated_at":"2016-12-29T01:04:54Z","body":"**Update:** Many TFs leave the skintone untouched and only reset the other values. Hence I've added `keepTone:Boolean = false` to `restore` and `setAllProps`"}}
{"actor":{"display_login":"Stadler76"}}