diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index dfc2c24eb58..ec5b92e84d3 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -27,7 +27,7 @@ var/global/datum/controller/gameticker/ticker /datum/controller/gameticker/proc/pregame() do - pregame_timeleft = 60 + pregame_timeleft = 90 world << "Welcome to the pre-game lobby!" world << "Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds" while(current_state == GAME_STATE_PREGAME) diff --git a/code/game/jobs/jobprocs.dm b/code/game/jobs/jobprocs.dm index 3b7cf85b167..0dd8a220cbd 100644 --- a/code/game/jobs/jobprocs.dm +++ b/code/game/jobs/jobprocs.dm @@ -3,7 +3,7 @@ var/list/candidates = list() for (var/mob/new_player/player in unassigned) - if (player.preferences.occupation[level] == job) + if (player.preferences.occupation[job] == level) if (jobban_isbanned(player, job)) continue // if (player.jobs_restricted_by_gamemode && (job in player.jobs_restricted_by_gamemode)) @@ -20,6 +20,15 @@ player.mind.special_role = null return +/proc/FillHeadPosition(list/unassigned, job) + for (var/level = 1 to 3) + var/list/candidates = FindOccupationCandidates(unassigned, job, 4-level) + if (candidates.len) + var/mob/new_player/candidate = pick(candidates) + unassigned -= candidate + candidate.mind.assigned_role = job + return + /** Proc DivideOccupations * fills var "assigned_role" for all ready players. * This proc must not have any side effects besides of modifying "assigned_role". @@ -31,33 +40,28 @@ for (var/mob/new_player/player in world) if (player.client && player.ready && !player.mind.assigned_role) unassigned += player - for (var/level = 1 to 3) - if (jobban_isbanned(player, player.preferences.occupation[level])) - player.preferences.occupation[level] = "Assistant" +// for (var/level = 1 to 3) +// if (jobban_isbanned(player, player.preferences.occupation[4-level])) +// player.preferences.occupation[level] = "Assistant" // If someone picked AI before it was disabled, or has a saved profile with it // on a game that now lacks it, this will make sure they don't become the AI, // by changing that choice to Captain. - if (!config.allow_ai) - for (var/level = 1 to 3) - if (player.preferences.occupation[level] == "AI") - player.preferences.occupation[level] = "Captain" +// if (!config.allow_ai) +// for (var/level = 1 to 3) +// if (player.preferences.occupation[level] == "AI") +// player.preferences.occupation[level] = "Captain" if (unassigned.len == 0) return 0 - //Check for a Captain first - for (var/level = 1 to 3) - var/list/candidates = FindOccupationCandidates(unassigned, "Captain", level) - if (candidates.len) - var/mob/new_player/candidate = pick(candidates) - unassigned -= candidate - candidate.mind.assigned_role = "Captain" - break + //Fill head positions, first Captain than heads from least to most popular + for(var/occ in head_positions) + FillHeadPosition(unassigned, occ) //Then check for an AI for (var/level = 1 to 3)//Malf is a bit special as it replaces a normal job - var/list/candidates = FindOccupationCandidates(unassigned, "AI", level) + var/list/candidates = FindOccupationCandidates(unassigned, "AI", 4-level) if(ticker.mode.name == "AI malfunction") for(var/mob/new_player/player in candidates) if(!player.preferences.be_special & BE_MALF) @@ -77,13 +81,33 @@ player.mind.assigned_role = "AI" unassigned -= player break - //Now we can go though the rest of the jobs and players who set prefs + + // Now for most positions. Shuffle the list of unassigned players and go through it, giving them + // what they want. Easy for "best", more complicated for "okay" and "good" because we have to + // select randomly from their list of okay or good jobs. + for (var/level = 1 to 3) // Wish this could be from 3 to 1, but whatever. "Good" to "okay". + unassigned = shuffle(unassigned) // Maybe unnecessary to shuffle each time, but it's cheap. + for(var/mob/new_player/player in unassigned) + var/list/wantedJobs = list() + for(var/job in player.preferences.occupation) + if(player.preferences.occupation[job] == 4-level) + if(!(job in head_positions) && job != "AI" && occupation_eligible[job] != 0 && !jobban_isbanned(player,job)) + wantedJobs += job + if(length(wantedJobs) > 0) + player.mind.assigned_role = pick(wantedJobs) + occupation_eligible[player.mind.assigned_role]-- + unassigned -= player + else + player.mind.assigned_role = "Assistant" + + +/* //Now we can go though the rest of the jobs and players who set prefs for (var/level = 1 to 3) //Assistants are checked first for (var/occupation in assistant_occupations) if (unassigned.len == 0) break - var/list/candidates = FindOccupationCandidates(unassigned, occupation, level) + var/list/candidates = FindOccupationCandidates(unassigned, occupation, 4-level) while(candidates.len && assistant_occupations[occupation]) assistant_occupations[occupation]-- var/mob/new_player/candidate = pick_n_take(candidates) @@ -95,7 +119,7 @@ break if (occupation_eligible[occupation] == 0) continue - var/list/candidates = FindOccupationCandidates(unassigned, occupation, level) + var/list/candidates = FindOccupationCandidates(unassigned, occupation, 4-level) while (candidates.len && occupation_eligible[occupation]) occupation_eligible[occupation]-- var/mob/new_player/candidate = pick_n_take(candidates) @@ -126,7 +150,7 @@ player.mind.assigned_role = pick(occupationsPossible) assistant_occupations[player.mind.assigned_role]-- // player.mind.assigned_role = pick(assistant_occupations) - +*/ return 1 /mob/living/carbon/human/proc/Equip_Rank(rank, joined_late) diff --git a/code/game/jobs/jobs.dm b/code/game/jobs/jobs.dm index 7ec63c459a1..415c100dcb5 100644 --- a/code/game/jobs/jobs.dm +++ b/code/game/jobs/jobs.dm @@ -293,16 +293,20 @@ proc/assignment_algorithm(var/list/mob/new_player/players) var/list/occupations = list( + "Captain" = 1, //Civilian jobs "Head of Personnel" = 1, //soul "Clown" = 1, "Mime" = 1, + "Chaplain" = 1, + "Librarian" = 1, //body "Bartender" = 1, "Chef" = 1, + "Botanist" = 2, "Janitor" = 1, "Quartermaster" = 1, "Cargo Technician" = 3, @@ -318,22 +322,24 @@ var/list/occupations = list( "Warden" = 1, "Detective" = 1, "Security Officer" = 5, + "Lawyer" = 2, //medbay "Chief Medical Officer" = 1, "Medical Doctor" = 5, + "Geneticist" = 2, "Chemist" = 2, //science dept "Research Director" = 1, - "Geneticist" = 2, "Scientist" = 3, - "Botanist" = 2, "Virologist" = 1, //I afraid I can't do that, Dave -// "AI" = 1,now picked like the captain - "Cyborg" = 1 + "AI" = 1, + "Cyborg" = 1, + + "Assistant" = -1 ) @@ -351,11 +357,11 @@ var/list/assistant_occupations = list( var/list/head_positions = list( "Captain", - "Head of Personnel", - "Head of Security", + "Chief Medical Officer", "Chief Engineer", + "Head of Personnel", "Research Director", - "Chief Medical Officer" + "Head of Security" ) var/list/nonhuman_positions = list( diff --git a/code/game/objects/items/weapons/papers_bins.dm b/code/game/objects/items/weapons/papers_bins.dm index 31106e663fa..5d6475d37e2 100644 --- a/code/game/objects/items/weapons/papers_bins.dm +++ b/code/game/objects/items/weapons/papers_bins.dm @@ -187,6 +187,8 @@ CLIPBOARDS n_name = copytext(n_name, 1, 32) if ((src.loc == usr && usr.stat == 0)) src.name = text("paper[]", (n_name ? text("- '[n_name]'") : null)) + if(src.icon_state == "paper_blank" && n_name != "") + src.icon_state = "paper" src.add_fingerprint(usr) return @@ -235,6 +237,8 @@ CLIPBOARDS */ t = text("[]", t) + if(src.icon_state == "paper_blank") + src.icon_state = "paper" src.info += t else @@ -359,6 +363,7 @@ CLIPBOARDS src.amount-- var/obj/item/weapon/paper/P = new /obj/item/weapon/paper P.loc = usr.loc + P.icon_state = "paper_blank" if(ishuman(usr)) if(!usr.get_active_hand()) usr.put_in_hand(P) diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index e9ef8c6ac67..85470ab0aa2 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -43,7 +43,7 @@ datum/preferences var/underwear = 1 var/bubbles = 0 // 0 if the player doesn't want bubbles to appear - var/occupation[] = list("No Preference", "No Preference", "No Preference") + var/occupation[length(occupations)] var/datum/jobs/wanted_jobs = list() var/h_style = "Short Hair" @@ -68,6 +68,8 @@ datum/preferences New() randomize_name() + for(var/n in occupation) + n=1 ..() //The mob should have a gender you want before running this proc. @@ -379,7 +381,7 @@ datum/preferences update_preview_icon() user << browse_rsc(preview_icon, "previewicon.png") - var/list/destructive = list("Assistant") //only the actual assistants should terminate the list +// var/list/destructive = list("Assistant") //only the actual assistants should terminate the list var/dat = "
" dat += "Name: " dat += "[real_name] " @@ -403,30 +405,8 @@ datum/preferences dat += "Change colour| __ |
| Body "
dat += "(®)" // Random look
@@ -486,118 +466,62 @@ datum/preferences
user << browse(dat, "window=preferences;size=300x710")
- proc/SetChoices(mob/user, occ=1)
+ proc/SetChoices(mob/user, changedjob)
var/HTML = ""
HTML += " " - if(2.0) - HTML += "Which occupation would you like if you couldn't have your first? " - if(3.0) - HTML += "Which occupation would you like if you couldn't have the others? " - else - for(var/job in uniquelist(occupations + assistant_occupations) ) - if ((job!="AI" || config.allow_ai) && !jobban_isbanned(user, job)) - HTML += "[job] " + HTML += "Choose occupations Unavailable occupations are in red. " + for(var/job in occupations ) + if ((job!="AI" || config.allow_ai)) + if(jobban_isbanned(user, job)) + HTML += "" + if(job in head_positions || job=="AI") + HTML += "[job]" + else + HTML += "[job]" + if(jobban_isbanned(user, job)) + HTML += "" + if (!occupation[job]) + occupation[job]=0 + switch(occupation[job]) + if(0) + if(job=="Assistant") + HTML += "\[PleaseNo]" + else + HTML += "\[NEVER]" + if(1) + HTML += "\[Okay]" + if(2) + HTML += "\[Good]" + if(3) + HTML += "\[Best!]" + else HTML += "*"+occupation[job]+"*" + HTML += " " - if(!jobban_isbanned(user, "AI")) - HTML += "AI " - if(!jobban_isbanned(user, "Captain")) - HTML += "Captain " HTML += " " - HTML += "\[No Preference\] " - HTML += "\[Cancel\]" + HTML += "\[Done\]" HTML += "
|