{"action":"created","comment":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/comments/62474805","id":62474805,"diff_hunk":"@@ -2328,7 +2336,16 @@ tab_direction set_description(WINDOW *w, player *u, const bool allow_reroll, poi\n                     save_template(u);\n                 }\n             } else if( !points.is_valid() ) {\n-                popup(_(\"You cannot save a template with negative unused points\"));\n+                if (points.skill_points_left() < 0 ) {\n+\t                popup(_(\"You cannot save a template with negative unused points\"));\n+                } else if (points.trait_points_left() < 0 ) {\n+                        popup(_(\"You cannot save a template with this many trait points allocated, change some traits or lower some stats and try again.\"));\n+                } else if (points.stat_points_left() < 0) {\n+                        popup(_(\"You cannot save a template with this many stat points allocated, lower some stats and try again.\"));\n+                } else {\n+                        popup(_(\"You cannot save a template with negative unused points\"));","path":"src/newcharacter.cpp","position":35,"original_position":35,"commit_id":"b05c1ad055f9c09beaa412fe4b2225233d08954b","original_commit_id":"b05c1ad055f9c09beaa412fe4b2225233d08954b","user":{"login":"illi-kun","id":5421954,"avatar_url":"https://avatars.githubusercontent.com/u/5421954?v=3","gravatar_id":"","url":"https://api.github.com/users/illi-kun","html_url":"https://github.com/illi-kun","followers_url":"https://api.github.com/users/illi-kun/followers","following_url":"https://api.github.com/users/illi-kun/following{/other_user}","gists_url":"https://api.github.com/users/illi-kun/gists{/gist_id}","starred_url":"https://api.github.com/users/illi-kun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/illi-kun/subscriptions","organizations_url":"https://api.github.com/users/illi-kun/orgs","repos_url":"https://api.github.com/users/illi-kun/repos","events_url":"https://api.github.com/users/illi-kun/events{/privacy}","received_events_url":"https://api.github.com/users/illi-kun/received_events","type":"User","site_admin":false},"body":"Please put a period at the end of this sentence.","created_at":"2016-05-09T09:55:46Z","updated_at":"2016-05-09T09:55:46Z","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/16572#discussion_r62474805","pull_request_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/16572","_links":{"self":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/comments/62474805"},"html":{"href":"https://github.com/CleverRaven/Cataclysm-DDA/pull/16572#discussion_r62474805"},"pull_request":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/16572"}}},"pull_request":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/16572","id":69256041,"html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/16572","diff_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/16572.diff","patch_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/16572.patch","issue_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/16572","number":16572,"state":"open","locked":false,"title":"Multi pool errors messages","user":{"login":"Shoes01","id":3358624,"avatar_url":"https://avatars.githubusercontent.com/u/3358624?v=3","gravatar_id":"","url":"https://api.github.com/users/Shoes01","html_url":"https://github.com/Shoes01","followers_url":"https://api.github.com/users/Shoes01/followers","following_url":"https://api.github.com/users/Shoes01/following{/other_user}","gists_url":"https://api.github.com/users/Shoes01/gists{/gist_id}","starred_url":"https://api.github.com/users/Shoes01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shoes01/subscriptions","organizations_url":"https://api.github.com/users/Shoes01/orgs","repos_url":"https://api.github.com/users/Shoes01/repos","events_url":"https://api.github.com/users/Shoes01/events{/privacy}","received_events_url":"https://api.github.com/users/Shoes01/received_events","type":"User","site_admin":false},"body":"This is in response to issue #15918. \r\n\r\nThis PR attempts to add error messages when allocating points incorrectly using the Multiple Pool option. \r\n\r\nThere are some quirks, where being at -4+2+2=0 or -2+0+2=0 will complain about trait points, while -2+2+0=0 will (rightfully) complain about stats. However, this is better than nothing! And to make the error logs more accurate might require more delicate code than what I added.\r\n\r\nI looked at adding coloring schemes to indicate errors; for example, if a user allocated -2+0+2=0, the -2 would be red. Or if the user allocated 0-2+2=0, but the 0 and the -2 would be red. This could not be done easily because the whole equation is coded as one single string, and thus one single color. If coloring is something that would be a good feature, add it to the issue mentioned above and I might get to it another day.","created_at":"2016-05-07T23:32:27Z","updated_at":"2016-05-09T09:55:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"adef4a40f52dc5a77db5e1369c09bbda7b9f11b9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/16572/commits","review_comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/16572/comments","review_comment_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/16572/comments","statuses_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/statuses/b05c1ad055f9c09beaa412fe4b2225233d08954b","head":{"label":"Shoes01:multi-pool-errors","ref":"multi-pool-errors","sha":"b05c1ad055f9c09beaa412fe4b2225233d08954b","user":{"login":"Shoes01","id":3358624,"avatar_url":"https://avatars.githubusercontent.com/u/3358624?v=3","gravatar_id":"","url":"https://api.github.com/users/Shoes01","html_url":"https://github.com/Shoes01","followers_url":"https://api.github.com/users/Shoes01/followers","following_url":"https://api.github.com/users/Shoes01/following{/other_user}","gists_url":"https://api.github.com/users/Shoes01/gists{/gist_id}","starred_url":"https://api.github.com/users/Shoes01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shoes01/subscriptions","organizations_url":"https://api.github.com/users/Shoes01/orgs","repos_url":"https://api.github.com/users/Shoes01/repos","events_url":"https://api.github.com/users/Shoes01/events{/privacy}","received_events_url":"https://api.github.com/users/Shoes01/received_events","type":"User","site_admin":false},"repo":{"id":8102755,"name":"Cataclysm-DDA","full_name":"Shoes01/Cataclysm-DDA","owner":{"login":"Shoes01","id":3358624,"avatar_url":"https://avatars.githubusercontent.com/u/3358624?v=3","gravatar_id":"","url":"https://api.github.com/users/Shoes01","html_url":"https://github.com/Shoes01","followers_url":"https://api.github.com/users/Shoes01/followers","following_url":"https://api.github.com/users/Shoes01/following{/other_user}","gists_url":"https://api.github.com/users/Shoes01/gists{/gist_id}","starred_url":"https://api.github.com/users/Shoes01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shoes01/subscriptions","organizations_url":"https://api.github.com/users/Shoes01/orgs","repos_url":"https://api.github.com/users/Shoes01/repos","events_url":"https://api.github.com/users/Shoes01/events{/privacy}","received_events_url":"https://api.github.com/users/Shoes01/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Shoes01/Cataclysm-DDA","description":"Cataclysm - Dark Days Ahead. The unofficial continuation projects for Whales' Cataclysm Roguelike","fork":true,"url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA","forks_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/forks","keys_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/teams","hooks_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/hooks","issue_events_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/issues/events{/number}","events_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/events","assignees_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/assignees{/user}","branches_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/branches{/branch}","tags_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/tags","blobs_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/statuses/{sha}","languages_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/languages","stargazers_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/stargazers","contributors_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/contributors","subscribers_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/subscribers","subscription_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/subscription","commits_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/contents/{+path}","compare_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/merges","archive_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/downloads","issues_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/issues{/number}","pulls_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/pulls{/number}","milestones_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/milestones{/number}","notifications_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/labels{/name}","releases_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/releases{/id}","deployments_url":"https://api.github.com/repos/Shoes01/Cataclysm-DDA/deployments","created_at":"2013-02-08T22:34:40Z","updated_at":"2015-01-27T23:31:38Z","pushed_at":"2016-05-07T23:27:08Z","git_url":"git://github.com/Shoes01/Cataclysm-DDA.git","ssh_url":"git@github.com:Shoes01/Cataclysm-DDA.git","clone_url":"https://github.com/Shoes01/Cataclysm-DDA.git","svn_url":"https://github.com/Shoes01/Cataclysm-DDA","homepage":"http://www.cataclysm.glyphgryph.com/","size":754545,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"CleverRaven:master","ref":"master","sha":"967063a8e80e849bdb2be26f70c7b92a6dd96b18","user":{"login":"CleverRaven","id":4367009,"avatar_url":"https://avatars.githubusercontent.com/u/4367009?v=3","gravatar_id":"","url":"https://api.github.com/users/CleverRaven","html_url":"https://github.com/CleverRaven","followers_url":"https://api.github.com/users/CleverRaven/followers","following_url":"https://api.github.com/users/CleverRaven/following{/other_user}","gists_url":"https://api.github.com/users/CleverRaven/gists{/gist_id}","starred_url":"https://api.github.com/users/CleverRaven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CleverRaven/subscriptions","organizations_url":"https://api.github.com/users/CleverRaven/orgs","repos_url":"https://api.github.com/users/CleverRaven/repos","events_url":"https://api.github.com/users/CleverRaven/events{/privacy}","received_events_url":"https://api.github.com/users/CleverRaven/received_events","type":"Organization","site_admin":false},"repo":{"id":5973855,"name":"Cataclysm-DDA","full_name":"CleverRaven/Cataclysm-DDA","owner":{"login":"CleverRaven","id":4367009,"avatar_url":"https://avatars.githubusercontent.com/u/4367009?v=3","gravatar_id":"","url":"https://api.github.com/users/CleverRaven","html_url":"https://github.com/CleverRaven","followers_url":"https://api.github.com/users/CleverRaven/followers","following_url":"https://api.github.com/users/CleverRaven/following{/other_user}","gists_url":"https://api.github.com/users/CleverRaven/gists{/gist_id}","starred_url":"https://api.github.com/users/CleverRaven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CleverRaven/subscriptions","organizations_url":"https://api.github.com/users/CleverRaven/orgs","repos_url":"https://api.github.com/users/CleverRaven/repos","events_url":"https://api.github.com/users/CleverRaven/events{/privacy}","received_events_url":"https://api.github.com/users/CleverRaven/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CleverRaven/Cataclysm-DDA","description":"Cataclysm - Dark Days Ahead. A fork/variant of Cataclysm Roguelike by Whales.","fork":false,"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA","forks_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/forks","keys_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/teams","hooks_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/hooks","issue_events_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/events{/number}","events_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/events","assignees_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/assignees{/user}","branches_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/branches{/branch}","tags_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/tags","blobs_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/git/refs{/sha}","trees_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/statuses/{sha}","languages_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/languages","stargazers_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/stargazers","contributors_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/contributors","subscribers_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/subscribers","subscription_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/subscription","commits_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/commits{/sha}","git_commits_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/git/commits{/sha}","comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/comments{/number}","issue_comment_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/comments{/number}","contents_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/contents/{+path}","compare_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/merges","archive_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/downloads","issues_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues{/number}","pulls_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls{/number}","milestones_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/milestones{/number}","notifications_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/labels{/name}","releases_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/releases{/id}","deployments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/deployments","created_at":"2012-09-26T22:57:43Z","updated_at":"2016-05-09T02:19:43Z","pushed_at":"2016-05-09T08:40:56Z","git_url":"git://github.com/CleverRaven/Cataclysm-DDA.git","ssh_url":"git@github.com:CleverRaven/Cataclysm-DDA.git","clone_url":"https://github.com/CleverRaven/Cataclysm-DDA.git","svn_url":"https://github.com/CleverRaven/Cataclysm-DDA","homepage":"http://en.cataclysmdda.com/","size":1024273,"stargazers_count":941,"watchers_count":941,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":873,"mirror_url":null,"open_issues_count":1173,"forks":873,"open_issues":1173,"watchers":941,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/16572"},"html":{"href":"https://github.com/CleverRaven/Cataclysm-DDA/pull/16572"},"issue":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/16572"},"comments":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/16572/comments"},"review_comments":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/16572/comments"},"review_comment":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/16572/commits"},"statuses":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/statuses/b05c1ad055f9c09beaa412fe4b2225233d08954b"}}}}