Removes the option to join as random job. (#6886)

This commit is contained in:
Werner
2019-09-08 11:24:42 +02:00
committed by Erki
parent aa15e87049
commit 612bb40e30
5 changed files with 56 additions and 42 deletions

View File

@@ -1,8 +1,7 @@
/var/datum/controller/subsystem/jobs/SSjobs
#define GET_RANDOM_JOB 0
#define BE_ASSISTANT 1
#define RETURN_TO_LOBBY 2
#define BE_ASSISTANT 0
#define RETURN_TO_LOBBY 1
#define Debug(text) if (Debug2) {job_debug += text}
@@ -139,29 +138,6 @@
Debug("FOC pass, Player: [player], Level:[level]")
. += player
/datum/controller/subsystem/jobs/proc/GiveRandomJob(mob/abstract/new_player/player)
Debug("GRJ Giving random job, Player: [player]")
for(var/thing in shuffle(occupations))
var/datum/job/job = thing
if(!job)
continue
if(istype(job, GetJob("Assistant"))) // We don't want to give him assistant, that's boring!
continue
if(job in command_positions) //If you want a command position, select it!
continue
if(jobban_isbanned(player, job.title))
Debug("GRJ isbanned failed, Player: [player], Job: [job.title]")
continue
if((job.current_positions < job.spawn_positions) || job.spawn_positions == -1)
Debug("GRJ Random job given, Player: [player], Job: [job]")
AssignRole(player, job.title)
unassigned -= player
break
/datum/controller/subsystem/jobs/proc/ResetOccupations()
for(var/mob/abstract/new_player/player in player_list)
if((player) && (player.mind))
@@ -306,12 +282,6 @@
unassigned -= player
break
// Hand out random jobs to the people who didn't get any in the last check
// Also makes sure that they got their preference correct
for(var/mob/abstract/new_player/player in unassigned)
if(player.client.prefs.alternate_option == GET_RANDOM_JOB)
GiveRandomJob(player)
Debug("DO, Standard Check end")
Debug("DO, Running AC2")

View File

@@ -1,7 +1,6 @@
//used for pref.alternate_option
#define GET_RANDOM_JOB 0
#define BE_ASSISTANT 1
#define RETURN_TO_LOBBY 2
#define BE_ASSISTANT 0
#define RETURN_TO_LOBBY 1
/datum/category_item/player_setup_item/occupation
name = "Occupation"
@@ -112,7 +111,7 @@
log_debug("LOADING: Bad job preference key: [preference].")
log_debug(e.desc)
pref.alternate_option = sanitize_integer(text2num(pref.alternate_option), 0, 2, initial(pref.alternate_option))
pref.alternate_option = sanitize_integer(text2num(pref.alternate_option), 0, 1, initial(pref.alternate_option))
pref.job_civilian_high = sanitize_integer(text2num(pref.job_civilian_high), 0, 65535, initial(pref.job_civilian_high))
pref.job_civilian_med = sanitize_integer(text2num(pref.job_civilian_med), 0, 65535, initial(pref.job_civilian_med))
pref.job_civilian_low = sanitize_integer(text2num(pref.job_civilian_low), 0, 65535, initial(pref.job_civilian_low))
@@ -227,8 +226,6 @@
dat += "</center></table>"
switch(pref.alternate_option)
if(GET_RANDOM_JOB)
dat += "<center><br><u><a href='?src=\ref[src];job_alternative=1'><font color=green>Get random job if preferences unavailable</font></a></u></center><br>"
if(BE_ASSISTANT)
dat += "<center><br><u><a href='?src=\ref[src];job_alternative=1'><font color=red>Be assistant if preference unavailable</font></a></u></center><br>"
if(RETURN_TO_LOBBY)
@@ -245,10 +242,10 @@
return TOPIC_REFRESH
else if(href_list["job_alternative"])
if(pref.alternate_option == GET_RANDOM_JOB || pref.alternate_option == BE_ASSISTANT)
pref.alternate_option += 1
if(pref.alternate_option == BE_ASSISTANT)
pref.alternate_option = RETURN_TO_LOBBY
else if(pref.alternate_option == RETURN_TO_LOBBY)
pref.alternate_option = 0
pref.alternate_option = BE_ASSISTANT
return TOPIC_REFRESH
else if(href_list["select_alt_title"])

View File

@@ -94,7 +94,7 @@ datum/preferences
var/unsanitized_jobs = ""
//Keeps track of preferrence for not getting any wanted jobs
var/alternate_option = 2
var/alternate_option = RETURN_TO_LOBBY
var/used_skillpoints = 0
var/skill_specialization = null