{"action":"created","comment":{"url":"https://api.github.com/repos/CorsixTH/CorsixTH/pulls/comments/80396214","id":80396214,"diff_hunk":"@@ -114,6 +114,20 @@ function UIPatient.normaliseWarmth(warmth)\n   return warmth\n end\n \n+--! Draw a bar in the patient dialogue window.\n+--!param canvas Canvas to draw at.\n+--!param xbase Horizontal base position.\n+--!param ybase Vertical base position.\n+--!param xpos Horizontal offset.\n+--!param ypos Vertical offset.\n+--!param value Fraction to draw.\n+function UIPatient:drawBar(canvas, xbase, ybase, xpos, ypos, value)\n+  local width = math.floor(value * 40 + 0.5)\n+  for dx = 0, width - 1 do","path":"CorsixTH/Lua/dialogs/patient.lua","position":26,"original_position":13,"commit_id":"036b8b2b1022260d5437a538df1aeab14b25a430","original_commit_id":"a6baacc3db97be593decbfdff93b320be5546037","user":{"login":"TheCycoONE","id":823433,"avatar_url":"https://avatars.githubusercontent.com/u/823433?v=3","gravatar_id":"","url":"https://api.github.com/users/TheCycoONE","html_url":"https://github.com/TheCycoONE","followers_url":"https://api.github.com/users/TheCycoONE/followers","following_url":"https://api.github.com/users/TheCycoONE/following{/other_user}","gists_url":"https://api.github.com/users/TheCycoONE/gists{/gist_id}","starred_url":"https://api.github.com/users/TheCycoONE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheCycoONE/subscriptions","organizations_url":"https://api.github.com/users/TheCycoONE/orgs","repos_url":"https://api.github.com/users/TheCycoONE/repos","events_url":"https://api.github.com/users/TheCycoONE/events{/privacy}","received_events_url":"https://api.github.com/users/TheCycoONE/received_events","type":"User","site_admin":false},"body":"I think you still need to handle the 0 case here, otherwise math.floor(0 * 40 + 0.5) == 0, then you subtract 1, so you would be saying from 0 to -1 step 1, which seems like a bad thing to do.","created_at":"2016-09-26T00:26:14Z","updated_at":"2016-09-26T00:46:14Z","html_url":"https://github.com/CorsixTH/CorsixTH/pull/1131#discussion_r80396214","pull_request_url":"https://api.github.com/repos/CorsixTH/CorsixTH/pulls/1131","_links":{"self":{"href":"https://api.github.com/repos/CorsixTH/CorsixTH/pulls/comments/80396214"},"html":{"href":"https://github.com/CorsixTH/CorsixTH/pull/1131#discussion_r80396214"},"pull_request":{"href":"https://api.github.com/repos/CorsixTH/CorsixTH/pulls/1131"}}},"pull_request":{"url":"https://api.github.com/repos/CorsixTH/CorsixTH/pulls/1131","id":86613292,"html_url":"https://github.com/CorsixTH/CorsixTH/pull/1131","diff_url":"https://github.com/CorsixTH/CorsixTH/pull/1131.diff","patch_url":"https://github.com/CorsixTH/CorsixTH/pull/1131.patch","issue_url":"https://api.github.com/repos/CorsixTH/CorsixTH/issues/1131","number":1131,"state":"open","locked":false,"title":"[rdy] Rewrite functions","user":{"login":"Alberth289346","id":3254232,"avatar_url":"https://avatars.githubusercontent.com/u/3254232?v=3","gravatar_id":"","url":"https://api.github.com/users/Alberth289346","html_url":"https://github.com/Alberth289346","followers_url":"https://api.github.com/users/Alberth289346/followers","following_url":"https://api.github.com/users/Alberth289346/following{/other_user}","gists_url":"https://api.github.com/users/Alberth289346/gists{/gist_id}","starred_url":"https://api.github.com/users/Alberth289346/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alberth289346/subscriptions","organizations_url":"https://api.github.com/users/Alberth289346/orgs","repos_url":"https://api.github.com/users/Alberth289346/repos","events_url":"https://api.github.com/users/Alberth289346/events{/privacy}","received_events_url":"https://api.github.com/users/Alberth289346/received_events","type":"User","site_admin":false},"body":"Taking some of the bigger rewrites out of the lua check patch","created_at":"2016-09-24T09:38:23Z","updated_at":"2016-09-26T00:46:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1a230f33c1180727baf19ddbb7e9947430d7990","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CorsixTH/CorsixTH/pulls/1131/commits","review_comments_url":"https://api.github.com/repos/CorsixTH/CorsixTH/pulls/1131/comments","review_comment_url":"https://api.github.com/repos/CorsixTH/CorsixTH/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CorsixTH/CorsixTH/issues/1131/comments","statuses_url":"https://api.github.com/repos/CorsixTH/CorsixTH/statuses/036b8b2b1022260d5437a538df1aeab14b25a430","head":{"label":"Alberth289346:rewrite_functions","ref":"rewrite_functions","sha":"036b8b2b1022260d5437a538df1aeab14b25a430","user":{"login":"Alberth289346","id":3254232,"avatar_url":"https://avatars.githubusercontent.com/u/3254232?v=3","gravatar_id":"","url":"https://api.github.com/users/Alberth289346","html_url":"https://github.com/Alberth289346","followers_url":"https://api.github.com/users/Alberth289346/followers","following_url":"https://api.github.com/users/Alberth289346/following{/other_user}","gists_url":"https://api.github.com/users/Alberth289346/gists{/gist_id}","starred_url":"https://api.github.com/users/Alberth289346/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alberth289346/subscriptions","organizations_url":"https://api.github.com/users/Alberth289346/orgs","repos_url":"https://api.github.com/users/Alberth289346/repos","events_url":"https://api.github.com/users/Alberth289346/events{/privacy}","received_events_url":"https://api.github.com/users/Alberth289346/received_events","type":"User","site_admin":false},"repo":{"id":13177964,"name":"CorsixTH","full_name":"Alberth289346/CorsixTH","owner":{"login":"Alberth289346","id":3254232,"avatar_url":"https://avatars.githubusercontent.com/u/3254232?v=3","gravatar_id":"","url":"https://api.github.com/users/Alberth289346","html_url":"https://github.com/Alberth289346","followers_url":"https://api.github.com/users/Alberth289346/followers","following_url":"https://api.github.com/users/Alberth289346/following{/other_user}","gists_url":"https://api.github.com/users/Alberth289346/gists{/gist_id}","starred_url":"https://api.github.com/users/Alberth289346/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alberth289346/subscriptions","organizations_url":"https://api.github.com/users/Alberth289346/orgs","repos_url":"https://api.github.com/users/Alberth289346/repos","events_url":"https://api.github.com/users/Alberth289346/events{/privacy}","received_events_url":"https://api.github.com/users/Alberth289346/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Alberth289346/CorsixTH","description":"Open source clone of Theme Hospital","fork":true,"url":"https://api.github.com/repos/Alberth289346/CorsixTH","forks_url":"https://api.github.com/repos/Alberth289346/CorsixTH/forks","keys_url":"https://api.github.com/repos/Alberth289346/CorsixTH/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alberth289346/CorsixTH/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alberth289346/CorsixTH/teams","hooks_url":"https://api.github.com/repos/Alberth289346/CorsixTH/hooks","issue_events_url":"https://api.github.com/repos/Alberth289346/CorsixTH/issues/events{/number}","events_url":"https://api.github.com/repos/Alberth289346/CorsixTH/events","assignees_url":"https://api.github.com/repos/Alberth289346/CorsixTH/assignees{/user}","branches_url":"https://api.github.com/repos/Alberth289346/CorsixTH/branches{/branch}","tags_url":"https://api.github.com/repos/Alberth289346/CorsixTH/tags","blobs_url":"https://api.github.com/repos/Alberth289346/CorsixTH/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alberth289346/CorsixTH/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alberth289346/CorsixTH/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alberth289346/CorsixTH/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alberth289346/CorsixTH/statuses/{sha}","languages_url":"https://api.github.com/repos/Alberth289346/CorsixTH/languages","stargazers_url":"https://api.github.com/repos/Alberth289346/CorsixTH/stargazers","contributors_url":"https://api.github.com/repos/Alberth289346/CorsixTH/contributors","subscribers_url":"https://api.github.com/repos/Alberth289346/CorsixTH/subscribers","subscription_url":"https://api.github.com/repos/Alberth289346/CorsixTH/subscription","commits_url":"https://api.github.com/repos/Alberth289346/CorsixTH/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alberth289346/CorsixTH/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alberth289346/CorsixTH/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alberth289346/CorsixTH/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alberth289346/CorsixTH/contents/{+path}","compare_url":"https://api.github.com/repos/Alberth289346/CorsixTH/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alberth289346/CorsixTH/merges","archive_url":"https://api.github.com/repos/Alberth289346/CorsixTH/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alberth289346/CorsixTH/downloads","issues_url":"https://api.github.com/repos/Alberth289346/CorsixTH/issues{/number}","pulls_url":"https://api.github.com/repos/Alberth289346/CorsixTH/pulls{/number}","milestones_url":"https://api.github.com/repos/Alberth289346/CorsixTH/milestones{/number}","notifications_url":"https://api.github.com/repos/Alberth289346/CorsixTH/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alberth289346/CorsixTH/labels{/name}","releases_url":"https://api.github.com/repos/Alberth289346/CorsixTH/releases{/id}","deployments_url":"https://api.github.com/repos/Alberth289346/CorsixTH/deployments","created_at":"2013-09-28T17:48:55Z","updated_at":"2015-09-03T16:45:24Z","pushed_at":"2016-09-24T09:48:15Z","git_url":"git://github.com/Alberth289346/CorsixTH.git","ssh_url":"git@github.com:Alberth289346/CorsixTH.git","clone_url":"https://github.com/Alberth289346/CorsixTH.git","svn_url":"https://github.com/Alberth289346/CorsixTH","homepage":null,"size":22235,"stargazers_count":1,"watchers_count":1,"language":"Lua","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"CorsixTH:master","ref":"master","sha":"64e220156f1ef0c428f363f001a7eface1d92628","user":{"login":"CorsixTH","id":4948760,"avatar_url":"https://avatars.githubusercontent.com/u/4948760?v=3","gravatar_id":"","url":"https://api.github.com/users/CorsixTH","html_url":"https://github.com/CorsixTH","followers_url":"https://api.github.com/users/CorsixTH/followers","following_url":"https://api.github.com/users/CorsixTH/following{/other_user}","gists_url":"https://api.github.com/users/CorsixTH/gists{/gist_id}","starred_url":"https://api.github.com/users/CorsixTH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorsixTH/subscriptions","organizations_url":"https://api.github.com/users/CorsixTH/orgs","repos_url":"https://api.github.com/users/CorsixTH/repos","events_url":"https://api.github.com/users/CorsixTH/events{/privacy}","received_events_url":"https://api.github.com/users/CorsixTH/received_events","type":"Organization","site_admin":false},"repo":{"id":12363387,"name":"CorsixTH","full_name":"CorsixTH/CorsixTH","owner":{"login":"CorsixTH","id":4948760,"avatar_url":"https://avatars.githubusercontent.com/u/4948760?v=3","gravatar_id":"","url":"https://api.github.com/users/CorsixTH","html_url":"https://github.com/CorsixTH","followers_url":"https://api.github.com/users/CorsixTH/followers","following_url":"https://api.github.com/users/CorsixTH/following{/other_user}","gists_url":"https://api.github.com/users/CorsixTH/gists{/gist_id}","starred_url":"https://api.github.com/users/CorsixTH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorsixTH/subscriptions","organizations_url":"https://api.github.com/users/CorsixTH/orgs","repos_url":"https://api.github.com/users/CorsixTH/repos","events_url":"https://api.github.com/users/CorsixTH/events{/privacy}","received_events_url":"https://api.github.com/users/CorsixTH/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CorsixTH/CorsixTH","description":"Open source clone of Theme Hospital","fork":false,"url":"https://api.github.com/repos/CorsixTH/CorsixTH","forks_url":"https://api.github.com/repos/CorsixTH/CorsixTH/forks","keys_url":"https://api.github.com/repos/CorsixTH/CorsixTH/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CorsixTH/CorsixTH/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CorsixTH/CorsixTH/teams","hooks_url":"https://api.github.com/repos/CorsixTH/CorsixTH/hooks","issue_events_url":"https://api.github.com/repos/CorsixTH/CorsixTH/issues/events{/number}","events_url":"https://api.github.com/repos/CorsixTH/CorsixTH/events","assignees_url":"https://api.github.com/repos/CorsixTH/CorsixTH/assignees{/user}","branches_url":"https://api.github.com/repos/CorsixTH/CorsixTH/branches{/branch}","tags_url":"https://api.github.com/repos/CorsixTH/CorsixTH/tags","blobs_url":"https://api.github.com/repos/CorsixTH/CorsixTH/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CorsixTH/CorsixTH/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CorsixTH/CorsixTH/git/refs{/sha}","trees_url":"https://api.github.com/repos/CorsixTH/CorsixTH/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CorsixTH/CorsixTH/statuses/{sha}","languages_url":"https://api.github.com/repos/CorsixTH/CorsixTH/languages","stargazers_url":"https://api.github.com/repos/CorsixTH/CorsixTH/stargazers","contributors_url":"https://api.github.com/repos/CorsixTH/CorsixTH/contributors","subscribers_url":"https://api.github.com/repos/CorsixTH/CorsixTH/subscribers","subscription_url":"https://api.github.com/repos/CorsixTH/CorsixTH/subscription","commits_url":"https://api.github.com/repos/CorsixTH/CorsixTH/commits{/sha}","git_commits_url":"https://api.github.com/repos/CorsixTH/CorsixTH/git/commits{/sha}","comments_url":"https://api.github.com/repos/CorsixTH/CorsixTH/comments{/number}","issue_comment_url":"https://api.github.com/repos/CorsixTH/CorsixTH/issues/comments{/number}","contents_url":"https://api.github.com/repos/CorsixTH/CorsixTH/contents/{+path}","compare_url":"https://api.github.com/repos/CorsixTH/CorsixTH/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CorsixTH/CorsixTH/merges","archive_url":"https://api.github.com/repos/CorsixTH/CorsixTH/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CorsixTH/CorsixTH/downloads","issues_url":"https://api.github.com/repos/CorsixTH/CorsixTH/issues{/number}","pulls_url":"https://api.github.com/repos/CorsixTH/CorsixTH/pulls{/number}","milestones_url":"https://api.github.com/repos/CorsixTH/CorsixTH/milestones{/number}","notifications_url":"https://api.github.com/repos/CorsixTH/CorsixTH/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CorsixTH/CorsixTH/labels{/name}","releases_url":"https://api.github.com/repos/CorsixTH/CorsixTH/releases{/id}","deployments_url":"https://api.github.com/repos/CorsixTH/CorsixTH/deployments","created_at":"2013-08-25T18:16:56Z","updated_at":"2016-09-25T19:52:33Z","pushed_at":"2016-09-24T09:48:15Z","git_url":"git://github.com/CorsixTH/CorsixTH.git","ssh_url":"git@github.com:CorsixTH/CorsixTH.git","clone_url":"https://github.com/CorsixTH/CorsixTH.git","svn_url":"https://github.com/CorsixTH/CorsixTH","homepage":null,"size":24693,"stargazers_count":1262,"watchers_count":1262,"language":"Lua","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":177,"mirror_url":null,"open_issues_count":234,"forks":177,"open_issues":234,"watchers":1262,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CorsixTH/CorsixTH/pulls/1131"},"html":{"href":"https://github.com/CorsixTH/CorsixTH/pull/1131"},"issue":{"href":"https://api.github.com/repos/CorsixTH/CorsixTH/issues/1131"},"comments":{"href":"https://api.github.com/repos/CorsixTH/CorsixTH/issues/1131/comments"},"review_comments":{"href":"https://api.github.com/repos/CorsixTH/CorsixTH/pulls/1131/comments"},"review_comment":{"href":"https://api.github.com/repos/CorsixTH/CorsixTH/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CorsixTH/CorsixTH/pulls/1131/commits"},"statuses":{"href":"https://api.github.com/repos/CorsixTH/CorsixTH/statuses/036b8b2b1022260d5437a538df1aeab14b25a430"}}}}
{"actor":{"display_login":"TheCycoONE"}}