{"action":"created","comment":{"url":"https://api.github.com/repos/tgstation/-tg-station/pulls/comments/48506292","id":48506292,"diff_hunk":"@@ -0,0 +1,138 @@\n+\n+/obj/vehicle\n+\tname = \"vehicle\"\n+\tdesc = \"A basic vehicle, vroom\"\n+\ticon = 'icons/obj/vehicles.dmi'\n+\ticon_state = \"fuckyou\"\n+\tdensity = 1\n+\tanchored = 0\n+\tcan_buckle = 1\n+\tbuckle_lying = 0\n+\tvar/keytype = null //item typepath, if non-null an item of this type is needed in your hands to drive this vehicle\n+\tvar/next_vehicle_move = 0 //used for move delays\n+\tvar/vehicle_move_delay = 2 //tick delay between movements, lower = faster, higher = slower\n+\tvar/auto_door_open = TRUE\n+\n+\t//Pixels\n+\tvar/generic_pixel_x = 0 //All dirs show this pixel_x for the driver\n+\tvar/generic_pixel_y = 0 //All dirs shwo this pixel_y for the driver\n+\n+\n+/obj/vehicle/New()\n+\t..()\n+\thandle_vehicle_layer()\n+\n+\n+//APPEARANCE\n+/obj/vehicle/proc/handle_vehicle_layer()\n+\tif(dir != NORTH)\n+\t\tlayer = MOB_LAYER+0.1\n+\telse\n+\t\tlayer = OBJ_LAYER\n+\n+\n+//Override this to set your vehicle's various pixel offsets\n+//if they differ between directions, otherwise use the\n+//generic variables\n+/obj/vehicle/proc/handle_vehicle_offsets()\n+\tif(buckled_mob)\n+\t\tbuckled_mob.dir = dir\n+\t\tbuckled_mob.pixel_x = generic_pixel_x\n+\t\tbuckled_mob.pixel_y = generic_pixel_y\n+\n+\n+/obj/vehicle/update_icon()\n+\treturn\n+\n+\n+\n+//KEYS\n+/obj/vehicle/proc/keycheck(mob/user)\n+\tif(keytype)\n+\t\tif(istype(user.l_hand, keytype) || istype(user.r_hand, keytype))\n+\t\t\treturn 1\n+\telse\n+\t\treturn 1\n+\treturn 0\n+\n+/obj/item/key\n+\tname = \"key\"\n+\tdesc = \"A small grey key.\"\n+\ticon = 'icons/obj/vehicles.dmi'\n+\ticon_state = \"key\"\n+\tw_class = 1\n+\n+\n+//BUCKLE HOOKS\n+/obj/vehicle/unbuckle_mob(force = 0)\n+\tif(buckled_mob)\n+\t\tbuckled_mob.pixel_x = 0\n+\t\tbuckled_mob.pixel_y = 0\n+\t. = ..()\n+\n+\n+/obj/vehicle/user_buckle_mob(mob/living/M, mob/user)\n+\tif(user.incapacitated())\n+\t\treturn\n+\tfor(var/atom/movable/A in get_turf(src))\n+\t\tif(A.density)\n+\t\t\tif(A != src && A != M)\n+\t\t\t\treturn\n+\tM.loc = get_turf(src)\n+\t..()\n+\thandle_vehicle_offsets()\n+\n+\n+//MOVEMENT\n+/obj/vehicle/relaymove(mob/user, direction)\n+\tif(user.incapacitated())\n+\t\tunbuckle_mob()\n+\n+\tif(keycheck(user))\n+\t\tif(!Process_Spacemove(direction) || !has_gravity(src.loc) || world.time < next_vehicle_move || !isturf(loc))\n+\t\t\treturn\n+\t\tnext_vehicle_move = world.time + vehicle_move_delay\n+\n+\t\tstep(src, direction)\n+\n+\t\tif(buckled_mob)\n+\t\t\tif(buckled_mob.loc != loc)\n+\t\t\t\tbuckled_mob.buckled = null //Temporary, so Move() succeeds.\n+\t\t\t\tbuckled_mob.buckled = src //Restoring\n+\n+\t\thandle_vehicle_layer()\n+\t\thandle_vehicle_offsets()\n+\telse\n+\t\tuser << \"<span class='notice'>You'll need the keys in one of your hands to drive \\the [name].</span>\"\n+\n+\n+/obj/vehicle/Move(NewLoc,Dir=0,step_x=0,step_y=0)\n+\t..()\n+\thandle_vehicle_layer()\n+\thandle_vehicle_offsets()\n+\n+\n+/obj/vehicle/attackby(obj/item/I, mob/user, params)\n+\tif(keytype && istype(I, keytype))\n+\t\tuser << \"Hold [I] in one of your hands while you drive \\the [name].\"\n+\n+\n+/obj/vehicle/Bump(atom/movable/M)\n+\t. = ..()\n+\tif(auto_door_open)\n+\t\tif(istype(M, /obj/machinery/door) && buckled_mob)\n+\t\t\tM.Bumped(buckled_mob)\n+\n+\n+//TYPEFUCKERY\n+//Because fuck updating all these maps\n+\n+\n+/obj/structure/bed/chair/janicart/secway\n+\tparent_type = /obj/vehicle/secway\n+\n+/obj/structure/bed/chair/janicart\n+\tparent_type = /obj/vehicle/janicart\n+\n+/obj/structure/bed/chair/janicart/atv\n+\tparent_type = /obj/vehicle/atv","path":"code/modules/vehicles/vehicle.dm","position":138,"original_position":138,"commit_id":"3c9c6e5c198adc4770e9e9d58f33830ee2605266","original_commit_id":"bd22fc8c6d870fd59b1987c39a3022e9e90b0ed8","user":{"login":"RemieRichards","id":4043781,"avatar_url":"https://avatars.githubusercontent.com/u/4043781?v=3","gravatar_id":"","url":"https://api.github.com/users/RemieRichards","html_url":"https://github.com/RemieRichards","followers_url":"https://api.github.com/users/RemieRichards/followers","following_url":"https://api.github.com/users/RemieRichards/following{/other_user}","gists_url":"https://api.github.com/users/RemieRichards/gists{/gist_id}","starred_url":"https://api.github.com/users/RemieRichards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RemieRichards/subscriptions","organizations_url":"https://api.github.com/users/RemieRichards/orgs","repos_url":"https://api.github.com/users/RemieRichards/repos","events_url":"https://api.github.com/users/RemieRichards/events{/privacy}","received_events_url":"https://api.github.com/users/RemieRichards/received_events","type":"User","site_admin":false},"body":"That was the intended goal for this (although it was a folder called __TYPEFUCKERY) if the idea went well (that meant after this PR, but I can do it now)","created_at":"2015-12-28T21:21:10Z","updated_at":"2015-12-28T21:21:10Z","html_url":"https://github.com/tgstation/-tg-station/pull/14076#discussion_r48506292","pull_request_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/14076","_links":{"self":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/comments/48506292"},"html":{"href":"https://github.com/tgstation/-tg-station/pull/14076#discussion_r48506292"},"pull_request":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/14076"}}},"pull_request":{"url":"https://api.github.com/repos/tgstation/-tg-station/pulls/14076","id":54608701,"html_url":"https://github.com/tgstation/-tg-station/pull/14076","diff_url":"https://github.com/tgstation/-tg-station/pull/14076.diff","patch_url":"https://github.com/tgstation/-tg-station/pull/14076.patch","issue_url":"https://api.github.com/repos/tgstation/-tg-station/issues/14076","number":14076,"state":"open","locked":false,"title":"Simple Vehicle Framework","user":{"login":"RemieRichards","id":4043781,"avatar_url":"https://avatars.githubusercontent.com/u/4043781?v=3","gravatar_id":"","url":"https://api.github.com/users/RemieRichards","html_url":"https://github.com/RemieRichards","followers_url":"https://api.github.com/users/RemieRichards/followers","following_url":"https://api.github.com/users/RemieRichards/following{/other_user}","gists_url":"https://api.github.com/users/RemieRichards/gists{/gist_id}","starred_url":"https://api.github.com/users/RemieRichards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RemieRichards/subscriptions","organizations_url":"https://api.github.com/users/RemieRichards/orgs","repos_url":"https://api.github.com/users/RemieRichards/repos","events_url":"https://api.github.com/users/RemieRichards/events{/privacy}","received_events_url":"https://api.github.com/users/RemieRichards/received_events","type":"User","site_admin":false},"body":"## Vehicles:\r\n* Converted janicarts into a simple to use vehicle framework, ```/obj/vehicle```\r\n* ```/obj/vehicle``` has customisable speed\r\n* added an ```/obj/vehicle/atv/turret``` subtype that has a mounted gun turret on the back\r\n* vehicles are no longer ```/obj/structure/bed/chair/janicart``` subtypes, we can all sleep a little easier now\r\n\r\n## Turret ATV:\r\n![turrets](http://i.imgur.com/7JcMPzx.gif)","created_at":"2015-12-26T23:00:38Z","updated_at":"2015-12-28T21:21:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f525bb0c3e6ecd5ce0dfbe6faa44c1968689363","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/14076/commits","review_comments_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/14076/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/14076/comments","statuses_url":"https://api.github.com/repos/tgstation/-tg-station/statuses/3c9c6e5c198adc4770e9e9d58f33830ee2605266","head":{"label":"RemieRichards:VehicleFramework","ref":"VehicleFramework","sha":"3c9c6e5c198adc4770e9e9d58f33830ee2605266","user":{"login":"RemieRichards","id":4043781,"avatar_url":"https://avatars.githubusercontent.com/u/4043781?v=3","gravatar_id":"","url":"https://api.github.com/users/RemieRichards","html_url":"https://github.com/RemieRichards","followers_url":"https://api.github.com/users/RemieRichards/followers","following_url":"https://api.github.com/users/RemieRichards/following{/other_user}","gists_url":"https://api.github.com/users/RemieRichards/gists{/gist_id}","starred_url":"https://api.github.com/users/RemieRichards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RemieRichards/subscriptions","organizations_url":"https://api.github.com/users/RemieRichards/orgs","repos_url":"https://api.github.com/users/RemieRichards/repos","events_url":"https://api.github.com/users/RemieRichards/events{/privacy}","received_events_url":"https://api.github.com/users/RemieRichards/received_events","type":"User","site_admin":false},"repo":{"id":12466296,"name":"-tg-station","full_name":"RemieRichards/-tg-station","owner":{"login":"RemieRichards","id":4043781,"avatar_url":"https://avatars.githubusercontent.com/u/4043781?v=3","gravatar_id":"","url":"https://api.github.com/users/RemieRichards","html_url":"https://github.com/RemieRichards","followers_url":"https://api.github.com/users/RemieRichards/followers","following_url":"https://api.github.com/users/RemieRichards/following{/other_user}","gists_url":"https://api.github.com/users/RemieRichards/gists{/gist_id}","starred_url":"https://api.github.com/users/RemieRichards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RemieRichards/subscriptions","organizations_url":"https://api.github.com/users/RemieRichards/orgs","repos_url":"https://api.github.com/users/RemieRichards/repos","events_url":"https://api.github.com/users/RemieRichards/events{/privacy}","received_events_url":"https://api.github.com/users/RemieRichards/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RemieRichards/-tg-station","description":"/tg/'s SS13 branch","fork":true,"url":"https://api.github.com/repos/RemieRichards/-tg-station","forks_url":"https://api.github.com/repos/RemieRichards/-tg-station/forks","keys_url":"https://api.github.com/repos/RemieRichards/-tg-station/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RemieRichards/-tg-station/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RemieRichards/-tg-station/teams","hooks_url":"https://api.github.com/repos/RemieRichards/-tg-station/hooks","issue_events_url":"https://api.github.com/repos/RemieRichards/-tg-station/issues/events{/number}","events_url":"https://api.github.com/repos/RemieRichards/-tg-station/events","assignees_url":"https://api.github.com/repos/RemieRichards/-tg-station/assignees{/user}","branches_url":"https://api.github.com/repos/RemieRichards/-tg-station/branches{/branch}","tags_url":"https://api.github.com/repos/RemieRichards/-tg-station/tags","blobs_url":"https://api.github.com/repos/RemieRichards/-tg-station/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RemieRichards/-tg-station/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RemieRichards/-tg-station/git/refs{/sha}","trees_url":"https://api.github.com/repos/RemieRichards/-tg-station/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RemieRichards/-tg-station/statuses/{sha}","languages_url":"https://api.github.com/repos/RemieRichards/-tg-station/languages","stargazers_url":"https://api.github.com/repos/RemieRichards/-tg-station/stargazers","contributors_url":"https://api.github.com/repos/RemieRichards/-tg-station/contributors","subscribers_url":"https://api.github.com/repos/RemieRichards/-tg-station/subscribers","subscription_url":"https://api.github.com/repos/RemieRichards/-tg-station/subscription","commits_url":"https://api.github.com/repos/RemieRichards/-tg-station/commits{/sha}","git_commits_url":"https://api.github.com/repos/RemieRichards/-tg-station/git/commits{/sha}","comments_url":"https://api.github.com/repos/RemieRichards/-tg-station/comments{/number}","issue_comment_url":"https://api.github.com/repos/RemieRichards/-tg-station/issues/comments{/number}","contents_url":"https://api.github.com/repos/RemieRichards/-tg-station/contents/{+path}","compare_url":"https://api.github.com/repos/RemieRichards/-tg-station/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RemieRichards/-tg-station/merges","archive_url":"https://api.github.com/repos/RemieRichards/-tg-station/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RemieRichards/-tg-station/downloads","issues_url":"https://api.github.com/repos/RemieRichards/-tg-station/issues{/number}","pulls_url":"https://api.github.com/repos/RemieRichards/-tg-station/pulls{/number}","milestones_url":"https://api.github.com/repos/RemieRichards/-tg-station/milestones{/number}","notifications_url":"https://api.github.com/repos/RemieRichards/-tg-station/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RemieRichards/-tg-station/labels{/name}","releases_url":"https://api.github.com/repos/RemieRichards/-tg-station/releases{/id}","created_at":"2013-08-29T17:14:29Z","updated_at":"2015-11-02T04:14:52Z","pushed_at":"2015-12-26T23:19:26Z","git_url":"git://github.com/RemieRichards/-tg-station.git","ssh_url":"git@github.com:RemieRichards/-tg-station.git","clone_url":"https://github.com/RemieRichards/-tg-station.git","svn_url":"https://github.com/RemieRichards/-tg-station","homepage":"","size":595260,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"tgstation:master","ref":"master","sha":"7ab1cc29682276dbfe843e60de14de81b68cd347","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}","created_at":"2012-01-21T17:32:47Z","updated_at":"2015-12-26T21:22:57Z","pushed_at":"2015-12-28T21:06:32Z","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":743515,"stargazers_count":255,"watchers_count":255,"language":"DM","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":905,"mirror_url":null,"open_issues_count":834,"forks":905,"open_issues":834,"watchers":255,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/14076"},"html":{"href":"https://github.com/tgstation/-tg-station/pull/14076"},"issue":{"href":"https://api.github.com/repos/tgstation/-tg-station/issues/14076"},"comments":{"href":"https://api.github.com/repos/tgstation/-tg-station/issues/14076/comments"},"review_comments":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/14076/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/14076/commits"},"statuses":{"href":"https://api.github.com/repos/tgstation/-tg-station/statuses/3c9c6e5c198adc4770e9e9d58f33830ee2605266"}}}}