{"action":"created","comment":{"url":"https://api.github.com/repos/Baystation12/Baystation12/pulls/comments/90757329","pull_request_review_id":11277178,"id":90757329,"diff_hunk":"@@ -0,0 +1,199 @@\n+/obj/item/weapon/gun/magnetic\n+\tname = \"improvised coilgun\"\n+\tdesc = \"A coilgun hastily thrown together out of a basic frame and advanced power storage components. Is it safe for it to be duct-taped together like that?\"\n+\ticon_state = \"coilgun\"\n+\titem_state = \"coilgun\"\n+\ticon = 'icons/obj/railgun.dmi'\n+\trequires_two_hands = TRUE\n+\torigin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 4, TECH_ILLEGAL = 2, TECH_MAGNET = 4)\n+\tw_class = ITEM_SIZE_LARGE\n+\n+\tvar/obj/item/weapon/cell/cell                              // Currently installed powercell.\n+\tvar/obj/item/weapon/stock_parts/capacitor/capacitor        // Installed capacitor. Higher rating == faster charge between shots.\n+\tvar/removable_components = TRUE                            // Whether or not the gun can be dismantled.\n+\tvar/gun_unreliable = 15                                    // Percentage chance of detonating in your hands.\n+\n+\tvar/obj/item/loaded                                        // Currently loaded object, for retrieval/unloading.\n+\tvar/load_type = /obj/item/stack/rods                       // Type of stack to load with.\n+\tvar/projectile_type = /obj/item/projectile/bullet/magnetic // Actual fire type, since this isn't throw_at rod launcher.\n+\n+\tvar/power_cost = 950                                       // Cost per fire, should consume almost an entire basic cell.\n+\tvar/power_per_tick                                         // Capacitor charge per process(). Updated based on capacitor rating.\n+\n+/obj/item/weapon/gun/magnetic/initialize()\n+\tif(capacitor)\n+\t\tpower_per_tick = (power_cost*0.15) * capacitor.rating\n+\tupdate_icon()\n+\t. = ..()\n+\n+/obj/item/weapon/gun/magnetic/New()\n+\t..()\n+\tprocessing_objects |= src\n+\n+/obj/item/weapon/gun/magnetic/Destroy()\n+\tif(cell)\n+\t\tqdel(cell)\n+\t\tcell = null\n+\tif(loaded)\n+\t\tqdel(loaded)\n+\t\tloaded = null\n+\tif(capacitor)\n+\t\tqdel(capacitor)\n+\t\tcapacitor = null\n+\t. = ..()\n+\n+/obj/item/weapon/gun/magnetic/process()\n+\tif(capacitor)\n+\t\tif(cell)\n+\t\t\tif(capacitor.charge < capacitor.max_charge && cell.checked_use(power_per_tick))\n+\t\t\t\tcapacitor.charge(power_per_tick)\n+\t\telse\n+\t\t\tcapacitor.use(capacitor.charge * 0.05)\n+\tupdate_icon()\n+\n+/obj/item/weapon/gun/magnetic/update_icon()\n+\toverlays.Cut()\n+\n+\tif(removable_components)\n+\t\tif(cell)\n+\t\t\toverlays += image(icon, \"[icon_state]_cell\")","path":"code/modules/projectiles/guns/magnetic/magnetic.dm","position":59,"original_position":59,"commit_id":"0ea8cffe73011e7ab24286000ef476558d4088e9","original_commit_id":"0ea8cffe73011e7ab24286000ef476558d4088e9","user":{"login":"Iamgoofball","id":4081722,"avatar_url":"https://avatars.githubusercontent.com/u/4081722?v=3","gravatar_id":"","url":"https://api.github.com/users/Iamgoofball","html_url":"https://github.com/Iamgoofball","followers_url":"https://api.github.com/users/Iamgoofball/followers","following_url":"https://api.github.com/users/Iamgoofball/following{/other_user}","gists_url":"https://api.github.com/users/Iamgoofball/gists{/gist_id}","starred_url":"https://api.github.com/users/Iamgoofball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Iamgoofball/subscriptions","organizations_url":"https://api.github.com/users/Iamgoofball/orgs","repos_url":"https://api.github.com/users/Iamgoofball/repos","events_url":"https://api.github.com/users/Iamgoofball/events{/privacy}","received_events_url":"https://api.github.com/users/Iamgoofball/received_events","type":"User","site_admin":false},"body":"might be better to cache these and add/remove them to the overlays list instead of deleting them and remaking them anew every time","created_at":"2016-12-03T13:39:36Z","updated_at":"2016-12-03T13:42:19Z","html_url":"https://github.com/Baystation12/Baystation12/pull/14848#discussion_r90757329","pull_request_url":"https://api.github.com/repos/Baystation12/Baystation12/pulls/14848","_links":{"self":{"href":"https://api.github.com/repos/Baystation12/Baystation12/pulls/comments/90757329"},"html":{"href":"https://github.com/Baystation12/Baystation12/pull/14848#discussion_r90757329"},"pull_request":{"href":"https://api.github.com/repos/Baystation12/Baystation12/pulls/14848"}}},"pull_request":{"url":"https://api.github.com/repos/Baystation12/Baystation12/pulls/14848","id":96313383,"html_url":"https://github.com/Baystation12/Baystation12/pull/14848","diff_url":"https://github.com/Baystation12/Baystation12/pull/14848.diff","patch_url":"https://github.com/Baystation12/Baystation12/pull/14848.patch","issue_url":"https://api.github.com/repos/Baystation12/Baystation12/issues/14848","number":14848,"state":"open","locked":false,"title":"Improvised coilgun and railguns.","user":{"login":"Zuhayr","id":2468979,"avatar_url":"https://avatars.githubusercontent.com/u/2468979?v=3","gravatar_id":"","url":"https://api.github.com/users/Zuhayr","html_url":"https://github.com/Zuhayr","followers_url":"https://api.github.com/users/Zuhayr/followers","following_url":"https://api.github.com/users/Zuhayr/following{/other_user}","gists_url":"https://api.github.com/users/Zuhayr/gists{/gist_id}","starred_url":"https://api.github.com/users/Zuhayr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zuhayr/subscriptions","organizations_url":"https://api.github.com/users/Zuhayr/orgs","repos_url":"https://api.github.com/users/Zuhayr/repos","events_url":"https://api.github.com/users/Zuhayr/events{/privacy}","received_events_url":"https://api.github.com/users/Zuhayr/received_events","type":"User","site_admin":false},"body":"This is a commission that kinda spiralled out of control (it was just meant to be a constructable coilgun).\r\n\r\n- Adds a coilgun constructed from odds and ends plus an atmos pipe and several superconducting coils (waiting on the commissioner to confirm this as I changed the recipe a bit). It fires metal rods and is essentially a hacked-together, self-destructing anti-materiel rifle.\r\n- Adds a railgun that uses compressed matter cartridges for ammunition. Still balancing these, may or may not leave them in as adminspawn.\r\n\r\nThis PR also uses a sound from the now outdated Europa railgun project which was edited together by myself using assets from Freesounds.org. Credit to Sledgermaus for the icons.","created_at":"2016-12-02T16:47:26Z","updated_at":"2016-12-03T13:42:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"85e78af4b20e1fd11bd3ea4f5cf907cddc401348","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Baystation12/Baystation12/pulls/14848/commits","review_comments_url":"https://api.github.com/repos/Baystation12/Baystation12/pulls/14848/comments","review_comment_url":"https://api.github.com/repos/Baystation12/Baystation12/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Baystation12/Baystation12/issues/14848/comments","statuses_url":"https://api.github.com/repos/Baystation12/Baystation12/statuses/0ea8cffe73011e7ab24286000ef476558d4088e9","head":{"label":"Zuhayr:railguns","ref":"railguns","sha":"0ea8cffe73011e7ab24286000ef476558d4088e9","user":{"login":"Zuhayr","id":2468979,"avatar_url":"https://avatars.githubusercontent.com/u/2468979?v=3","gravatar_id":"","url":"https://api.github.com/users/Zuhayr","html_url":"https://github.com/Zuhayr","followers_url":"https://api.github.com/users/Zuhayr/followers","following_url":"https://api.github.com/users/Zuhayr/following{/other_user}","gists_url":"https://api.github.com/users/Zuhayr/gists{/gist_id}","starred_url":"https://api.github.com/users/Zuhayr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zuhayr/subscriptions","organizations_url":"https://api.github.com/users/Zuhayr/orgs","repos_url":"https://api.github.com/users/Zuhayr/repos","events_url":"https://api.github.com/users/Zuhayr/events{/privacy}","received_events_url":"https://api.github.com/users/Zuhayr/received_events","type":"User","site_admin":false},"repo":{"id":6039946,"name":"Baystation12","full_name":"Zuhayr/Baystation12","owner":{"login":"Zuhayr","id":2468979,"avatar_url":"https://avatars.githubusercontent.com/u/2468979?v=3","gravatar_id":"","url":"https://api.github.com/users/Zuhayr","html_url":"https://github.com/Zuhayr","followers_url":"https://api.github.com/users/Zuhayr/followers","following_url":"https://api.github.com/users/Zuhayr/following{/other_user}","gists_url":"https://api.github.com/users/Zuhayr/gists{/gist_id}","starred_url":"https://api.github.com/users/Zuhayr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zuhayr/subscriptions","organizations_url":"https://api.github.com/users/Zuhayr/orgs","repos_url":"https://api.github.com/users/Zuhayr/repos","events_url":"https://api.github.com/users/Zuhayr/events{/privacy}","received_events_url":"https://api.github.com/users/Zuhayr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zuhayr/Baystation12","description":"The code for Baystation12's branch of SS13. Developers: please don't forget to update the changelog. Thanks!","fork":true,"url":"https://api.github.com/repos/Zuhayr/Baystation12","forks_url":"https://api.github.com/repos/Zuhayr/Baystation12/forks","keys_url":"https://api.github.com/repos/Zuhayr/Baystation12/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zuhayr/Baystation12/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zuhayr/Baystation12/teams","hooks_url":"https://api.github.com/repos/Zuhayr/Baystation12/hooks","issue_events_url":"https://api.github.com/repos/Zuhayr/Baystation12/issues/events{/number}","events_url":"https://api.github.com/repos/Zuhayr/Baystation12/events","assignees_url":"https://api.github.com/repos/Zuhayr/Baystation12/assignees{/user}","branches_url":"https://api.github.com/repos/Zuhayr/Baystation12/branches{/branch}","tags_url":"https://api.github.com/repos/Zuhayr/Baystation12/tags","blobs_url":"https://api.github.com/repos/Zuhayr/Baystation12/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zuhayr/Baystation12/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zuhayr/Baystation12/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zuhayr/Baystation12/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zuhayr/Baystation12/statuses/{sha}","languages_url":"https://api.github.com/repos/Zuhayr/Baystation12/languages","stargazers_url":"https://api.github.com/repos/Zuhayr/Baystation12/stargazers","contributors_url":"https://api.github.com/repos/Zuhayr/Baystation12/contributors","subscribers_url":"https://api.github.com/repos/Zuhayr/Baystation12/subscribers","subscription_url":"https://api.github.com/repos/Zuhayr/Baystation12/subscription","commits_url":"https://api.github.com/repos/Zuhayr/Baystation12/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zuhayr/Baystation12/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zuhayr/Baystation12/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zuhayr/Baystation12/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zuhayr/Baystation12/contents/{+path}","compare_url":"https://api.github.com/repos/Zuhayr/Baystation12/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zuhayr/Baystation12/merges","archive_url":"https://api.github.com/repos/Zuhayr/Baystation12/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zuhayr/Baystation12/downloads","issues_url":"https://api.github.com/repos/Zuhayr/Baystation12/issues{/number}","pulls_url":"https://api.github.com/repos/Zuhayr/Baystation12/pulls{/number}","milestones_url":"https://api.github.com/repos/Zuhayr/Baystation12/milestones{/number}","notifications_url":"https://api.github.com/repos/Zuhayr/Baystation12/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zuhayr/Baystation12/labels{/name}","releases_url":"https://api.github.com/repos/Zuhayr/Baystation12/releases{/id}","deployments_url":"https://api.github.com/repos/Zuhayr/Baystation12/deployments","created_at":"2012-10-02T04:00:17Z","updated_at":"2016-12-02T09:50:22Z","pushed_at":"2016-12-03T10:42:16Z","git_url":"git://github.com/Zuhayr/Baystation12.git","ssh_url":"git@github.com:Zuhayr/Baystation12.git","clone_url":"https://github.com/Zuhayr/Baystation12.git","svn_url":"https://github.com/Zuhayr/Baystation12","homepage":"http://baystation12.net/","size":828740,"stargazers_count":4,"watchers_count":4,"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":4,"default_branch":"master"}},"base":{"label":"Baystation12:dev","ref":"dev","sha":"8db8d079b0b31380a70dc37f554565f9cbe678fb","user":{"login":"Baystation12","id":1174322,"avatar_url":"https://avatars.githubusercontent.com/u/1174322?v=3","gravatar_id":"","url":"https://api.github.com/users/Baystation12","html_url":"https://github.com/Baystation12","followers_url":"https://api.github.com/users/Baystation12/followers","following_url":"https://api.github.com/users/Baystation12/following{/other_user}","gists_url":"https://api.github.com/users/Baystation12/gists{/gist_id}","starred_url":"https://api.github.com/users/Baystation12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Baystation12/subscriptions","organizations_url":"https://api.github.com/users/Baystation12/orgs","repos_url":"https://api.github.com/users/Baystation12/repos","events_url":"https://api.github.com/users/Baystation12/events{/privacy}","received_events_url":"https://api.github.com/users/Baystation12/received_events","type":"Organization","site_admin":false},"repo":{"id":2715933,"name":"Baystation12","full_name":"Baystation12/Baystation12","owner":{"login":"Baystation12","id":1174322,"avatar_url":"https://avatars.githubusercontent.com/u/1174322?v=3","gravatar_id":"","url":"https://api.github.com/users/Baystation12","html_url":"https://github.com/Baystation12","followers_url":"https://api.github.com/users/Baystation12/followers","following_url":"https://api.github.com/users/Baystation12/following{/other_user}","gists_url":"https://api.github.com/users/Baystation12/gists{/gist_id}","starred_url":"https://api.github.com/users/Baystation12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Baystation12/subscriptions","organizations_url":"https://api.github.com/users/Baystation12/orgs","repos_url":"https://api.github.com/users/Baystation12/repos","events_url":"https://api.github.com/users/Baystation12/events{/privacy}","received_events_url":"https://api.github.com/users/Baystation12/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Baystation12/Baystation12","description":"The code for Baystation12's branch of SS13","fork":false,"url":"https://api.github.com/repos/Baystation12/Baystation12","forks_url":"https://api.github.com/repos/Baystation12/Baystation12/forks","keys_url":"https://api.github.com/repos/Baystation12/Baystation12/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Baystation12/Baystation12/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Baystation12/Baystation12/teams","hooks_url":"https://api.github.com/repos/Baystation12/Baystation12/hooks","issue_events_url":"https://api.github.com/repos/Baystation12/Baystation12/issues/events{/number}","events_url":"https://api.github.com/repos/Baystation12/Baystation12/events","assignees_url":"https://api.github.com/repos/Baystation12/Baystation12/assignees{/user}","branches_url":"https://api.github.com/repos/Baystation12/Baystation12/branches{/branch}","tags_url":"https://api.github.com/repos/Baystation12/Baystation12/tags","blobs_url":"https://api.github.com/repos/Baystation12/Baystation12/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Baystation12/Baystation12/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Baystation12/Baystation12/git/refs{/sha}","trees_url":"https://api.github.com/repos/Baystation12/Baystation12/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Baystation12/Baystation12/statuses/{sha}","languages_url":"https://api.github.com/repos/Baystation12/Baystation12/languages","stargazers_url":"https://api.github.com/repos/Baystation12/Baystation12/stargazers","contributors_url":"https://api.github.com/repos/Baystation12/Baystation12/contributors","subscribers_url":"https://api.github.com/repos/Baystation12/Baystation12/subscribers","subscription_url":"https://api.github.com/repos/Baystation12/Baystation12/subscription","commits_url":"https://api.github.com/repos/Baystation12/Baystation12/commits{/sha}","git_commits_url":"https://api.github.com/repos/Baystation12/Baystation12/git/commits{/sha}","comments_url":"https://api.github.com/repos/Baystation12/Baystation12/comments{/number}","issue_comment_url":"https://api.github.com/repos/Baystation12/Baystation12/issues/comments{/number}","contents_url":"https://api.github.com/repos/Baystation12/Baystation12/contents/{+path}","compare_url":"https://api.github.com/repos/Baystation12/Baystation12/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Baystation12/Baystation12/merges","archive_url":"https://api.github.com/repos/Baystation12/Baystation12/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Baystation12/Baystation12/downloads","issues_url":"https://api.github.com/repos/Baystation12/Baystation12/issues{/number}","pulls_url":"https://api.github.com/repos/Baystation12/Baystation12/pulls{/number}","milestones_url":"https://api.github.com/repos/Baystation12/Baystation12/milestones{/number}","notifications_url":"https://api.github.com/repos/Baystation12/Baystation12/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Baystation12/Baystation12/labels{/name}","releases_url":"https://api.github.com/repos/Baystation12/Baystation12/releases{/id}","deployments_url":"https://api.github.com/repos/Baystation12/Baystation12/deployments","created_at":"2011-11-05T16:12:41Z","updated_at":"2016-11-30T19:57:54Z","pushed_at":"2016-12-03T13:05:23Z","git_url":"git://github.com/Baystation12/Baystation12.git","ssh_url":"git@github.com:Baystation12/Baystation12.git","clone_url":"https://github.com/Baystation12/Baystation12.git","svn_url":"https://github.com/Baystation12/Baystation12","homepage":"http://baystation12.net/","size":1714899,"stargazers_count":235,"watchers_count":235,"language":"DM","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":770,"mirror_url":null,"open_issues_count":643,"forks":770,"open_issues":643,"watchers":235,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Baystation12/Baystation12/pulls/14848"},"html":{"href":"https://github.com/Baystation12/Baystation12/pull/14848"},"issue":{"href":"https://api.github.com/repos/Baystation12/Baystation12/issues/14848"},"comments":{"href":"https://api.github.com/repos/Baystation12/Baystation12/issues/14848/comments"},"review_comments":{"href":"https://api.github.com/repos/Baystation12/Baystation12/pulls/14848/comments"},"review_comment":{"href":"https://api.github.com/repos/Baystation12/Baystation12/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Baystation12/Baystation12/pulls/14848/commits"},"statuses":{"href":"https://api.github.com/repos/Baystation12/Baystation12/statuses/0ea8cffe73011e7ab24286000ef476558d4088e9"}}}}
{"actor":{"display_login":"Iamgoofball"}}