{"action":"closed","number":534,"pull_request":{"url":"https://api.github.com/repos/yogstation13/yogstation/pulls/534","id":80728862,"html_url":"https://github.com/yogstation13/yogstation/pull/534","diff_url":"https://github.com/yogstation13/yogstation/pull/534.diff","patch_url":"https://github.com/yogstation13/yogstation/pull/534.patch","issue_url":"https://api.github.com/repos/yogstation13/yogstation/issues/534","number":534,"state":"closed","locked":false,"title":"Fixes antag weights (again)","user":{"login":"X-TheDark","id":2188139,"avatar_url":"https://avatars.githubusercontent.com/u/2188139?v=3","gravatar_id":"","url":"https://api.github.com/users/X-TheDark","html_url":"https://github.com/X-TheDark","followers_url":"https://api.github.com/users/X-TheDark/followers","following_url":"https://api.github.com/users/X-TheDark/following{/other_user}","gists_url":"https://api.github.com/users/X-TheDark/gists{/gist_id}","starred_url":"https://api.github.com/users/X-TheDark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/X-TheDark/subscriptions","organizations_url":"https://api.github.com/users/X-TheDark/orgs","repos_url":"https://api.github.com/users/X-TheDark/repos","events_url":"https://api.github.com/users/X-TheDark/events{/privacy}","received_events_url":"https://api.github.com/users/X-TheDark/received_events","type":"User","site_admin":false},"body":"fixes #505 \r\n\r\n**Tested with 1/2 clients on traitor mode with 1/2 possible traitors. Everything works properly.**\r\n\r\n**Cause:** pick_candidate() was ran as many times as we need candidates. Since this proc picks ONE candidate (decreasing the weight) and increases the weight of those it didn't pick, we ended up in a situation where, because this proc was called multiple times, it increased weights more than once (even if the candidate was picked later).\r\nIn fact, math works out in such a way that only the first candidate to get picked actually get their weight decreased (divided by 1.5), 2nd candidate weight didn't change (multiplied by 1.5 on first pick_candidate(), divided by 1.5 on second pick_candidate()), 3rd candidate got their weight multiplied by 1.5 (/1.5 * 1.5 * 1.5).\r\n\r\n**Fix:** REWRITE FUCKING EVERYTHING. Not really, but still, the fix wasn't as simple as I'd like it to be. Had to add some parameters to make it loop and separate non-picked candidate weight update into another proc.\r\n\r\n:cl: X-TheDark\r\nbugfix: Antagonist weights should be working properly now.\r\n/:cl:","created_at":"2016-08-10T03:22:58Z","updated_at":"2016-08-10T03:54:32Z","closed_at":"2016-08-10T03:54:32Z","merged_at":"2016-08-10T03:54:32Z","merge_commit_sha":"d891ec7114f008ede2d9d557091b8606a47fc668","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/yogstation13/yogstation/pulls/534/commits","review_comments_url":"https://api.github.com/repos/yogstation13/yogstation/pulls/534/comments","review_comment_url":"https://api.github.com/repos/yogstation13/yogstation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yogstation13/yogstation/issues/534/comments","statuses_url":"https://api.github.com/repos/yogstation13/yogstation/statuses/11747ad98ca9c94115a8e7048599d4c60e14662b","head":{"label":"X-TheDark:antag_weight_fix","ref":"antag_weight_fix","sha":"11747ad98ca9c94115a8e7048599d4c60e14662b","user":{"login":"X-TheDark","id":2188139,"avatar_url":"https://avatars.githubusercontent.com/u/2188139?v=3","gravatar_id":"","url":"https://api.github.com/users/X-TheDark","html_url":"https://github.com/X-TheDark","followers_url":"https://api.github.com/users/X-TheDark/followers","following_url":"https://api.github.com/users/X-TheDark/following{/other_user}","gists_url":"https://api.github.com/users/X-TheDark/gists{/gist_id}","starred_url":"https://api.github.com/users/X-TheDark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/X-TheDark/subscriptions","organizations_url":"https://api.github.com/users/X-TheDark/orgs","repos_url":"https://api.github.com/users/X-TheDark/repos","events_url":"https://api.github.com/users/X-TheDark/events{/privacy}","received_events_url":"https://api.github.com/users/X-TheDark/received_events","type":"User","site_admin":false},"repo":{"id":60123698,"name":"yogstation","full_name":"X-TheDark/yogstation","owner":{"login":"X-TheDark","id":2188139,"avatar_url":"https://avatars.githubusercontent.com/u/2188139?v=3","gravatar_id":"","url":"https://api.github.com/users/X-TheDark","html_url":"https://github.com/X-TheDark","followers_url":"https://api.github.com/users/X-TheDark/followers","following_url":"https://api.github.com/users/X-TheDark/following{/other_user}","gists_url":"https://api.github.com/users/X-TheDark/gists{/gist_id}","starred_url":"https://api.github.com/users/X-TheDark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/X-TheDark/subscriptions","organizations_url":"https://api.github.com/users/X-TheDark/orgs","repos_url":"https://api.github.com/users/X-TheDark/repos","events_url":"https://api.github.com/users/X-TheDark/events{/privacy}","received_events_url":"https://api.github.com/users/X-TheDark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/X-TheDark/yogstation","description":"New and improved (by rebasing with /tg/). /s","fork":true,"url":"https://api.github.com/repos/X-TheDark/yogstation","forks_url":"https://api.github.com/repos/X-TheDark/yogstation/forks","keys_url":"https://api.github.com/repos/X-TheDark/yogstation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/X-TheDark/yogstation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/X-TheDark/yogstation/teams","hooks_url":"https://api.github.com/repos/X-TheDark/yogstation/hooks","issue_events_url":"https://api.github.com/repos/X-TheDark/yogstation/issues/events{/number}","events_url":"https://api.github.com/repos/X-TheDark/yogstation/events","assignees_url":"https://api.github.com/repos/X-TheDark/yogstation/assignees{/user}","branches_url":"https://api.github.com/repos/X-TheDark/yogstation/branches{/branch}","tags_url":"https://api.github.com/repos/X-TheDark/yogstation/tags","blobs_url":"https://api.github.com/repos/X-TheDark/yogstation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/X-TheDark/yogstation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/X-TheDark/yogstation/git/refs{/sha}","trees_url":"https://api.github.com/repos/X-TheDark/yogstation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/X-TheDark/yogstation/statuses/{sha}","languages_url":"https://api.github.com/repos/X-TheDark/yogstation/languages","stargazers_url":"https://api.github.com/repos/X-TheDark/yogstation/stargazers","contributors_url":"https://api.github.com/repos/X-TheDark/yogstation/contributors","subscribers_url":"https://api.github.com/repos/X-TheDark/yogstation/subscribers","subscription_url":"https://api.github.com/repos/X-TheDark/yogstation/subscription","commits_url":"https://api.github.com/repos/X-TheDark/yogstation/commits{/sha}","git_commits_url":"https://api.github.com/repos/X-TheDark/yogstation/git/commits{/sha}","comments_url":"https://api.github.com/repos/X-TheDark/yogstation/comments{/number}","issue_comment_url":"https://api.github.com/repos/X-TheDark/yogstation/issues/comments{/number}","contents_url":"https://api.github.com/repos/X-TheDark/yogstation/contents/{+path}","compare_url":"https://api.github.com/repos/X-TheDark/yogstation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/X-TheDark/yogstation/merges","archive_url":"https://api.github.com/repos/X-TheDark/yogstation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/X-TheDark/yogstation/downloads","issues_url":"https://api.github.com/repos/X-TheDark/yogstation/issues{/number}","pulls_url":"https://api.github.com/repos/X-TheDark/yogstation/pulls{/number}","milestones_url":"https://api.github.com/repos/X-TheDark/yogstation/milestones{/number}","notifications_url":"https://api.github.com/repos/X-TheDark/yogstation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/X-TheDark/yogstation/labels{/name}","releases_url":"https://api.github.com/repos/X-TheDark/yogstation/releases{/id}","deployments_url":"https://api.github.com/repos/X-TheDark/yogstation/deployments","created_at":"2016-05-31T21:10:55Z","updated_at":"2016-08-08T04:09:49Z","pushed_at":"2016-08-10T03:18:14Z","git_url":"git://github.com/X-TheDark/yogstation.git","ssh_url":"git@github.com:X-TheDark/yogstation.git","clone_url":"https://github.com/X-TheDark/yogstation.git","svn_url":"https://github.com/X-TheDark/yogstation","homepage":"http://www.yogstation.net","size":633245,"stargazers_count":0,"watchers_count":0,"language":"DM","has_issues":false,"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":"master"}},"base":{"label":"yogstation13:master","ref":"master","sha":"2121271cadee84754230d8dcd7c651ec6a6ff541","user":{"login":"yogstation13","id":16735403,"avatar_url":"https://avatars.githubusercontent.com/u/16735403?v=3","gravatar_id":"","url":"https://api.github.com/users/yogstation13","html_url":"https://github.com/yogstation13","followers_url":"https://api.github.com/users/yogstation13/followers","following_url":"https://api.github.com/users/yogstation13/following{/other_user}","gists_url":"https://api.github.com/users/yogstation13/gists{/gist_id}","starred_url":"https://api.github.com/users/yogstation13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogstation13/subscriptions","organizations_url":"https://api.github.com/users/yogstation13/orgs","repos_url":"https://api.github.com/users/yogstation13/repos","events_url":"https://api.github.com/users/yogstation13/events{/privacy}","received_events_url":"https://api.github.com/users/yogstation13/received_events","type":"Organization","site_admin":false},"repo":{"id":60038739,"name":"yogstation","full_name":"yogstation13/yogstation","owner":{"login":"yogstation13","id":16735403,"avatar_url":"https://avatars.githubusercontent.com/u/16735403?v=3","gravatar_id":"","url":"https://api.github.com/users/yogstation13","html_url":"https://github.com/yogstation13","followers_url":"https://api.github.com/users/yogstation13/followers","following_url":"https://api.github.com/users/yogstation13/following{/other_user}","gists_url":"https://api.github.com/users/yogstation13/gists{/gist_id}","starred_url":"https://api.github.com/users/yogstation13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogstation13/subscriptions","organizations_url":"https://api.github.com/users/yogstation13/orgs","repos_url":"https://api.github.com/users/yogstation13/repos","events_url":"https://api.github.com/users/yogstation13/events{/privacy}","received_events_url":"https://api.github.com/users/yogstation13/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yogstation13/yogstation","description":"Yogstation13's master code source.","fork":false,"url":"https://api.github.com/repos/yogstation13/yogstation","forks_url":"https://api.github.com/repos/yogstation13/yogstation/forks","keys_url":"https://api.github.com/repos/yogstation13/yogstation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yogstation13/yogstation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yogstation13/yogstation/teams","hooks_url":"https://api.github.com/repos/yogstation13/yogstation/hooks","issue_events_url":"https://api.github.com/repos/yogstation13/yogstation/issues/events{/number}","events_url":"https://api.github.com/repos/yogstation13/yogstation/events","assignees_url":"https://api.github.com/repos/yogstation13/yogstation/assignees{/user}","branches_url":"https://api.github.com/repos/yogstation13/yogstation/branches{/branch}","tags_url":"https://api.github.com/repos/yogstation13/yogstation/tags","blobs_url":"https://api.github.com/repos/yogstation13/yogstation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yogstation13/yogstation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yogstation13/yogstation/git/refs{/sha}","trees_url":"https://api.github.com/repos/yogstation13/yogstation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yogstation13/yogstation/statuses/{sha}","languages_url":"https://api.github.com/repos/yogstation13/yogstation/languages","stargazers_url":"https://api.github.com/repos/yogstation13/yogstation/stargazers","contributors_url":"https://api.github.com/repos/yogstation13/yogstation/contributors","subscribers_url":"https://api.github.com/repos/yogstation13/yogstation/subscribers","subscription_url":"https://api.github.com/repos/yogstation13/yogstation/subscription","commits_url":"https://api.github.com/repos/yogstation13/yogstation/commits{/sha}","git_commits_url":"https://api.github.com/repos/yogstation13/yogstation/git/commits{/sha}","comments_url":"https://api.github.com/repos/yogstation13/yogstation/comments{/number}","issue_comment_url":"https://api.github.com/repos/yogstation13/yogstation/issues/comments{/number}","contents_url":"https://api.github.com/repos/yogstation13/yogstation/contents/{+path}","compare_url":"https://api.github.com/repos/yogstation13/yogstation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yogstation13/yogstation/merges","archive_url":"https://api.github.com/repos/yogstation13/yogstation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yogstation13/yogstation/downloads","issues_url":"https://api.github.com/repos/yogstation13/yogstation/issues{/number}","pulls_url":"https://api.github.com/repos/yogstation13/yogstation/pulls{/number}","milestones_url":"https://api.github.com/repos/yogstation13/yogstation/milestones{/number}","notifications_url":"https://api.github.com/repos/yogstation13/yogstation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yogstation13/yogstation/labels{/name}","releases_url":"https://api.github.com/repos/yogstation13/yogstation/releases{/id}","deployments_url":"https://api.github.com/repos/yogstation13/yogstation/deployments","created_at":"2016-05-30T21:02:36Z","updated_at":"2016-07-26T23:35:26Z","pushed_at":"2016-08-10T03:54:33Z","git_url":"git://github.com/yogstation13/yogstation.git","ssh_url":"git@github.com:yogstation13/yogstation.git","clone_url":"https://github.com/yogstation13/yogstation.git","svn_url":"https://github.com/yogstation13/yogstation","homepage":"http://www.yogstation.net","size":637826,"stargazers_count":6,"watchers_count":6,"language":"DM","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":33,"mirror_url":null,"open_issues_count":146,"forks":33,"open_issues":146,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yogstation13/yogstation/pulls/534"},"html":{"href":"https://github.com/yogstation13/yogstation/pull/534"},"issue":{"href":"https://api.github.com/repos/yogstation13/yogstation/issues/534"},"comments":{"href":"https://api.github.com/repos/yogstation13/yogstation/issues/534/comments"},"review_comments":{"href":"https://api.github.com/repos/yogstation13/yogstation/pulls/534/comments"},"review_comment":{"href":"https://api.github.com/repos/yogstation13/yogstation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yogstation13/yogstation/pulls/534/commits"},"statuses":{"href":"https://api.github.com/repos/yogstation13/yogstation/statuses/11747ad98ca9c94115a8e7048599d4c60e14662b"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"Cruix","id":16478175,"avatar_url":"https://avatars.githubusercontent.com/u/16478175?v=3","gravatar_id":"","url":"https://api.github.com/users/Cruix","html_url":"https://github.com/Cruix","followers_url":"https://api.github.com/users/Cruix/followers","following_url":"https://api.github.com/users/Cruix/following{/other_user}","gists_url":"https://api.github.com/users/Cruix/gists{/gist_id}","starred_url":"https://api.github.com/users/Cruix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cruix/subscriptions","organizations_url":"https://api.github.com/users/Cruix/orgs","repos_url":"https://api.github.com/users/Cruix/repos","events_url":"https://api.github.com/users/Cruix/events{/privacy}","received_events_url":"https://api.github.com/users/Cruix/received_events","type":"User","site_admin":false},"comments":1,"review_comments":1,"commits":1,"additions":166,"deletions":109,"changed_files":13}}
{"actor":{"display_login":"Cruix"}}