{"action":"created","issue":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/17008","repository_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA","labels_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/17008/labels{/name}","comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/17008/comments","events_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/17008/events","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/17008","id":158184926,"number":17008,"title":"[RDY]Batteries as magazines mod","user":{"login":"Coolthulhu","id":1878860,"avatar_url":"https://avatars.githubusercontent.com/u/1878860?v=3","gravatar_id":"","url":"https://api.github.com/users/Coolthulhu","html_url":"https://github.com/Coolthulhu","followers_url":"https://api.github.com/users/Coolthulhu/followers","following_url":"https://api.github.com/users/Coolthulhu/following{/other_user}","gists_url":"https://api.github.com/users/Coolthulhu/gists{/gist_id}","starred_url":"https://api.github.com/users/Coolthulhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coolthulhu/subscriptions","organizations_url":"https://api.github.com/users/Coolthulhu/orgs","repos_url":"https://api.github.com/users/Coolthulhu/repos","events_url":"https://api.github.com/users/Coolthulhu/events{/privacy}","received_events_url":"https://api.github.com/users/Coolthulhu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"mugling","id":12238606,"avatar_url":"https://avatars.githubusercontent.com/u/12238606?v=3","gravatar_id":"","url":"https://api.github.com/users/mugling","html_url":"https://github.com/mugling","followers_url":"https://api.github.com/users/mugling/followers","following_url":"https://api.github.com/users/mugling/following{/other_user}","gists_url":"https://api.github.com/users/mugling/gists{/gist_id}","starred_url":"https://api.github.com/users/mugling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mugling/subscriptions","organizations_url":"https://api.github.com/users/mugling/orgs","repos_url":"https://api.github.com/users/mugling/repos","events_url":"https://api.github.com/users/mugling/events{/privacy}","received_events_url":"https://api.github.com/users/mugling/received_events","type":"User","site_admin":false},"assignees":[{"login":"mugling","id":12238606,"avatar_url":"https://avatars.githubusercontent.com/u/12238606?v=3","gravatar_id":"","url":"https://api.github.com/users/mugling","html_url":"https://github.com/mugling","followers_url":"https://api.github.com/users/mugling/followers","following_url":"https://api.github.com/users/mugling/following{/other_user}","gists_url":"https://api.github.com/users/mugling/gists{/gist_id}","starred_url":"https://api.github.com/users/mugling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mugling/subscriptions","organizations_url":"https://api.github.com/users/mugling/orgs","repos_url":"https://api.github.com/users/mugling/repos","events_url":"https://api.github.com/users/mugling/events{/privacy}","received_events_url":"https://api.github.com/users/mugling/received_events","type":"User","site_admin":false}],"milestone":null,"comments":30,"created_at":"2016-06-02T16:32:42Z","updated_at":"2016-10-12T21:00:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/17008","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/17008","diff_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/17008.diff","patch_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/17008.patch"},"body":"I'm working on turning batteries into more realistic \"magazines of power\" instead of the current pool of electricity in itemized form.\r\nIt will be a battery mod. Simpler to craft than UPS mod, since UPS is mostly sci-fi stuff, while connecting a real car battery to a power converter to power a flashlight/soldering iron/small induction forge should be doable IRL.\r\nLater on, if I manage to get it non-annoying, non-buggy, non-hacky and most importantly convenient (not having to use vehicle menu), regular battery system could be scrapped in favor of the magazine battery one.\r\n\r\nSo far I managed it to pass the following test:\r\n* Spawn a portable generator\r\n* Pull a storage battery out of it\r\n* Spawn a welder and battery mod\r\n* Mod the welder with the battery mod\r\n* Reload the welder with the storage battery pulled out of the generator\r\n* Weld a sheet iron from some scrap\r\n* Check welder to see that it lost 20 charges, as expected\r\n\r\nTODO:\r\n* [X] Add a wrapper for charges check, so that items that check charges (notably soldering iron and mp3 player) work with the magazine battery mod. EDIT: Already exists, it's called `ammo_remaining`.\r\n* [x] Hack around crafting system requiring components to be empty (magazine batteries contain \"electricity\"). Possibly allow inheriting charges from the used battery?\r\n* [x] Make the system less hacky and hardcoded, so that it can be reused for plutonium batteries (optional)"},"comment":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/comments/253337708","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/17008#issuecomment-253337708","issue_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/17008","id":253337708,"user":{"login":"mugling","id":12238606,"avatar_url":"https://avatars.githubusercontent.com/u/12238606?v=3","gravatar_id":"","url":"https://api.github.com/users/mugling","html_url":"https://github.com/mugling","followers_url":"https://api.github.com/users/mugling/followers","following_url":"https://api.github.com/users/mugling/following{/other_user}","gists_url":"https://api.github.com/users/mugling/gists{/gist_id}","starred_url":"https://api.github.com/users/mugling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mugling/subscriptions","organizations_url":"https://api.github.com/users/mugling/orgs","repos_url":"https://api.github.com/users/mugling/repos","events_url":"https://api.github.com/users/mugling/events{/privacy}","received_events_url":"https://api.github.com/users/mugling/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T21:00:32Z","updated_at":"2016-10-12T21:00:32Z","body":"Ok, I'm compiling it now.\r\n\r\nWhilst we're at it can you move the other toolmod recipes to the same file and add it it to `json_whitelist`. If any of the balance for the other toolomd recipes offends you it could be changed here but that's by no means a requirement."}}
{"actor":{"display_login":"mugling"}}