{"action":"created","comment":{"url":"https://api.github.com/repos/tgstation/-tg-station/pulls/comments/55052013","id":55052013,"diff_hunk":"@@ -0,0 +1,100 @@\n+\n+\n+/*\n+ * Wrapping Paper\n+ */\n+\n+/obj/item/stack/wrapping_paper\n+\tname = \"wrapping paper\"\n+\tdesc = \"Wrap packages with this festive paper to make gifts.\"\n+\ticon = 'icons/obj/items.dmi'\n+\ticon_state = \"wrap_paper\"\n+\tflags = NOBLUDGEON\n+\tamount = 25\n+\tmax_amount = 25\n+\tburn_state = FLAMMABLE\n+\n+/obj/item/stack/wrapping_paper/Destroy()\n+\tif(!amount)\n+\t\tnew /obj/item/weapon/c_tube(get_turf(src))\n+\treturn ..()\n+\n+\n+/*\n+ * Package Wrap\n+ */\n+\n+/obj/item/stack/packageWrap\n+\tname = \"package wrapper\"\n+\tdesc = \"You can use this to wrap items in.\"\n+\ticon = 'icons/obj/items.dmi'\n+\ticon_state = \"deliveryPaper\"\n+\tflags = NOBLUDGEON\n+\tamount = 25\n+\tmax_amount = 25\n+\tburn_state = FLAMMABLE\n+\n+\n+/obj/item/stack/packageWrap/afterattack(obj/target, mob/user, proximity)\n+\tif(!proximity)\n+\t\treturn\n+\tif(!istype(target))\n+\t\treturn\n+\tif(istype(target, /obj/item/smallDelivery))\n+\t\treturn\n+\tif(!isturf(target.loc))\n+\t\tuser << \"<span class='warning'>You can't wrap something that isn't on the ground.</span>\"\n+\t\treturn\n+\tif(target.anchored)\n+\t\treturn\n+\n+\tif(istype(target, /obj/item))\n+\t\tvar/obj/item/I = target\n+\t\tif(use(1))\n+\t\t\tvar/obj/item/smallDelivery/P = new /obj/item/smallDelivery(get_turf(I.loc))\n+\t\t\tI.loc = P\n+\t\t\tvar/size = round(I.w_class)\n+\t\t\tP.w_class = size\n+\t\t\tsize = min(size, 5)\n+\t\t\tP.icon_state = \"deliverypackage[size]\"\n+\t\t\tP.add_fingerprint(user)\n+\t\t\tI.add_fingerprint(user)\n+\n+\telse if(istype (target, /obj/structure/closet))\n+\t\tvar/obj/structure/closet/O = target\n+\t\tif(O.opened)\n+\t\t\treturn\n+\t\tif(!O.density) //can't wrap non dense closets (e.g. body bags)\n+\t\t\tuser << \"<span class='warning'>You can't wrap this!</span>\"\n+\t\t\treturn\n+\t\tif(use(3))\n+\t\t\tvar/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))\n+\t\t\tif(O.horizontal)\n+\t\t\t\tP.icon_state = \"deliverycrate\"\n+\t\t\tO.loc = P\n+\t\t\tP.add_fingerprint(user)\n+\t\t\tO.add_fingerprint(user)\n+\t\telse\n+\t\t\tuser << \"<span class='warning'>You need more paper!</span>\"\n+\t\t\treturn\n+\telse\n+\t\tuser << \"<span class='warning'>The object you are trying to wrap is unsuitable for the sorting machinery!</span>\"\n+\t\treturn\n+\n+\tuser.visible_message(\"<span class='notice'>[user] wraps [target].</span>\")\n+\tuser.attack_log += text(\"\\[[time_stamp()]\\] <font color='blue'>Has used [name] on [target]</font>\")\n+\n+/obj/item/stack/packageWrap/Destroy()\n+\tif(!amount)\n+\t\tnew /obj/item/weapon/c_tube(get_turf(src))\n+\treturn ..()\n+\n+/obj/item/weapon/c_tube","path":"code/game/objects/items/stacks/wrap.dm","position":106,"original_position":92,"commit_id":"44eb9607e096e2f9d11fdf34f37605cc0f32ebf6","original_commit_id":"c76f48e81714a78ef7d4f11c02ef7a633f29db09","user":{"login":"phil235","id":3476142,"avatar_url":"https://avatars.githubusercontent.com/u/3476142?v=3","gravatar_id":"","url":"https://api.github.com/users/phil235","html_url":"https://github.com/phil235","followers_url":"https://api.github.com/users/phil235/followers","following_url":"https://api.github.com/users/phil235/following{/other_user}","gists_url":"https://api.github.com/users/phil235/gists{/gist_id}","starred_url":"https://api.github.com/users/phil235/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil235/subscriptions","organizations_url":"https://api.github.com/users/phil235/orgs","repos_url":"https://api.github.com/users/phil235/repos","events_url":"https://api.github.com/users/phil235/events{/privacy}","received_events_url":"https://api.github.com/users/phil235/received_events","type":"User","site_admin":false},"body":"/obj/item/trash does nothing codewise, so I don't really see the point.","created_at":"2016-03-04T16:30:25Z","updated_at":"2016-03-04T16:30:25Z","html_url":"https://github.com/tgstation/-tg-station/pull/15899#discussion_r55052013","pull_request_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/15899","_links":{"self":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/comments/55052013"},"html":{"href":"https://github.com/tgstation/-tg-station/pull/15899#discussion_r55052013"},"pull_request":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/15899"}}},"pull_request":{"url":"https://api.github.com/repos/tgstation/-tg-station/pulls/15899","id":61558500,"html_url":"https://github.com/tgstation/-tg-station/pull/15899","diff_url":"https://github.com/tgstation/-tg-station/pull/15899.diff","patch_url":"https://github.com/tgstation/-tg-station/pull/15899.patch","issue_url":"https://api.github.com/repos/tgstation/-tg-station/issues/15899","number":15899,"state":"open","locked":false,"title":"Fixes being able to resist while dead.","user":{"login":"phil235","id":3476142,"avatar_url":"https://avatars.githubusercontent.com/u/3476142?v=3","gravatar_id":"","url":"https://api.github.com/users/phil235","html_url":"https://github.com/phil235","followers_url":"https://api.github.com/users/phil235/followers","following_url":"https://api.github.com/users/phil235/following{/other_user}","gists_url":"https://api.github.com/users/phil235/gists{/gist_id}","starred_url":"https://api.github.com/users/phil235/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil235/subscriptions","organizations_url":"https://api.github.com/users/phil235/orgs","repos_url":"https://api.github.com/users/phil235/repos","events_url":"https://api.github.com/users/phil235/events{/privacy}","received_events_url":"https://api.github.com/users/phil235/received_events","type":"User","site_admin":false},"body":"* Fixes #15862\r\n* Change some \"for\" loop with grabbed_by to be typeless since grabbed_by only contains grabs.\r\n* Replace super weird \"locate(/obj/item/weapon/grab, locate(/obj/item/weapon/grab, mob.grabbed_by.len))\" by simple \"if(grabbed_by.len)\". This fixes Process_Grab(). When grabbed by someone, you can now break the grab by moving (success rate depends on grab state).\r\n* Cleans up Process_Grab to be easier to read.\r\n* Simplifies MobBump() proc, especially the part about pushing a mob that is pulling or is pulled/grabbed. We no longer check for mobs in a 1 tile radius every time we bump a mob.\r\n* Fixes runtime with clear_reagents_to_vomit_pool() due to a typo.\r\n\r\n\r\n* I refactored how a mob resisting out of a closet that is itself inside something is done.\r\n* Fixes not being able to resist out of an unlocked unwelded locker. Now both moving and the resist button  work (except for the cardboard box). Fixes #14593\r\n* You can no longer spam breakingout message out of a closet by moving while inside it. Fixes #15721\r\n* Wrapping and unwrapping a locker no longer unwelds it magically. Fixes #14839\r\n* I refactored closet/crate/item package wrapping.\r\n* You can now wrap an item that is in your hand, and wrapping an item puts the created package in you hand. Also, opening a package puts the item in your hand instead of being dropped on the ground.\r\n* <s>You can packagewrap belts and other storage items in which the package wrap item doesn't fit.(it does currently have the unintended side effect of giving you the \"doesn't fit in X\" message when wrapping there storage items though).</s>\r\n* I moved some code around to where they should be.\r\n\r\n","created_at":"2016-03-03T13:26:46Z","updated_at":"2016-03-04T16:30:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"882f478c30b0a74c9f4d80b172c0fc61d4bd9f38","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/15899/commits","review_comments_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/15899/comments","review_comment_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tgstation/-tg-station/issues/15899/comments","statuses_url":"https://api.github.com/repos/tgstation/-tg-station/statuses/44eb9607e096e2f9d11fdf34f37605cc0f32ebf6","head":{"label":"phil235:ResistandGrabFixes","ref":"ResistandGrabFixes","sha":"44eb9607e096e2f9d11fdf34f37605cc0f32ebf6","user":{"login":"phil235","id":3476142,"avatar_url":"https://avatars.githubusercontent.com/u/3476142?v=3","gravatar_id":"","url":"https://api.github.com/users/phil235","html_url":"https://github.com/phil235","followers_url":"https://api.github.com/users/phil235/followers","following_url":"https://api.github.com/users/phil235/following{/other_user}","gists_url":"https://api.github.com/users/phil235/gists{/gist_id}","starred_url":"https://api.github.com/users/phil235/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil235/subscriptions","organizations_url":"https://api.github.com/users/phil235/orgs","repos_url":"https://api.github.com/users/phil235/repos","events_url":"https://api.github.com/users/phil235/events{/privacy}","received_events_url":"https://api.github.com/users/phil235/received_events","type":"User","site_admin":false},"repo":{"id":23807273,"name":"-tg-station","full_name":"phil235/-tg-station","owner":{"login":"phil235","id":3476142,"avatar_url":"https://avatars.githubusercontent.com/u/3476142?v=3","gravatar_id":"","url":"https://api.github.com/users/phil235","html_url":"https://github.com/phil235","followers_url":"https://api.github.com/users/phil235/followers","following_url":"https://api.github.com/users/phil235/following{/other_user}","gists_url":"https://api.github.com/users/phil235/gists{/gist_id}","starred_url":"https://api.github.com/users/phil235/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil235/subscriptions","organizations_url":"https://api.github.com/users/phil235/orgs","repos_url":"https://api.github.com/users/phil235/repos","events_url":"https://api.github.com/users/phil235/events{/privacy}","received_events_url":"https://api.github.com/users/phil235/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phil235/-tg-station","description":"/tg/'s SS13 branch","fork":true,"url":"https://api.github.com/repos/phil235/-tg-station","forks_url":"https://api.github.com/repos/phil235/-tg-station/forks","keys_url":"https://api.github.com/repos/phil235/-tg-station/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phil235/-tg-station/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phil235/-tg-station/teams","hooks_url":"https://api.github.com/repos/phil235/-tg-station/hooks","issue_events_url":"https://api.github.com/repos/phil235/-tg-station/issues/events{/number}","events_url":"https://api.github.com/repos/phil235/-tg-station/events","assignees_url":"https://api.github.com/repos/phil235/-tg-station/assignees{/user}","branches_url":"https://api.github.com/repos/phil235/-tg-station/branches{/branch}","tags_url":"https://api.github.com/repos/phil235/-tg-station/tags","blobs_url":"https://api.github.com/repos/phil235/-tg-station/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phil235/-tg-station/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phil235/-tg-station/git/refs{/sha}","trees_url":"https://api.github.com/repos/phil235/-tg-station/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phil235/-tg-station/statuses/{sha}","languages_url":"https://api.github.com/repos/phil235/-tg-station/languages","stargazers_url":"https://api.github.com/repos/phil235/-tg-station/stargazers","contributors_url":"https://api.github.com/repos/phil235/-tg-station/contributors","subscribers_url":"https://api.github.com/repos/phil235/-tg-station/subscribers","subscription_url":"https://api.github.com/repos/phil235/-tg-station/subscription","commits_url":"https://api.github.com/repos/phil235/-tg-station/commits{/sha}","git_commits_url":"https://api.github.com/repos/phil235/-tg-station/git/commits{/sha}","comments_url":"https://api.github.com/repos/phil235/-tg-station/comments{/number}","issue_comment_url":"https://api.github.com/repos/phil235/-tg-station/issues/comments{/number}","contents_url":"https://api.github.com/repos/phil235/-tg-station/contents/{+path}","compare_url":"https://api.github.com/repos/phil235/-tg-station/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phil235/-tg-station/merges","archive_url":"https://api.github.com/repos/phil235/-tg-station/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phil235/-tg-station/downloads","issues_url":"https://api.github.com/repos/phil235/-tg-station/issues{/number}","pulls_url":"https://api.github.com/repos/phil235/-tg-station/pulls{/number}","milestones_url":"https://api.github.com/repos/phil235/-tg-station/milestones{/number}","notifications_url":"https://api.github.com/repos/phil235/-tg-station/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phil235/-tg-station/labels{/name}","releases_url":"https://api.github.com/repos/phil235/-tg-station/releases{/id}","deployments_url":"https://api.github.com/repos/phil235/-tg-station/deployments","created_at":"2014-09-08T20:34:40Z","updated_at":"2016-02-25T12:01:02Z","pushed_at":"2016-03-04T16:25:14Z","git_url":"git://github.com/phil235/-tg-station.git","ssh_url":"git@github.com:phil235/-tg-station.git","clone_url":"https://github.com/phil235/-tg-station.git","svn_url":"https://github.com/phil235/-tg-station","homepage":"http://www.tgstation13.org/","size":623349,"stargazers_count":0,"watchers_count":0,"language":"DM","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tgstation:master","ref":"master","sha":"aa9196a725b8064b9d60e84e17cea79ec0bbd0f1","user":{"login":"tgstation","id":1363778,"avatar_url":"https://avatars.githubusercontent.com/u/1363778?v=3","gravatar_id":"","url":"https://api.github.com/users/tgstation","html_url":"https://github.com/tgstation","followers_url":"https://api.github.com/users/tgstation/followers","following_url":"https://api.github.com/users/tgstation/following{/other_user}","gists_url":"https://api.github.com/users/tgstation/gists{/gist_id}","starred_url":"https://api.github.com/users/tgstation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgstation/subscriptions","organizations_url":"https://api.github.com/users/tgstation/orgs","repos_url":"https://api.github.com/users/tgstation/repos","events_url":"https://api.github.com/users/tgstation/events{/privacy}","received_events_url":"https://api.github.com/users/tgstation/received_events","type":"Organization","site_admin":false},"repo":{"id":3234987,"name":"-tg-station","full_name":"tgstation/-tg-station","owner":{"login":"tgstation","id":1363778,"avatar_url":"https://avatars.githubusercontent.com/u/1363778?v=3","gravatar_id":"","url":"https://api.github.com/users/tgstation","html_url":"https://github.com/tgstation","followers_url":"https://api.github.com/users/tgstation/followers","following_url":"https://api.github.com/users/tgstation/following{/other_user}","gists_url":"https://api.github.com/users/tgstation/gists{/gist_id}","starred_url":"https://api.github.com/users/tgstation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgstation/subscriptions","organizations_url":"https://api.github.com/users/tgstation/orgs","repos_url":"https://api.github.com/users/tgstation/repos","events_url":"https://api.github.com/users/tgstation/events{/privacy}","received_events_url":"https://api.github.com/users/tgstation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tgstation/-tg-station","description":"the /tg/station branch of SS13","fork":false,"url":"https://api.github.com/repos/tgstation/-tg-station","forks_url":"https://api.github.com/repos/tgstation/-tg-station/forks","keys_url":"https://api.github.com/repos/tgstation/-tg-station/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tgstation/-tg-station/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tgstation/-tg-station/teams","hooks_url":"https://api.github.com/repos/tgstation/-tg-station/hooks","issue_events_url":"https://api.github.com/repos/tgstation/-tg-station/issues/events{/number}","events_url":"https://api.github.com/repos/tgstation/-tg-station/events","assignees_url":"https://api.github.com/repos/tgstation/-tg-station/assignees{/user}","branches_url":"https://api.github.com/repos/tgstation/-tg-station/branches{/branch}","tags_url":"https://api.github.com/repos/tgstation/-tg-station/tags","blobs_url":"https://api.github.com/repos/tgstation/-tg-station/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tgstation/-tg-station/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tgstation/-tg-station/git/refs{/sha}","trees_url":"https://api.github.com/repos/tgstation/-tg-station/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tgstation/-tg-station/statuses/{sha}","languages_url":"https://api.github.com/repos/tgstation/-tg-station/languages","stargazers_url":"https://api.github.com/repos/tgstation/-tg-station/stargazers","contributors_url":"https://api.github.com/repos/tgstation/-tg-station/contributors","subscribers_url":"https://api.github.com/repos/tgstation/-tg-station/subscribers","subscription_url":"https://api.github.com/repos/tgstation/-tg-station/subscription","commits_url":"https://api.github.com/repos/tgstation/-tg-station/commits{/sha}","git_commits_url":"https://api.github.com/repos/tgstation/-tg-station/git/commits{/sha}","comments_url":"https://api.github.com/repos/tgstation/-tg-station/comments{/number}","issue_comment_url":"https://api.github.com/repos/tgstation/-tg-station/issues/comments{/number}","contents_url":"https://api.github.com/repos/tgstation/-tg-station/contents/{+path}","compare_url":"https://api.github.com/repos/tgstation/-tg-station/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tgstation/-tg-station/merges","archive_url":"https://api.github.com/repos/tgstation/-tg-station/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tgstation/-tg-station/downloads","issues_url":"https://api.github.com/repos/tgstation/-tg-station/issues{/number}","pulls_url":"https://api.github.com/repos/tgstation/-tg-station/pulls{/number}","milestones_url":"https://api.github.com/repos/tgstation/-tg-station/milestones{/number}","notifications_url":"https://api.github.com/repos/tgstation/-tg-station/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tgstation/-tg-station/labels{/name}","releases_url":"https://api.github.com/repos/tgstation/-tg-station/releases{/id}","deployments_url":"https://api.github.com/repos/tgstation/-tg-station/deployments","created_at":"2012-01-21T17:32:47Z","updated_at":"2016-02-27T12:42:51Z","pushed_at":"2016-03-04T16:25:16Z","git_url":"git://github.com/tgstation/-tg-station.git","ssh_url":"git@github.com:tgstation/-tg-station.git","clone_url":"https://github.com/tgstation/-tg-station.git","svn_url":"https://github.com/tgstation/-tg-station","homepage":"http://www.tgstation13.org/","size":780184,"stargazers_count":275,"watchers_count":275,"language":"DM","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":970,"mirror_url":null,"open_issues_count":807,"forks":970,"open_issues":807,"watchers":275,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/15899"},"html":{"href":"https://github.com/tgstation/-tg-station/pull/15899"},"issue":{"href":"https://api.github.com/repos/tgstation/-tg-station/issues/15899"},"comments":{"href":"https://api.github.com/repos/tgstation/-tg-station/issues/15899/comments"},"review_comments":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/15899/comments"},"review_comment":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/15899/commits"},"statuses":{"href":"https://api.github.com/repos/tgstation/-tg-station/statuses/44eb9607e096e2f9d11fdf34f37605cc0f32ebf6"}}}}