{"action":"created","comment":{"url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/comments/73515708","id":73515708,"diff_hunk":"@@ -0,0 +1,197 @@\n+\n+// Globals, Defines, Etc\n+\n+var/global/list/exp_jobsmap = list(\n+\t\"Crew\" = list(), // all playtime from all jobs, together\n+\t\"Command\" = list(titles = command_positions),\n+\t\"Engineering\" = list(titles = engineering_positions),\n+\t\"Security\" = list(titles = security_positions),\n+\t\"Silicon\" = list(titles = nonhuman_positions),\n+\t\"Service\" = list(titles = service_positions),\n+\t\"Medical\" = list(titles = medical_positions),\n+\t\"Science\" = list(titles = science_positions),\n+\t\"Supply\" = list(titles = supply_positions),\n+\t\"Special\" = list(), // special_role\n+\t\"Ghost\" = list(), // dead/observer\n+\t\"Exempt\" = list() // special grandfather setting\n+)\n+\n+\n+// Admin Verbs\n+\n+\n+/client/proc/cmd_admin_check_player_exp()\t//Allows admins to determine who the newer players are.\n+\tset category = \"Admin\"\n+\tset name = \"Check Player Playtime\"\n+\tif(!check_rights(R_ADMIN))\n+\t\treturn\n+\tvar/msg = \"<html><head><title>Playtime Report</title></head><BR>Playtime:<BR>\"\n+\tfor(var/client/C in clients)\n+\t\tvar/list/play_records = params2list(C.prefs.exp)\n+\t\tvar/gen_exp_time = text2num(play_records[\"Crew\"])\n+\t\tgen_exp_time = num2text(round(gen_exp_time / 60)) + \"h\"\n+\t\tmsg += \"<BR> - [key_name_admin(C.mob)]: <A href='?_src_=holder;getplaytimewindow=\\ref[C.mob]'>\" + C.get_exp_general() + \"</a> \"\n+\tif(msg != \"\")","path":"code/game/jobs/job_exp.dm","position":34,"original_position":34,"commit_id":"bf57c32a1077ce5d0a4afb8392d51556881d0c76","original_commit_id":"bf57c32a1077ce5d0a4afb8392d51556881d0c76","user":{"login":"Krausus","id":10916307,"avatar_url":"https://avatars.githubusercontent.com/u/10916307?v=3","gravatar_id":"","url":"https://api.github.com/users/Krausus","html_url":"https://github.com/Krausus","followers_url":"https://api.github.com/users/Krausus/followers","following_url":"https://api.github.com/users/Krausus/following{/other_user}","gists_url":"https://api.github.com/users/Krausus/gists{/gist_id}","starred_url":"https://api.github.com/users/Krausus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krausus/subscriptions","organizations_url":"https://api.github.com/users/Krausus/orgs","repos_url":"https://api.github.com/users/Krausus/repos","events_url":"https://api.github.com/users/Krausus/events{/privacy}","received_events_url":"https://api.github.com/users/Krausus/received_events","type":"User","site_admin":false},"body":"`msg` starts with a default value, and only gets added to. This will never not be true.","created_at":"2016-08-04T12:54:05Z","updated_at":"2016-08-04T12:54:05Z","html_url":"https://github.com/ParadiseSS13/Paradise/pull/5224#discussion_r73515708","pull_request_url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/5224","_links":{"self":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/comments/73515708"},"html":{"href":"https://github.com/ParadiseSS13/Paradise/pull/5224#discussion_r73515708"},"pull_request":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/5224"}}},"pull_request":{"url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/5224","id":79168326,"html_url":"https://github.com/ParadiseSS13/Paradise/pull/5224","diff_url":"https://github.com/ParadiseSS13/Paradise/pull/5224.diff","patch_url":"https://github.com/ParadiseSS13/Paradise/pull/5224.patch","issue_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/5224","number":5224,"state":"open","locked":false,"title":"Playtime-based Job Unlocks","user":{"login":"Kyep","id":16434066,"avatar_url":"https://avatars.githubusercontent.com/u/16434066?v=3","gravatar_id":"","url":"https://api.github.com/users/Kyep","html_url":"https://github.com/Kyep","followers_url":"https://api.github.com/users/Kyep/followers","following_url":"https://api.github.com/users/Kyep/following{/other_user}","gists_url":"https://api.github.com/users/Kyep/gists{/gist_id}","starred_url":"https://api.github.com/users/Kyep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kyep/subscriptions","organizations_url":"https://api.github.com/users/Kyep/orgs","repos_url":"https://api.github.com/users/Kyep/repos","events_url":"https://api.github.com/users/Kyep/events{/privacy}","received_events_url":"https://api.github.com/users/Kyep/received_events","type":"User","site_admin":false},"body":"Our current jobs unlock system isn't great, for several reasons:\r\n- No matter how active you are, you can't unlock jobs any faster. \r\n- Conversely, no matter how inactive you are, come back in a month and all jobs will be unlocked automatically.\r\n- This results in players who have older accounts, but are completely new to Paradise, taking jobs like HoS and then trying to act how they do on their home severs - which does not work well here.\r\n- It also results in new players realizing there is nothing they can do to unlock the jobs they really want any faster, so they tend to \"go play another game for awhile\" - and often don't come back. \r\n\r\nThis PR:\r\n- Adds a new job unlock system, based on actual time played on the server. Jobs like Scientist and Security Officer can require a few hours of play on Paradise, even if you have an old account.\r\n- Head jobs require a few hours of playtime in their department. No longer can people play HoS without ever playing any other Sec job first.\r\n- Captain requires a few hours of playing as heads.\r\n\r\nPlease note:\r\n- ~~This is a work in progress. It is NOT finished. Some of it does not work yet. I am simply putting up the PR early for the sake of advice and comments.~~\r\n- This system relies upon the database. It won't work with filesystem-based char profiles.\r\n- The system can run in tracking-only mode. We can run it this way for a month, before enabling its restrictions on jobs, so that *regular players will already have suitable jobs unlocked on day one*. EDIT: there is also a SQL query that can be run after patching, to grandfather all existing, active players, and make sure they're counted as having all jobs unlocked.\r\n- ~~Right now it only counts your playtime at the end of rounds - but I'd like to make it count your playtime in 5-minute intervals - just not sure how to do this yet.~~ Code now logs your time during rounds, so if you only play part of a round, you still get credit for that time.\r\n- The actual requirements on jobs in this version of the PR are not in any way final, they're more test data than anything else. ~~E.g: HoS unlocks with two hours of playing security.~~ The actual numbers are likely to be a balance discussion - at this point I simply want to get the framework working.\r\n- This is not necessarily intended to fully replace the system of unlocking jobs based on your account being X days old. I'd would be *very happy* if it did, but my more modest goal is to apply it to at least heads-of-staff level jobs, perhaps some other jobs with WMD potential, like AI, Engineer and Scientist. The idea being that people who've never played here before shouldn't be able to hop right into jobs like that, regardless of their account age. They should have to play a little on Paradise before taking jobs with such power/authority/responsibility.\r\n\r\nThis PR has built-in tracking for how much each person plays the game, and in what departments they play. This allows admins to look at things like:\r\n- What % of playtime someone spends in each department / role group\r\n- What % of time someone is an antag / special role character\r\n- What % of time someone spends ghosting\r\n- How much experience someone has in each department\r\n- Whether someone plays as command jobs or not\r\n\r\nInformation like this lets us make better decisions, both for individuals, and at a server level. For example, it lets us tell the difference between someone who is truly new, and someone who is simply new to a particular job - regardless of their account age.\r\n\r\nThe stats could be useful for things other than gating job access. They could also help detect people who cryo every round they don't get antag, for example.\r\n\r\n**The main benefit, though, is the new gating system - basing access to jobs on experience, rather than simply account age.** This measures playtime far more accurately, and should dramatically reduce the number of cases of people playing Head roles without understanding the department they've signed up to manage.\r\n\r\n\r\n**POST-PATCH INSTALL INSTRUCTIONS**\r\n\r\n1) Add the col to the player table:\r\nALTER TABLE `player` ADD `exp` mediumtext NOT NULL DEFAULT ''\r\n\r\n2) Grandfather all active players, so they won't lose any jobs:\r\nUPDATE player SET exp='Exempt=1' WHERE lastseen >= '2016-04-01'\r\n\r\n3) Copy the USE_EXP_TRACKING section from config/example/config.txt to config/config.txt\r\nBe sure to enable the USE_EXP_TRACKING and USE_EXP_RESTRICTIONS_HEADS sections.\r\n\r\n:cl: Kyep\r\nadd: Added tracking for how much time each player spends in-round, and within each department.\r\nadd: Added the ability to lock jobs based on time played overall, and time played in the relevant department. E.g: play sec for X hours to unlock HoS. Existing players are grandfathered so they don't lose access to any jobs.\r\n/:cl:","created_at":"2016-07-28T10:02:08Z","updated_at":"2016-08-04T12:54:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a150728bf545db7ca480999e0b4d3386b560c32c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/5224/commits","review_comments_url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/5224/comments","review_comment_url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/5224/comments","statuses_url":"https://api.github.com/repos/ParadiseSS13/Paradise/statuses/bf57c32a1077ce5d0a4afb8392d51556881d0c76","head":{"label":"Kyep:jobs_unlock_system","ref":"jobs_unlock_system","sha":"bf57c32a1077ce5d0a4afb8392d51556881d0c76","user":{"login":"Kyep","id":16434066,"avatar_url":"https://avatars.githubusercontent.com/u/16434066?v=3","gravatar_id":"","url":"https://api.github.com/users/Kyep","html_url":"https://github.com/Kyep","followers_url":"https://api.github.com/users/Kyep/followers","following_url":"https://api.github.com/users/Kyep/following{/other_user}","gists_url":"https://api.github.com/users/Kyep/gists{/gist_id}","starred_url":"https://api.github.com/users/Kyep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kyep/subscriptions","organizations_url":"https://api.github.com/users/Kyep/orgs","repos_url":"https://api.github.com/users/Kyep/repos","events_url":"https://api.github.com/users/Kyep/events{/privacy}","received_events_url":"https://api.github.com/users/Kyep/received_events","type":"User","site_admin":false},"repo":{"id":49868854,"name":"Paradise","full_name":"Kyep/Paradise","owner":{"login":"Kyep","id":16434066,"avatar_url":"https://avatars.githubusercontent.com/u/16434066?v=3","gravatar_id":"","url":"https://api.github.com/users/Kyep","html_url":"https://github.com/Kyep","followers_url":"https://api.github.com/users/Kyep/followers","following_url":"https://api.github.com/users/Kyep/following{/other_user}","gists_url":"https://api.github.com/users/Kyep/gists{/gist_id}","starred_url":"https://api.github.com/users/Kyep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kyep/subscriptions","organizations_url":"https://api.github.com/users/Kyep/orgs","repos_url":"https://api.github.com/users/Kyep/repos","events_url":"https://api.github.com/users/Kyep/events{/privacy}","received_events_url":"https://api.github.com/users/Kyep/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Kyep/Paradise","description":"Paradise fork for submitting PRs","fork":true,"url":"https://api.github.com/repos/Kyep/Paradise","forks_url":"https://api.github.com/repos/Kyep/Paradise/forks","keys_url":"https://api.github.com/repos/Kyep/Paradise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kyep/Paradise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kyep/Paradise/teams","hooks_url":"https://api.github.com/repos/Kyep/Paradise/hooks","issue_events_url":"https://api.github.com/repos/Kyep/Paradise/issues/events{/number}","events_url":"https://api.github.com/repos/Kyep/Paradise/events","assignees_url":"https://api.github.com/repos/Kyep/Paradise/assignees{/user}","branches_url":"https://api.github.com/repos/Kyep/Paradise/branches{/branch}","tags_url":"https://api.github.com/repos/Kyep/Paradise/tags","blobs_url":"https://api.github.com/repos/Kyep/Paradise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kyep/Paradise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kyep/Paradise/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kyep/Paradise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kyep/Paradise/statuses/{sha}","languages_url":"https://api.github.com/repos/Kyep/Paradise/languages","stargazers_url":"https://api.github.com/repos/Kyep/Paradise/stargazers","contributors_url":"https://api.github.com/repos/Kyep/Paradise/contributors","subscribers_url":"https://api.github.com/repos/Kyep/Paradise/subscribers","subscription_url":"https://api.github.com/repos/Kyep/Paradise/subscription","commits_url":"https://api.github.com/repos/Kyep/Paradise/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kyep/Paradise/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kyep/Paradise/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kyep/Paradise/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kyep/Paradise/contents/{+path}","compare_url":"https://api.github.com/repos/Kyep/Paradise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kyep/Paradise/merges","archive_url":"https://api.github.com/repos/Kyep/Paradise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kyep/Paradise/downloads","issues_url":"https://api.github.com/repos/Kyep/Paradise/issues{/number}","pulls_url":"https://api.github.com/repos/Kyep/Paradise/pulls{/number}","milestones_url":"https://api.github.com/repos/Kyep/Paradise/milestones{/number}","notifications_url":"https://api.github.com/repos/Kyep/Paradise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kyep/Paradise/labels{/name}","releases_url":"https://api.github.com/repos/Kyep/Paradise/releases{/id}","deployments_url":"https://api.github.com/repos/Kyep/Paradise/deployments","created_at":"2016-01-18T10:15:30Z","updated_at":"2016-01-31T04:47:08Z","pushed_at":"2016-08-04T07:38:35Z","git_url":"git://github.com/Kyep/Paradise.git","ssh_url":"git@github.com:Kyep/Paradise.git","clone_url":"https://github.com/Kyep/Paradise.git","svn_url":"https://github.com/Kyep/Paradise","homepage":"http://nanotrasen.se/phpBB3/index.php","size":886386,"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":"d12d78871d959c3eff5e2a362941b902f7666d68","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-08-02T14:15:24Z","pushed_at":"2016-08-04T07:56:32Z","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":1003313,"stargazers_count":68,"watchers_count":68,"language":"DM","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":197,"mirror_url":null,"open_issues_count":299,"forks":197,"open_issues":299,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/5224"},"html":{"href":"https://github.com/ParadiseSS13/Paradise/pull/5224"},"issue":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/5224"},"comments":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/5224/comments"},"review_comments":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/5224/comments"},"review_comment":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/5224/commits"},"statuses":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/statuses/bf57c32a1077ce5d0a4afb8392d51556881d0c76"}}}}
{"actor":{"display_login":"Krausus"}}