{"action":"created","comment":{"url":"https://api.github.com/repos/tgstation/tgstation/pulls/comments/201209383","pull_request_review_id":135664543,"id":201209383,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTIwOTM4Mw==","diff_hunk":"@@ -1749,3 +1749,103 @@ All effects don't start immediately, but rather get worse over time; the rate is\n \t\tM.adjustStaminaLoss(35)\n \t\t. = TRUE\n \t..()\n+\n+/datum/reagent/consumable/ethanol/fruit_wine\n+\tname = \"Fruit Wine\"\n+\tid = \"fruit_wine\"\n+\tdescription = \"A wine made from grown plants.\"\n+\tcolor = \"#FFFFFF\"\n+\tboozepwr = 35\n+\ttaste_description = \"bad coding\"\n+\tvar/list/names = list(\"null fruit\" = 1) //Names of the fruits used. Associative list where name is key, value is the percentage of that fruit.\n+\tvar/list/tastes = list(\"bad coding\" = 1) //List of tastes. See above.\n+\tcan_synth = FALSE\n+\n+/datum/reagent/consumable/ethanol/fruit_wine/on_new(list/data)\n+\tnames = data[\"names\"]\n+\ttastes = data[\"tastes\"]\n+\tboozepwr = data[\"boozepwr\"]\n+\tcolor = data[\"color\"]\n+\tgenerate_data_info(data)\n+\n+/datum/reagent/consumable/ethanol/fruit_wine/on_merge(list/data, amount)\n+\tvar/diff = (amount/volume)\n+\tif(diff < 1)\n+\t\tcolor = BlendRGB(color, data[\"color\"], diff/2) //The percentage difference over two, so that they take average if equal.\n+\telse\n+\t\tcolor = BlendRGB(color, data[\"color\"], (1/diff)/2) //Adjust so it's always blending properly.\n+\tvar/oldvolume = volume-amount\n+\n+\tvar/list/cachednames = data[\"names\"]\n+\tfor(var/name in names | cachednames)\n+\t\tnames[name] = ((names[name] * oldvolume) + (cachednames[name] * amount)) / volume\n+\n+\tvar/list/cachedtastes = data[\"tastes\"]\n+\tfor(var/taste in tastes | cachedtastes)\n+\t\ttastes[taste] = ((tastes[taste] * oldvolume) + (cachedtastes[taste] * amount)) / volume\n+\n+\tboozepwr *= oldvolume\n+\tvar/newzepwr = data[\"boozepwr\"] * amount\n+\tboozepwr += newzepwr\n+\tboozepwr /= volume //Blending boozepwr to volume.\n+\tgenerate_data_info(data)\n+\n+/datum/reagent/consumable/ethanol/fruit_wine/proc/generate_data_info(list/data)\n+\tvar/minimum_percent = 0.15 //Percentages measured between 0 and 1.\n+\tvar/list/primary_tastes = list()\n+\tvar/list/secondary_tastes = list()\n+\tglass_name = \"glass of [name]\"\n+\tglass_desc = description\n+\tfor(var/taste in tastes)\n+\t\tif(tastes[taste] < minimum_percent)\n+\t\t\tcontinue\n+\t\tif(tastes[taste] >= minimum_percent*2)\n+\t\t\tprimary_tastes += taste\n+\t\telse if(tastes[taste] >= minimum_percent)","path":"code/modules/reagents/chemistry/reagents/alcohol_reagents.dm","position":56,"original_position":56,"commit_id":"0adbca4b7de6068daa120ccc30daac26aee4bfe5","original_commit_id":"0adbca4b7de6068daa120ccc30daac26aee4bfe5","user":{"login":"ninjanomnom","id":1234602,"node_id":"MDQ6VXNlcjEyMzQ2MDI=","avatar_url":"https://avatars3.githubusercontent.com/u/1234602?v=4","gravatar_id":"","url":"https://api.github.com/users/ninjanomnom","html_url":"https://github.com/ninjanomnom","followers_url":"https://api.github.com/users/ninjanomnom/followers","following_url":"https://api.github.com/users/ninjanomnom/following{/other_user}","gists_url":"https://api.github.com/users/ninjanomnom/gists{/gist_id}","starred_url":"https://api.github.com/users/ninjanomnom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninjanomnom/subscriptions","organizations_url":"https://api.github.com/users/ninjanomnom/orgs","repos_url":"https://api.github.com/users/ninjanomnom/repos","events_url":"https://api.github.com/users/ninjanomnom/events{/privacy}","received_events_url":"https://api.github.com/users/ninjanomnom/received_events","type":"User","site_admin":false},"body":"Use a `switch()`","created_at":"2018-07-10T03:37:37Z","updated_at":"2018-07-10T03:40:38Z","html_url":"https://github.com/tgstation/tgstation/pull/38977#discussion_r201209383","pull_request_url":"https://api.github.com/repos/tgstation/tgstation/pulls/38977","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/tgstation/tgstation/pulls/comments/201209383"},"html":{"href":"https://github.com/tgstation/tgstation/pull/38977#discussion_r201209383"},"pull_request":{"href":"https://api.github.com/repos/tgstation/tgstation/pulls/38977"}}},"pull_request":{"url":"https://api.github.com/repos/tgstation/tgstation/pulls/38977","id":199919507,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5OTE5NTA3","html_url":"https://github.com/tgstation/tgstation/pull/38977","diff_url":"https://github.com/tgstation/tgstation/pull/38977.diff","patch_url":"https://github.com/tgstation/tgstation/pull/38977.patch","issue_url":"https://api.github.com/repos/tgstation/tgstation/issues/38977","number":38977,"state":"open","locked":false,"title":"[Ready] Fermentation Barrels","user":{"login":"fludd12","id":11167153,"node_id":"MDQ6VXNlcjExMTY3MTUz","avatar_url":"https://avatars1.githubusercontent.com/u/11167153?v=4","gravatar_id":"","url":"https://api.github.com/users/fludd12","html_url":"https://github.com/fludd12","followers_url":"https://api.github.com/users/fludd12/followers","following_url":"https://api.github.com/users/fludd12/following{/other_user}","gists_url":"https://api.github.com/users/fludd12/gists{/gist_id}","starred_url":"https://api.github.com/users/fludd12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fludd12/subscriptions","organizations_url":"https://api.github.com/users/fludd12/orgs","repos_url":"https://api.github.com/users/fludd12/repos","events_url":"https://api.github.com/users/fludd12/events{/privacy}","received_events_url":"https://api.github.com/users/fludd12/received_events","type":"User","site_admin":false},"body":":cl:Fel\r\nadd: You can now craft wooden barrels with 30 pieces of wood! They can hold up to 300u of reagents.\r\nadd: Putting hydroponics-grown plants into the barrel lets you ferment them for alcohol! Some give bar drinks, while others simply give plain fruit wine.\r\n/:cl:\r\n\r\n- [x] ~~Figure out why wines sometimes change into other wines if they're in the same container.~~\r\n- [x] ~~Figure out why transferring wines spontaneously removes a quantity of them from existence sometimes.~~\r\n    - ~~`trans_to` calls `remove_reagent` which uses only ID to determine what to remove. Since all generic wines share the same ID, this removes that amount of reagent from all wines, and only adds the amount subtracted from one.~~\r\n    - [x] ~~Find a way to make this stop happening.~~\r\n        - I've opted to instead make the reagents merge and mix flavors and boozepower, rather than have them stay separate with the same ID. Not only does this clear up a lot of bad code, but it makes working with it easier. The only problem is it's not as fancy. Sorry, everyone!\r\n- [x] Balance? Sounds?\r\n- [x] Figure out why reagent data is being lost at times.\r\n- [x] Figure out why variable generation from data isn't perfect. (Naming is off, flavors repeat themselves...)\r\n- [x] Make the sprite prettier.\r\n\r\n**Done!**\r\n\r\nSprite from Onule and a few others! Thanks, guys!\r\n\r\nAnyway, ready for review, and balance suggestions!","created_at":"2018-07-08T00:37:22Z","updated_at":"2018-07-10T03:40:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78d00e2c16e4cb514d237e45571a33a64ff26215","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ShizCalev","id":6209658,"node_id":"MDQ6VXNlcjYyMDk2NTg=","avatar_url":"https://avatars2.githubusercontent.com/u/6209658?v=4","gravatar_id":"","url":"https://api.github.com/users/ShizCalev","html_url":"https://github.com/ShizCalev","followers_url":"https://api.github.com/users/ShizCalev/followers","following_url":"https://api.github.com/users/ShizCalev/following{/other_user}","gists_url":"https://api.github.com/users/ShizCalev/gists{/gist_id}","starred_url":"https://api.github.com/users/ShizCalev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShizCalev/subscriptions","organizations_url":"https://api.github.com/users/ShizCalev/orgs","repos_url":"https://api.github.com/users/ShizCalev/repos","events_url":"https://api.github.com/users/ShizCalev/events{/privacy}","received_events_url":"https://api.github.com/users/ShizCalev/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":149581322,"node_id":"MDU6TGFiZWwxNDk1ODEzMjI=","url":"https://api.github.com/repos/tgstation/tgstation/labels/Feature","name":"Feature","color":"009800","default":false},{"id":260619936,"node_id":"MDU6TGFiZWwyNjA2MTk5MzY=","url":"https://api.github.com/repos/tgstation/tgstation/labels/Needs%20Review","name":"Needs Review","color":"ffdfa2","default":false},{"id":31457996,"node_id":"MDU6TGFiZWwzMTQ1Nzk5Ng==","url":"https://api.github.com/repos/tgstation/tgstation/labels/Sprites","name":"Sprites","color":"5ECCD1","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/tgstation/tgstation/pulls/38977/commits","review_comments_url":"https://api.github.com/repos/tgstation/tgstation/pulls/38977/comments","review_comment_url":"https://api.github.com/repos/tgstation/tgstation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tgstation/tgstation/issues/38977/comments","statuses_url":"https://api.github.com/repos/tgstation/tgstation/statuses/0adbca4b7de6068daa120ccc30daac26aee4bfe5","head":{"label":"fludd12:joja-corp-eat-your-heart-out","ref":"joja-corp-eat-your-heart-out","sha":"0adbca4b7de6068daa120ccc30daac26aee4bfe5","user":{"login":"fludd12","id":11167153,"node_id":"MDQ6VXNlcjExMTY3MTUz","avatar_url":"https://avatars1.githubusercontent.com/u/11167153?v=4","gravatar_id":"","url":"https://api.github.com/users/fludd12","html_url":"https://github.com/fludd12","followers_url":"https://api.github.com/users/fludd12/followers","following_url":"https://api.github.com/users/fludd12/following{/other_user}","gists_url":"https://api.github.com/users/fludd12/gists{/gist_id}","starred_url":"https://api.github.com/users/fludd12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fludd12/subscriptions","organizations_url":"https://api.github.com/users/fludd12/orgs","repos_url":"https://api.github.com/users/fludd12/repos","events_url":"https://api.github.com/users/fludd12/events{/privacy}","received_events_url":"https://api.github.com/users/fludd12/received_events","type":"User","site_admin":false},"repo":{"id":121803740,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE4MDM3NDA=","name":"tgstation","full_name":"fludd12/tgstation","owner":{"login":"fludd12","id":11167153,"node_id":"MDQ6VXNlcjExMTY3MTUz","avatar_url":"https://avatars1.githubusercontent.com/u/11167153?v=4","gravatar_id":"","url":"https://api.github.com/users/fludd12","html_url":"https://github.com/fludd12","followers_url":"https://api.github.com/users/fludd12/followers","following_url":"https://api.github.com/users/fludd12/following{/other_user}","gists_url":"https://api.github.com/users/fludd12/gists{/gist_id}","starred_url":"https://api.github.com/users/fludd12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fludd12/subscriptions","organizations_url":"https://api.github.com/users/fludd12/orgs","repos_url":"https://api.github.com/users/fludd12/repos","events_url":"https://api.github.com/users/fludd12/events{/privacy}","received_events_url":"https://api.github.com/users/fludd12/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fludd12/tgstation","description":"the /tg/station branch of SS13","fork":true,"url":"https://api.github.com/repos/fludd12/tgstation","forks_url":"https://api.github.com/repos/fludd12/tgstation/forks","keys_url":"https://api.github.com/repos/fludd12/tgstation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fludd12/tgstation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fludd12/tgstation/teams","hooks_url":"https://api.github.com/repos/fludd12/tgstation/hooks","issue_events_url":"https://api.github.com/repos/fludd12/tgstation/issues/events{/number}","events_url":"https://api.github.com/repos/fludd12/tgstation/events","assignees_url":"https://api.github.com/repos/fludd12/tgstation/assignees{/user}","branches_url":"https://api.github.com/repos/fludd12/tgstation/branches{/branch}","tags_url":"https://api.github.com/repos/fludd12/tgstation/tags","blobs_url":"https://api.github.com/repos/fludd12/tgstation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fludd12/tgstation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fludd12/tgstation/git/refs{/sha}","trees_url":"https://api.github.com/repos/fludd12/tgstation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fludd12/tgstation/statuses/{sha}","languages_url":"https://api.github.com/repos/fludd12/tgstation/languages","stargazers_url":"https://api.github.com/repos/fludd12/tgstation/stargazers","contributors_url":"https://api.github.com/repos/fludd12/tgstation/contributors","subscribers_url":"https://api.github.com/repos/fludd12/tgstation/subscribers","subscription_url":"https://api.github.com/repos/fludd12/tgstation/subscription","commits_url":"https://api.github.com/repos/fludd12/tgstation/commits{/sha}","git_commits_url":"https://api.github.com/repos/fludd12/tgstation/git/commits{/sha}","comments_url":"https://api.github.com/repos/fludd12/tgstation/comments{/number}","issue_comment_url":"https://api.github.com/repos/fludd12/tgstation/issues/comments{/number}","contents_url":"https://api.github.com/repos/fludd12/tgstation/contents/{+path}","compare_url":"https://api.github.com/repos/fludd12/tgstation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fludd12/tgstation/merges","archive_url":"https://api.github.com/repos/fludd12/tgstation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fludd12/tgstation/downloads","issues_url":"https://api.github.com/repos/fludd12/tgstation/issues{/number}","pulls_url":"https://api.github.com/repos/fludd12/tgstation/pulls{/number}","milestones_url":"https://api.github.com/repos/fludd12/tgstation/milestones{/number}","notifications_url":"https://api.github.com/repos/fludd12/tgstation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fludd12/tgstation/labels{/name}","releases_url":"https://api.github.com/repos/fludd12/tgstation/releases{/id}","deployments_url":"https://api.github.com/repos/fludd12/tgstation/deployments","created_at":"2018-02-16T21:41:00Z","updated_at":"2018-06-10T00:09:02Z","pushed_at":"2018-07-09T23:34:12Z","git_url":"git://github.com/fludd12/tgstation.git","ssh_url":"git@github.com:fludd12/tgstation.git","clone_url":"https://github.com/fludd12/tgstation.git","svn_url":"https://github.com/fludd12/tgstation","homepage":"https://www.tgstation13.org/","size":1159004,"stargazers_count":0,"watchers_count":0,"language":"DM","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":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tgstation:master","ref":"master","sha":"c213eaf14f691f7b297440b38a89caa5ec0d5724","user":{"login":"tgstation","id":1363778,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjM3Nzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1363778?v=4","gravatar_id":"","url":"https://api.github.com/users/tgstation","html_url":"https://github.com/tgstation","followers_url":"https://api.github.com/users/tgstation/followers","following_url":"https://api.github.com/users/tgstation/following{/other_user}","gists_url":"https://api.github.com/users/tgstation/gists{/gist_id}","starred_url":"https://api.github.com/users/tgstation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgstation/subscriptions","organizations_url":"https://api.github.com/users/tgstation/orgs","repos_url":"https://api.github.com/users/tgstation/repos","events_url":"https://api.github.com/users/tgstation/events{/privacy}","received_events_url":"https://api.github.com/users/tgstation/received_events","type":"Organization","site_admin":false},"repo":{"id":3234987,"node_id":"MDEwOlJlcG9zaXRvcnkzMjM0OTg3","name":"tgstation","full_name":"tgstation/tgstation","owner":{"login":"tgstation","id":1363778,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjM3Nzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1363778?v=4","gravatar_id":"","url":"https://api.github.com/users/tgstation","html_url":"https://github.com/tgstation","followers_url":"https://api.github.com/users/tgstation/followers","following_url":"https://api.github.com/users/tgstation/following{/other_user}","gists_url":"https://api.github.com/users/tgstation/gists{/gist_id}","starred_url":"https://api.github.com/users/tgstation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgstation/subscriptions","organizations_url":"https://api.github.com/users/tgstation/orgs","repos_url":"https://api.github.com/users/tgstation/repos","events_url":"https://api.github.com/users/tgstation/events{/privacy}","received_events_url":"https://api.github.com/users/tgstation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tgstation/tgstation","description":"the /tg/station branch of SS13","fork":false,"url":"https://api.github.com/repos/tgstation/tgstation","forks_url":"https://api.github.com/repos/tgstation/tgstation/forks","keys_url":"https://api.github.com/repos/tgstation/tgstation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tgstation/tgstation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tgstation/tgstation/teams","hooks_url":"https://api.github.com/repos/tgstation/tgstation/hooks","issue_events_url":"https://api.github.com/repos/tgstation/tgstation/issues/events{/number}","events_url":"https://api.github.com/repos/tgstation/tgstation/events","assignees_url":"https://api.github.com/repos/tgstation/tgstation/assignees{/user}","branches_url":"https://api.github.com/repos/tgstation/tgstation/branches{/branch}","tags_url":"https://api.github.com/repos/tgstation/tgstation/tags","blobs_url":"https://api.github.com/repos/tgstation/tgstation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tgstation/tgstation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tgstation/tgstation/git/refs{/sha}","trees_url":"https://api.github.com/repos/tgstation/tgstation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tgstation/tgstation/statuses/{sha}","languages_url":"https://api.github.com/repos/tgstation/tgstation/languages","stargazers_url":"https://api.github.com/repos/tgstation/tgstation/stargazers","contributors_url":"https://api.github.com/repos/tgstation/tgstation/contributors","subscribers_url":"https://api.github.com/repos/tgstation/tgstation/subscribers","subscription_url":"https://api.github.com/repos/tgstation/tgstation/subscription","commits_url":"https://api.github.com/repos/tgstation/tgstation/commits{/sha}","git_commits_url":"https://api.github.com/repos/tgstation/tgstation/git/commits{/sha}","comments_url":"https://api.github.com/repos/tgstation/tgstation/comments{/number}","issue_comment_url":"https://api.github.com/repos/tgstation/tgstation/issues/comments{/number}","contents_url":"https://api.github.com/repos/tgstation/tgstation/contents/{+path}","compare_url":"https://api.github.com/repos/tgstation/tgstation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tgstation/tgstation/merges","archive_url":"https://api.github.com/repos/tgstation/tgstation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tgstation/tgstation/downloads","issues_url":"https://api.github.com/repos/tgstation/tgstation/issues{/number}","pulls_url":"https://api.github.com/repos/tgstation/tgstation/pulls{/number}","milestones_url":"https://api.github.com/repos/tgstation/tgstation/milestones{/number}","notifications_url":"https://api.github.com/repos/tgstation/tgstation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tgstation/tgstation/labels{/name}","releases_url":"https://api.github.com/repos/tgstation/tgstation/releases{/id}","deployments_url":"https://api.github.com/repos/tgstation/tgstation/deployments","created_at":"2012-01-21T17:32:47Z","updated_at":"2018-07-10T02:43:14Z","pushed_at":"2018-07-10T03:29:12Z","git_url":"git://github.com/tgstation/tgstation.git","ssh_url":"git@github.com:tgstation/tgstation.git","clone_url":"https://github.com/tgstation/tgstation.git","svn_url":"https://github.com/tgstation/tgstation","homepage":"https://www.tgstation13.org/","size":1158875,"stargazers_count":533,"watchers_count":533,"language":"DM","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1827,"mirror_url":null,"archived":false,"open_issues_count":1191,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":1827,"open_issues":1191,"watchers":533,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tgstation/tgstation/pulls/38977"},"html":{"href":"https://github.com/tgstation/tgstation/pull/38977"},"issue":{"href":"https://api.github.com/repos/tgstation/tgstation/issues/38977"},"comments":{"href":"https://api.github.com/repos/tgstation/tgstation/issues/38977/comments"},"review_comments":{"href":"https://api.github.com/repos/tgstation/tgstation/pulls/38977/comments"},"review_comment":{"href":"https://api.github.com/repos/tgstation/tgstation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tgstation/tgstation/pulls/38977/commits"},"statuses":{"href":"https://api.github.com/repos/tgstation/tgstation/statuses/0adbca4b7de6068daa120ccc30daac26aee4bfe5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ninjanomnom"}}