{"action":"created","comment":{"url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/comments/66699161","id":66699161,"diff_hunk":"@@ -42,38 +66,87 @@\n \n \t\tvar/pos = findtext(t, \" \")\n \t\tvar/name = null\n-\t//\tvar/value = null\n \n \t\tif (pos)\n \t\t\tname = lowertext(copytext(t, 1, pos))\n-\t\t//\tvalue = copytext(t, pos + 1)\n+\n \t\telse\n \t\t\tname = lowertext(t)\n \n \t\tif (!name)\n \t\t\tcontinue\n \n-\t\tpotentialRandomZlevels.Add(t)\n+\t\tpotentialMaps.Add(t)\n \n+\treturn potentialMaps\n \n-\tif(potentialRandomZlevels.len)\n-\t\tvar/watch = start_watch()\n-\t\tlog_startup_progress(\"Loading away mission...\")\n \n-\t\tvar/map = pick(potentialRandomZlevels)\n-\t\tvar/file = file(map)\n-\t\tif(isfile(file))\n-\t\t\tmaploader.load_map(file, do_sleep = 0)\n-\t\t\tlate_setup_level(block(locate(1, 1, world.maxz), locate(world.maxx, world.maxy, world.maxz)))\n-\t\t\tlog_to_dd(\"  Away mission loaded: [map]\")\n+/proc/seedRuins(z_level = 1, budget = 0, whitelist = /area/space, list/potentialRuins = space_ruins_templates)\n+\tvar/overall_sanity = 100\n+\tvar/ruins = potentialRuins.Copy()\n+\tvar/initialbudget = budget\n+\tvar/watch = start_watch()\n \n-\t\tfor(var/obj/effect/landmark/L in landmarks_list)\n-\t\t\tif (L.name != \"awaystart\")\n+\tlog_startup_progress(\"Loading ruins...\")\n+\n+\twhile(budget > 0 && overall_sanity > 0)\n+\t\t// Pick a ruin\n+\t\tvar/datum/map_template/ruin/ruin = ruins[pick(ruins)]\n+\t\t// Can we afford it\n+\t\tif(ruin.cost > budget)\n+\t\t\toverall_sanity--\n+\t\t\tcontinue\n+\t\t// If so, try to place it\n+\t\tvar/sanity = 100\n+\t\t// And if we can't fit it anywhere, give up, try again\n+\n+\t\twhile(sanity > 0)\n+\t\t\tsanity--\n+\t\t\tvar/turf/T = locate(rand(25, world.maxx - 25), rand(25, world.maxy - 25), z_level)\n+\t\t\tvar/valid = 1\n+\n+\t\t\tfor(var/turf/check in ruin.get_affected_turfs(T,1))\n+\t\t\t\tvar/area/new_area = get_area(check)\n+\t\t\t\tif(!(istype(new_area, whitelist)))\n+\t\t\t\t\tvalid = 0\n+\t\t\t\t\tbreak\n+\n+\t\t\tif(!valid)\n \t\t\t\tcontinue\n-\t\t\tawaydestinations.Add(L)\n \n-\t\tlog_startup_progress(\"  Away mission loaded in [stop_watch(watch)]s.\")\n+\t\t\tlog_to_dd(\"  Ruin \\\"[ruin.name]\\\" loaded in [stop_watch(watch)]s at ([T.x], [T.y], [T.z]).\")\n \n-\telse\n-\t\tlog_startup_progress(\"  No away missions found.\")\n-\t\treturn\n\\ No newline at end of file\n+\t\t\tvar/obj/effect/ruin_loader/R = new /obj/effect/ruin_loader(T)\n+\t\t\tR.Load(ruins,ruin)\n+\t\t\tbudget -= ruin.cost\n+\t\t\tif(!ruin.allow_duplicates)\n+\t\t\t\truins -= ruin.name\n+\t\t\tbreak\n+\n+\tto_chat(world, \"<span class='danger'>  Loaded ruins. Or not.</span>\") //So the players don't know if we loaded ruins, but we do have a message\n+\n+\tif(initialbudget == budget) //Kill me\n+\t\tlog_to_dd(\"  No ruins loaded.\")","path":"code/modules/awaymissions/zlevel.dm","position":135,"original_position":135,"commit_id":"9f52a06829a2312b178359b03292730f024d7c5b","original_commit_id":"c60d7e22c670602cabfc6dc1fb9c5ef4114744df","user":{"login":"TheDZD","id":8212178,"avatar_url":"https://avatars.githubusercontent.com/u/8212178?v=3","gravatar_id":"","url":"https://api.github.com/users/TheDZD","html_url":"https://github.com/TheDZD","followers_url":"https://api.github.com/users/TheDZD/followers","following_url":"https://api.github.com/users/TheDZD/following{/other_user}","gists_url":"https://api.github.com/users/TheDZD/gists{/gist_id}","starred_url":"https://api.github.com/users/TheDZD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheDZD/subscriptions","organizations_url":"https://api.github.com/users/TheDZD/orgs","repos_url":"https://api.github.com/users/TheDZD/repos","events_url":"https://api.github.com/users/TheDZD/events{/privacy}","received_events_url":"https://api.github.com/users/TheDZD/received_events","type":"User","site_admin":false},"body":"Probably means the `(\"  No ruins loaded.\")`","created_at":"2016-06-11T02:25:04Z","updated_at":"2016-06-11T02:25:04Z","html_url":"https://github.com/ParadiseSS13/Paradise/pull/4578#discussion_r66699161","pull_request_url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/4578","_links":{"self":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/comments/66699161"},"html":{"href":"https://github.com/ParadiseSS13/Paradise/pull/4578#discussion_r66699161"},"pull_request":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/4578"}}},"pull_request":{"url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/4578","id":72488326,"html_url":"https://github.com/ParadiseSS13/Paradise/pull/4578","diff_url":"https://github.com/ParadiseSS13/Paradise/pull/4578.diff","patch_url":"https://github.com/ParadiseSS13/Paradise/pull/4578.patch","issue_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/4578","number":4578,"state":"open","locked":false,"title":"Ports TG randomized space ruins","user":{"login":"CrAzYPiLoT-SS13","id":9385129,"avatar_url":"https://avatars.githubusercontent.com/u/9385129?v=3","gravatar_id":"","url":"https://api.github.com/users/CrAzYPiLoT-SS13","html_url":"https://github.com/CrAzYPiLoT-SS13","followers_url":"https://api.github.com/users/CrAzYPiLoT-SS13/followers","following_url":"https://api.github.com/users/CrAzYPiLoT-SS13/following{/other_user}","gists_url":"https://api.github.com/users/CrAzYPiLoT-SS13/gists{/gist_id}","starred_url":"https://api.github.com/users/CrAzYPiLoT-SS13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CrAzYPiLoT-SS13/subscriptions","organizations_url":"https://api.github.com/users/CrAzYPiLoT-SS13/orgs","repos_url":"https://api.github.com/users/CrAzYPiLoT-SS13/repos","events_url":"https://api.github.com/users/CrAzYPiLoT-SS13/events{/privacy}","received_events_url":"https://api.github.com/users/CrAzYPiLoT-SS13/received_events","type":"User","site_admin":false},"body":"No longer a WIP PR, this is completely done.\r\nThanks to @KorPhaeron for this.\r\n\r\nPRs used:\r\nhttps://github.com/tgstation/tgstation/pull/17939\r\nhttps://github.com/tgstation/tgstation/pull/17478\r\nhttps://github.com/tgstation/tgstation/pull/17366\r\nhttps://github.com/tgstation/tgstation/pull/16072\r\nhttps://github.com/tgstation/tgstation/pull/16022\r\nhttps://github.com/tgstation/tgstation/pull/13802\r\n\r\nThanks to all the contributors to these PRs! Thanks to @RemieRichards for helping me resolve the runtime!\r\n\r\n:cl: CrAzYPiLoT\r\nrscadd: Ports randomized space ruins from /tg/ station. There is a number of maps which can be spawned at any location on the empty z-level at roundstart, and up to three random ones will be chosen each round. Credits to KorPhaeron.\r\nrscadd: Lays the groundwork for a future lavaland implementation, if we choose to have it.\r\n/:cl:","created_at":"2016-06-03T10:48:56Z","updated_at":"2016-06-11T02:25:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"04c6bc24de7f52e47175159af61403ec61a539a0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/4578/commits","review_comments_url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/4578/comments","review_comment_url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/4578/comments","statuses_url":"https://api.github.com/repos/ParadiseSS13/Paradise/statuses/9f52a06829a2312b178359b03292730f024d7c5b","head":{"label":"CrAzYPiLoT-SS13:space_ruins","ref":"space_ruins","sha":"9f52a06829a2312b178359b03292730f024d7c5b","user":{"login":"CrAzYPiLoT-SS13","id":9385129,"avatar_url":"https://avatars.githubusercontent.com/u/9385129?v=3","gravatar_id":"","url":"https://api.github.com/users/CrAzYPiLoT-SS13","html_url":"https://github.com/CrAzYPiLoT-SS13","followers_url":"https://api.github.com/users/CrAzYPiLoT-SS13/followers","following_url":"https://api.github.com/users/CrAzYPiLoT-SS13/following{/other_user}","gists_url":"https://api.github.com/users/CrAzYPiLoT-SS13/gists{/gist_id}","starred_url":"https://api.github.com/users/CrAzYPiLoT-SS13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CrAzYPiLoT-SS13/subscriptions","organizations_url":"https://api.github.com/users/CrAzYPiLoT-SS13/orgs","repos_url":"https://api.github.com/users/CrAzYPiLoT-SS13/repos","events_url":"https://api.github.com/users/CrAzYPiLoT-SS13/events{/privacy}","received_events_url":"https://api.github.com/users/CrAzYPiLoT-SS13/received_events","type":"User","site_admin":false},"repo":{"id":33202172,"name":"Paradise","full_name":"CrAzYPiLoT-SS13/Paradise","owner":{"login":"CrAzYPiLoT-SS13","id":9385129,"avatar_url":"https://avatars.githubusercontent.com/u/9385129?v=3","gravatar_id":"","url":"https://api.github.com/users/CrAzYPiLoT-SS13","html_url":"https://github.com/CrAzYPiLoT-SS13","followers_url":"https://api.github.com/users/CrAzYPiLoT-SS13/followers","following_url":"https://api.github.com/users/CrAzYPiLoT-SS13/following{/other_user}","gists_url":"https://api.github.com/users/CrAzYPiLoT-SS13/gists{/gist_id}","starred_url":"https://api.github.com/users/CrAzYPiLoT-SS13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CrAzYPiLoT-SS13/subscriptions","organizations_url":"https://api.github.com/users/CrAzYPiLoT-SS13/orgs","repos_url":"https://api.github.com/users/CrAzYPiLoT-SS13/repos","events_url":"https://api.github.com/users/CrAzYPiLoT-SS13/events{/privacy}","received_events_url":"https://api.github.com/users/CrAzYPiLoT-SS13/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CrAzYPiLoT-SS13/Paradise","description":"Paradise Station's GitHub repository. Please use icon_override when making new inhand icons for items, as our item_lefthand and item_righthand .dmi files are full due to a BYOND limitation.","fork":true,"url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise","forks_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/forks","keys_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/teams","hooks_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/hooks","issue_events_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/issues/events{/number}","events_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/events","assignees_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/assignees{/user}","branches_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/branches{/branch}","tags_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/tags","blobs_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/git/refs{/sha}","trees_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/statuses/{sha}","languages_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/languages","stargazers_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/stargazers","contributors_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/contributors","subscribers_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/subscribers","subscription_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/subscription","commits_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/commits{/sha}","git_commits_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/git/commits{/sha}","comments_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/comments{/number}","issue_comment_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/issues/comments{/number}","contents_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/contents/{+path}","compare_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/merges","archive_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/downloads","issues_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/issues{/number}","pulls_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/pulls{/number}","milestones_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/milestones{/number}","notifications_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/labels{/name}","releases_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/releases{/id}","deployments_url":"https://api.github.com/repos/CrAzYPiLoT-SS13/Paradise/deployments","created_at":"2015-03-31T18:23:11Z","updated_at":"2016-01-11T18:39:36Z","pushed_at":"2016-06-09T14:25:51Z","git_url":"git://github.com/CrAzYPiLoT-SS13/Paradise.git","ssh_url":"git@github.com:CrAzYPiLoT-SS13/Paradise.git","clone_url":"https://github.com/CrAzYPiLoT-SS13/Paradise.git","svn_url":"https://github.com/CrAzYPiLoT-SS13/Paradise","homepage":"http://nanotrasen.se/phpBB3/index.php","size":856451,"stargazers_count":0,"watchers_count":0,"language":"DM","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"ParadiseSS13:master","ref":"master","sha":"4d7aab53a2dd56eddcb80a473ef7cf36a57d3cce","user":{"login":"ParadiseSS13","id":9994901,"avatar_url":"https://avatars.githubusercontent.com/u/9994901?v=3","gravatar_id":"","url":"https://api.github.com/users/ParadiseSS13","html_url":"https://github.com/ParadiseSS13","followers_url":"https://api.github.com/users/ParadiseSS13/followers","following_url":"https://api.github.com/users/ParadiseSS13/following{/other_user}","gists_url":"https://api.github.com/users/ParadiseSS13/gists{/gist_id}","starred_url":"https://api.github.com/users/ParadiseSS13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ParadiseSS13/subscriptions","organizations_url":"https://api.github.com/users/ParadiseSS13/orgs","repos_url":"https://api.github.com/users/ParadiseSS13/repos","events_url":"https://api.github.com/users/ParadiseSS13/events{/privacy}","received_events_url":"https://api.github.com/users/ParadiseSS13/received_events","type":"Organization","site_admin":false},"repo":{"id":27286452,"name":"Paradise","full_name":"ParadiseSS13/Paradise","owner":{"login":"ParadiseSS13","id":9994901,"avatar_url":"https://avatars.githubusercontent.com/u/9994901?v=3","gravatar_id":"","url":"https://api.github.com/users/ParadiseSS13","html_url":"https://github.com/ParadiseSS13","followers_url":"https://api.github.com/users/ParadiseSS13/followers","following_url":"https://api.github.com/users/ParadiseSS13/following{/other_user}","gists_url":"https://api.github.com/users/ParadiseSS13/gists{/gist_id}","starred_url":"https://api.github.com/users/ParadiseSS13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ParadiseSS13/subscriptions","organizations_url":"https://api.github.com/users/ParadiseSS13/orgs","repos_url":"https://api.github.com/users/ParadiseSS13/repos","events_url":"https://api.github.com/users/ParadiseSS13/events{/privacy}","received_events_url":"https://api.github.com/users/ParadiseSS13/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ParadiseSS13/Paradise","description":"Paradise Station's GitHub main repository.","fork":false,"url":"https://api.github.com/repos/ParadiseSS13/Paradise","forks_url":"https://api.github.com/repos/ParadiseSS13/Paradise/forks","keys_url":"https://api.github.com/repos/ParadiseSS13/Paradise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ParadiseSS13/Paradise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ParadiseSS13/Paradise/teams","hooks_url":"https://api.github.com/repos/ParadiseSS13/Paradise/hooks","issue_events_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/events{/number}","events_url":"https://api.github.com/repos/ParadiseSS13/Paradise/events","assignees_url":"https://api.github.com/repos/ParadiseSS13/Paradise/assignees{/user}","branches_url":"https://api.github.com/repos/ParadiseSS13/Paradise/branches{/branch}","tags_url":"https://api.github.com/repos/ParadiseSS13/Paradise/tags","blobs_url":"https://api.github.com/repos/ParadiseSS13/Paradise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ParadiseSS13/Paradise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ParadiseSS13/Paradise/git/refs{/sha}","trees_url":"https://api.github.com/repos/ParadiseSS13/Paradise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ParadiseSS13/Paradise/statuses/{sha}","languages_url":"https://api.github.com/repos/ParadiseSS13/Paradise/languages","stargazers_url":"https://api.github.com/repos/ParadiseSS13/Paradise/stargazers","contributors_url":"https://api.github.com/repos/ParadiseSS13/Paradise/contributors","subscribers_url":"https://api.github.com/repos/ParadiseSS13/Paradise/subscribers","subscription_url":"https://api.github.com/repos/ParadiseSS13/Paradise/subscription","commits_url":"https://api.github.com/repos/ParadiseSS13/Paradise/commits{/sha}","git_commits_url":"https://api.github.com/repos/ParadiseSS13/Paradise/git/commits{/sha}","comments_url":"https://api.github.com/repos/ParadiseSS13/Paradise/comments{/number}","issue_comment_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/comments{/number}","contents_url":"https://api.github.com/repos/ParadiseSS13/Paradise/contents/{+path}","compare_url":"https://api.github.com/repos/ParadiseSS13/Paradise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ParadiseSS13/Paradise/merges","archive_url":"https://api.github.com/repos/ParadiseSS13/Paradise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ParadiseSS13/Paradise/downloads","issues_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues{/number}","pulls_url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls{/number}","milestones_url":"https://api.github.com/repos/ParadiseSS13/Paradise/milestones{/number}","notifications_url":"https://api.github.com/repos/ParadiseSS13/Paradise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ParadiseSS13/Paradise/labels{/name}","releases_url":"https://api.github.com/repos/ParadiseSS13/Paradise/releases{/id}","deployments_url":"https://api.github.com/repos/ParadiseSS13/Paradise/deployments","created_at":"2014-11-29T00:16:54Z","updated_at":"2016-06-04T16:53:28Z","pushed_at":"2016-06-10T23:28:35Z","git_url":"git://github.com/ParadiseSS13/Paradise.git","ssh_url":"git@github.com:ParadiseSS13/Paradise.git","clone_url":"https://github.com/ParadiseSS13/Paradise.git","svn_url":"https://github.com/ParadiseSS13/Paradise","homepage":"http://nanotrasen.se/phpBB3/index.php","size":932217,"stargazers_count":62,"watchers_count":62,"language":"DM","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":171,"mirror_url":null,"open_issues_count":274,"forks":171,"open_issues":274,"watchers":62,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/4578"},"html":{"href":"https://github.com/ParadiseSS13/Paradise/pull/4578"},"issue":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/4578"},"comments":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/4578/comments"},"review_comments":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/4578/comments"},"review_comment":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/4578/commits"},"statuses":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/statuses/9f52a06829a2312b178359b03292730f024d7c5b"}}}}
{"actor":{"display_login":"TheDZD"}}