{"action":"created","issue":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/25509","repository_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA","labels_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/25509/labels{/name}","comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/25509/comments","events_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/25509/events","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/25509","id":358361652,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MTM1MjAz","number":25509,"title":"[WIP] Refactor item temperature calculations","user":{"login":"alanbrady","id":60370,"node_id":"MDQ6VXNlcjYwMzcw","avatar_url":"https://avatars1.githubusercontent.com/u/60370?v=4","gravatar_id":"","url":"https://api.github.com/users/alanbrady","html_url":"https://github.com/alanbrady","followers_url":"https://api.github.com/users/alanbrady/followers","following_url":"https://api.github.com/users/alanbrady/following{/other_user}","gists_url":"https://api.github.com/users/alanbrady/gists{/gist_id}","starred_url":"https://api.github.com/users/alanbrady/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanbrady/subscriptions","organizations_url":"https://api.github.com/users/alanbrady/orgs","repos_url":"https://api.github.com/users/alanbrady/repos","events_url":"https://api.github.com/users/alanbrady/events{/privacy}","received_events_url":"https://api.github.com/users/alanbrady/received_events","type":"User","site_admin":false},"labels":[{"id":490080170,"node_id":"MDU6TGFiZWw0OTAwODAxNzA=","url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/labels/Food%20/%20Vitamins","name":"Food / Vitamins","color":"ffbf36","default":false},{"id":1045568860,"node_id":"MDU6TGFiZWwxMDQ1NTY4ODYw","url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/labels/Temperature","name":"Temperature","color":"ead515","default":false},{"id":659366627,"node_id":"MDU6TGFiZWw2NTkzNjY2Mjc=","url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/labels/[C++]","name":"[C++]","color":"f9d0c4","default":false},{"id":235869031,"node_id":"MDU6TGFiZWwyMzU4NjkwMzE=","url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/labels/[JSON]","name":"[JSON]","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-09-09T08:50:38Z","updated_at":"2018-09-12T03:03:15Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/25509","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/25509","diff_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/25509.diff","patch_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/25509.patch"},"body":"#### Summary\r\n```SUMMARY: Infrastructure \"Refactor item temperature calculation\"```\r\n\r\n#### Purpose of change\r\nThe way item temperature calculation works is really complicated and messy.  This consolidates everything down into something _digestible_.  This now also includes @nexusmrsep's changes in #25242, see that PR for detailed analysis on the values chosen for freeze points.  To the best of my ability I have attempted to replicate the freeze points done there, but requires manual review to insure correctness.\r\n\r\n##### Bugfixes:\r\n- The way \"NO_FREEZE\" worked, didn't\r\n- `apply_in_fridge` called multiple times on the same turn for the same item\r\n- Fridge parts could keep items warm in cold weather\r\n- Many misc. things\r\n##### Features:\r\n- Rename \"NO_FREEZE\" flag to \"FREEZERBURN\" and ~~add \"NO_FREEZE\" flag~~ incorporate @nexusmrsep's freezing points into this.\r\n- Vehicle engines (except pedals/wheelchairs) now warm up items in the vehicle while turned on\r\n- Ammonia/Bleach/Mutagen/Liquor ~~no longer freezes~~ have freeze points.\r\n- Add @nexusmrsep's feature to have body heat increase item temperature in inventory\r\n- You can heat items that aren't frozen to help them maintain their heat before freezing while on a journey\r\n- When heating up an item that is best served cold, it now asks if you want to heat it up all the way or just defrost it\r\n\r\nThe motivation here is not really to change the way any of it currently works, just turn it into a form a human can understand, make it work like it's intended to, and add some easy QoL along the way.\r\n\r\n#### Describe the solution\r\nEssentially I've consolidated all the item_counter and \"COLD\"/\"FREEZE\" tag stuff into `process_food` with a new function, `calc_temp` and simplified as best possible all the logic it entails.\r\n\r\nAdds a new VPFLAG_HEATER to engines and checks for it while processing vehicle items.\r\n\r\nRemoves no longer needed code.\r\n\r\nThis applies @nexusmrsep's changes from #25242 as well.\r\n\r\nHuge thanks to @nexusmrsep for helping me out, doing all the hard work to begin with, and letting me hack up his code <3.\r\n\r\nResolves #25023, Resolves #24955, Resolves #25357 "},"comment":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/comments/420496348","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/25509#issuecomment-420496348","issue_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/25509","id":420496348,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDQ5NjM0OA==","user":{"login":"alanbrady","id":60370,"node_id":"MDQ6VXNlcjYwMzcw","avatar_url":"https://avatars1.githubusercontent.com/u/60370?v=4","gravatar_id":"","url":"https://api.github.com/users/alanbrady","html_url":"https://github.com/alanbrady","followers_url":"https://api.github.com/users/alanbrady/followers","following_url":"https://api.github.com/users/alanbrady/following{/other_user}","gists_url":"https://api.github.com/users/alanbrady/gists{/gist_id}","starred_url":"https://api.github.com/users/alanbrady/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanbrady/subscriptions","organizations_url":"https://api.github.com/users/alanbrady/orgs","repos_url":"https://api.github.com/users/alanbrady/repos","events_url":"https://api.github.com/users/alanbrady/events{/privacy}","received_events_url":"https://api.github.com/users/alanbrady/received_events","type":"User","site_admin":false},"created_at":"2018-09-12T03:03:15Z","updated_at":"2018-09-12T03:03:15Z","author_association":"CONTRIBUTOR","body":"I pretty much reworked the core of how temp calc works again so probably needs to new review on the core parts.\r\n\r\nI tried to keep separate the new json changes to show what I changed."}}
{"actor":{"display_login":"alanbrady"}}