mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-23 03:56:27 +01:00
Merge pull request #5211 from Anewbe/hidden_late_join
Hides jobs with the Never pref on late join
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
|
||||
/mob/new_player
|
||||
var/ready = 0
|
||||
var/spawning = 0//Referenced when you want to delete the new_player later on in the code.
|
||||
var/totalPlayers = 0 //Player counts for the Lobby tab
|
||||
var/spawning = 0 //Referenced when you want to delete the new_player later on in the code.
|
||||
var/totalPlayers = 0 //Player counts for the Lobby tab
|
||||
var/totalPlayersReady = 0
|
||||
var/show_hidden_jobs = 0 //Show jobs that are set to "Never" in preferences
|
||||
var/datum/browser/panel
|
||||
universal_speak = 1
|
||||
|
||||
@@ -115,7 +116,7 @@
|
||||
|
||||
if(alert(src,"Are you sure you wish to observe? You will have to wait 5 minutes before being able to respawn!","Player Setup","Yes","No") == "Yes")
|
||||
if(!client) return 1
|
||||
|
||||
|
||||
//Make a new mannequin quickly, and allow the observer to take the appearance
|
||||
var/mob/living/carbon/human/dummy/mannequin = new()
|
||||
client.prefs.dress_preview_mob(mannequin)
|
||||
@@ -285,6 +286,10 @@
|
||||
handle_server_news()
|
||||
return
|
||||
|
||||
if(href_list["hidden_jobs"])
|
||||
show_hidden_jobs = !show_hidden_jobs
|
||||
LateChoices()
|
||||
|
||||
/mob/new_player/proc/handle_server_news()
|
||||
if(!client)
|
||||
return
|
||||
@@ -412,10 +417,18 @@
|
||||
dat += "<font color='red'>The station is currently undergoing crew transfer procedures.</font><br>"
|
||||
|
||||
dat += "Choose from the following open/valid positions:<br>"
|
||||
dat += "<a href='byond://?src=\ref[src];hidden_jobs=1'>[show_hidden_jobs ? "Hide":"Show"] Hidden Jobs.</a><br>"
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
if(job && IsJobAvailable(job.title))
|
||||
// Checks for jobs with minimum age requirements
|
||||
if(job.minimum_character_age && (client.prefs.age < job.minimum_character_age))
|
||||
continue
|
||||
// Checks for jobs set to "Never" in preferences //TODO: Figure out a better way to check for this
|
||||
if(!(client.prefs.GetJobDepartment(job, 1) & job.flag))
|
||||
if(!(client.prefs.GetJobDepartment(job, 2) & job.flag))
|
||||
if(!(client.prefs.GetJobDepartment(job, 3) & job.flag))
|
||||
if(!show_hidden_jobs && job.title != "Assistant") // Assistant is always an option
|
||||
continue
|
||||
var/active = 0
|
||||
// Only players with the job assigned and AFK for less than 10 minutes count as active
|
||||
for(var/mob/M in player_list) if(M.mind && M.client && M.mind.assigned_role == job.title && M.client.inactivity <= 10 * 60 * 10)
|
||||
|
||||
Reference in New Issue
Block a user