mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 20:37:34 +01:00
Removes the option to join as random job. (#6886)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
--
|
||||
-- Removes the Random Job Option
|
||||
--
|
||||
|
||||
UPDATE ss13_characters SET alternate_option = 0 WHERE alternate_option = 1;
|
||||
UPDATE ss13_characters SET alternate_option = 1 WHERE alternate_option = 2;
|
||||
@@ -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")
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
# admin
|
||||
# backend
|
||||
# security
|
||||
# refactor
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Arrow768
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscdel: "Removes the option to join as random job."
|
||||
Reference in New Issue
Block a user