mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Refactored job preferences (#30034)
* Refactored job preferences * remove more useless shit * i swear it's useless * step * keep the list clean
This commit is contained in:
@@ -64,6 +64,7 @@ CREATE TABLE jobs (
|
||||
job_engsec_high INTEGER,
|
||||
job_engsec_med INTEGER,
|
||||
job_engsec_low INTEGER,
|
||||
jobs TEXT,
|
||||
FOREIGN KEY ( player_ckey, player_slot ) REFERENCES players ( player_ckey, player_slot ) ON DELETE CASCADE,
|
||||
UNIQUE ( player_ckey, player_slot )
|
||||
);
|
||||
|
||||
@@ -8,3 +8,9 @@
|
||||
#define SPECIAL_POPUP_DISABLED 0 // only output to chat
|
||||
#define SPECIAL_POPUP_EXCLUSIVE 1 // only output to special
|
||||
#define SPECIAL_POPUP_USE_BOTH 2 // output to both chat and special
|
||||
|
||||
// /datum/preferences/var/jobs
|
||||
#define JOB_PREF_HIGH 3
|
||||
#define JOB_PREF_MED 2
|
||||
#define JOB_PREF_LOW 1
|
||||
#define JOB_PREF_NEVER 0
|
||||
|
||||
@@ -528,7 +528,7 @@ Assign your candidates in choose_candidates() instead.
|
||||
/datum/dynamic_ruleset/roundstart/malf/proc/displace_AI(var/mob/new_player/old_AI)
|
||||
old_AI.mind.assigned_role = null
|
||||
var/list/shuffledoccupations = shuffle(job_master.occupations)
|
||||
for(var/level = 1 to 3)
|
||||
for(var/level = 3 to 1 step -1)
|
||||
if(old_AI.mind.assigned_role)
|
||||
break
|
||||
for(var/datum/job/job in shuffledoccupations)
|
||||
|
||||
@@ -342,33 +342,12 @@ We don't care about names, DNA, accounts, activity, any of that. We're just gonn
|
||||
for(var/mob/new_player/player in player_list)
|
||||
if(!player.ready)
|
||||
continue
|
||||
//Prefs are only stored as a bitflag, so we have to look up the job name.
|
||||
//Only one of these should have a value
|
||||
|
||||
var/J = null
|
||||
if(player.client.prefs.job_engsec_high)
|
||||
J = flags_to_job(player.client.prefs.job_engsec_high,ENGSEC)
|
||||
else if(player.client.prefs.job_medsci_high)
|
||||
J = flags_to_job(player.client.prefs.job_medsci_high,MEDSCI)
|
||||
else if(player.client.prefs.job_civilian_high)
|
||||
J = flags_to_job(player.client.prefs.job_civilian_high,CIVILIAN)
|
||||
else
|
||||
continue //They don't have a high pref!
|
||||
var/list/jobs = player.client.prefs.jobs
|
||||
|
||||
if(!J)
|
||||
continue //sanity
|
||||
crystal_ball[J] += 1
|
||||
|
||||
/datum/controller/occupations/proc/flags_to_job(var/flags, var/department)
|
||||
var/list/searchable_jobs = typesof(/datum/job) - /datum/job
|
||||
for(var/path in searchable_jobs)
|
||||
var/datum/job/J = path
|
||||
if(initial(J.department_flag) != department)
|
||||
continue
|
||||
if(initial(J.flag) != flags)
|
||||
continue
|
||||
return initial(J.title)
|
||||
return null //Still nothing? Null it is
|
||||
for(var/job in jobs)
|
||||
if(jobs[job] == JOB_PREF_HIGH)
|
||||
crystal_ball[job] += 1
|
||||
|
||||
/*
|
||||
We can't just insert in HTML into the nanoUI so we need the raw data to play with.
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/datum/job/assistant
|
||||
title = "Assistant"
|
||||
flag = ASSISTANT
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
spawn_positions = -1
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/datum/job/captain
|
||||
title = "Captain"
|
||||
flag = CAPTAIN
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -15,7 +13,7 @@
|
||||
species_whitelist = list("Human")
|
||||
|
||||
outfit_datum = /datum/outfit/captain
|
||||
|
||||
|
||||
/datum/job/captain/get_access()
|
||||
return get_all_accesses()
|
||||
|
||||
@@ -27,8 +25,6 @@
|
||||
|
||||
/datum/job/hop
|
||||
title = "Head of Personnel"
|
||||
flag = HOP
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
//Food
|
||||
/datum/job/bartender
|
||||
title = "Bartender"
|
||||
flag = BARTENDER
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -15,8 +13,6 @@
|
||||
|
||||
/datum/job/chef
|
||||
title = "Chef"
|
||||
flag = CHEF
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -30,8 +26,6 @@
|
||||
|
||||
/datum/job/hydro
|
||||
title = "Botanist"
|
||||
flag = BOTANIST
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 3
|
||||
spawn_positions = 2
|
||||
@@ -46,8 +40,6 @@
|
||||
//Cargo
|
||||
/datum/job/qm
|
||||
title = "Quartermaster"
|
||||
flag = QUARTERMASTER
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -60,8 +52,6 @@
|
||||
|
||||
/datum/job/cargo_tech
|
||||
title = "Cargo Technician"
|
||||
flag = CARGOTECH
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
@@ -74,8 +64,6 @@
|
||||
|
||||
/datum/job/mining
|
||||
title = "Shaft Miner"
|
||||
flag = MINER
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 3
|
||||
spawn_positions = 3
|
||||
@@ -88,8 +76,6 @@
|
||||
|
||||
/datum/job/clown
|
||||
title = "Clown"
|
||||
flag = CLOWN
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -120,8 +106,6 @@
|
||||
|
||||
/datum/job/mime
|
||||
title = "Mime"
|
||||
flag = MIME
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -171,8 +155,6 @@
|
||||
|
||||
/datum/job/janitor
|
||||
title = "Janitor"
|
||||
flag = JANITOR
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -191,8 +173,6 @@
|
||||
//More or less assistants
|
||||
/datum/job/librarian
|
||||
title = "Librarian"
|
||||
flag = LIBRARIAN
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -206,8 +186,6 @@
|
||||
|
||||
/datum/job/iaa
|
||||
title = "Internal Affairs Agent"
|
||||
flag = LAWYER
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
@@ -221,8 +199,6 @@
|
||||
|
||||
/datum/job/chaplain
|
||||
title = "Chaplain"
|
||||
flag = CHAPLAIN
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -232,4 +208,4 @@
|
||||
access = list(access_morgue, access_chapel_office, access_crematorium, access_maint_tunnels)
|
||||
minimal_access = list(access_morgue, access_chapel_office, access_crematorium)
|
||||
outfit_datum = /datum/outfit/chaplain
|
||||
var/datum/religion/chap_religion
|
||||
var/datum/religion/chap_religion
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/datum/job/chief_engineer
|
||||
title = "Chief Engineer"
|
||||
flag = CHIEF
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -22,8 +20,6 @@
|
||||
|
||||
/datum/job/engineer
|
||||
title = "Station Engineer"
|
||||
flag = ENGINEER
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 5
|
||||
spawn_positions = 5
|
||||
@@ -37,8 +33,6 @@
|
||||
|
||||
/datum/job/atmos
|
||||
title = "Atmospheric Technician"
|
||||
flag = ATMOSTECH
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 3
|
||||
spawn_positions = 2
|
||||
@@ -51,8 +45,6 @@
|
||||
|
||||
/datum/job/mechanic
|
||||
title = "Mechanic"
|
||||
flag = MECHANIC
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 3
|
||||
spawn_positions = 2
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
var/list/access = list() //Useful for servers which either have fewer players, so each person needs to fill more than one role, or servers which like to give more access, so players can't hide forever in their super secure departments (I'm looking at you, chemistry!)
|
||||
|
||||
//Bitflags for the job
|
||||
var/flag = 0
|
||||
var/info_flag = 0
|
||||
var/department_flag = 0
|
||||
|
||||
//Players will be allowed to spawn in as jobs that are set to "Station"
|
||||
var/faction = "None"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/datum/job/cmo
|
||||
title = "Chief Medical Officer"
|
||||
flag = CMO
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -22,8 +20,6 @@
|
||||
|
||||
/datum/job/doctor
|
||||
title = "Medical Doctor"
|
||||
flag = DOCTOR
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 5
|
||||
spawn_positions = 3
|
||||
@@ -38,8 +34,6 @@
|
||||
//Chemist is a medical job damnit //YEAH FUCK YOU SCIENCE -Pete //Guys, behave -Erro //No, fuck science
|
||||
/datum/job/chemist
|
||||
title = "Chemist"
|
||||
flag = CHEMIST
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
@@ -53,8 +47,6 @@
|
||||
|
||||
/datum/job/geneticist
|
||||
title = "Geneticist"
|
||||
flag = GENETICIST
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
@@ -67,8 +59,6 @@
|
||||
|
||||
/datum/job/virologist
|
||||
title = "Virologist"
|
||||
flag = VIROLOGIST
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -82,8 +72,6 @@
|
||||
|
||||
/datum/job/paramedic
|
||||
title = "Paramedic"
|
||||
flag = PARAMEDIC
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 4
|
||||
spawn_positions = 2
|
||||
@@ -98,8 +86,6 @@
|
||||
/*
|
||||
/datum/job/psychiatrist
|
||||
title = "Psychiatrist"
|
||||
flag = PSYCHIATRIST
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/datum/job/rd
|
||||
title = "Research Director"
|
||||
flag = RD
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -23,8 +21,6 @@
|
||||
|
||||
/datum/job/scientist
|
||||
title = "Scientist"
|
||||
flag = SCIENTIST
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 5
|
||||
spawn_positions = 3
|
||||
@@ -40,8 +36,6 @@
|
||||
|
||||
/datum/job/xenoarchaeologist
|
||||
title = "Xenoarchaeologist"
|
||||
flag = XENOARCH
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
@@ -57,8 +51,6 @@
|
||||
|
||||
datum/job/xenobiologist
|
||||
title = "Xenobiologist"
|
||||
flag = XENOBIO
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
@@ -73,8 +65,6 @@ datum/job/xenobiologist
|
||||
|
||||
/datum/job/roboticist
|
||||
title = "Roboticist"
|
||||
flag = ROBOTICIST
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/datum/job/hos
|
||||
title = "Head of Security"
|
||||
flag = HOS
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -31,8 +29,6 @@
|
||||
|
||||
/datum/job/warden
|
||||
title = "Warden"
|
||||
flag = WARDEN
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -46,8 +42,6 @@
|
||||
|
||||
/datum/job/detective
|
||||
title = "Detective"
|
||||
flag = DETECTIVE
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
@@ -62,8 +56,6 @@
|
||||
|
||||
/datum/job/officer
|
||||
title = "Security Officer"
|
||||
flag = OFFICER
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 5
|
||||
spawn_positions = 5
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/datum/job/ai
|
||||
title = "AI"
|
||||
flag = AI
|
||||
info_flag = JINFO_SILICON
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 0
|
||||
spawn_positions = 1
|
||||
@@ -21,9 +19,7 @@
|
||||
|
||||
/datum/job/cyborg
|
||||
title = "Cyborg"
|
||||
flag = CYBORG
|
||||
info_flag = JINFO_SILICON
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 0
|
||||
spawn_positions = 2
|
||||
@@ -38,9 +34,7 @@
|
||||
|
||||
/datum/job/mommi
|
||||
title = "Mobile MMI"
|
||||
flag = MOMMI
|
||||
info_flag = JINFO_SILICON
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 0
|
||||
spawn_positions = 2
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/datum/job/trader
|
||||
title = "Trader"
|
||||
flag = TRADER
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 3
|
||||
spawn_positions = 3
|
||||
|
||||
@@ -184,7 +184,7 @@ var/global/datum/controller/occupations/job_master
|
||||
if(flag && !player.client.desires_role(job.title))
|
||||
Debug("FOC flag failed, Player: [player], Flag: [flag], ")
|
||||
continue
|
||||
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
|
||||
if(player.client.prefs.jobs[job.title] == level)
|
||||
Debug("FOC pass, Player: [player], Level:[level]")
|
||||
candidates += player
|
||||
return candidates
|
||||
@@ -280,7 +280,7 @@ var/global/datum/controller/occupations/job_master
|
||||
|
||||
// Loop through all levels from high to low
|
||||
var/list/shuffledoccupations = shuffle(occupations)
|
||||
for(var/level = 1 to 3)
|
||||
for(var/level = 3 to 1 step -1)
|
||||
//Check the head jobs first each level
|
||||
CheckHeadPositions(level)
|
||||
|
||||
@@ -350,7 +350,7 @@ var/global/datum/controller/occupations/job_master
|
||||
final_pass: //this is a loop label
|
||||
for(var/mob/new_player/player in unassigned)
|
||||
if(player.client.prefs.alternate_option == GET_EMPTY_JOB)
|
||||
for(var/level = 1 to 3)
|
||||
for(var/level = 3 to 1 step -1)
|
||||
for(var/datum/job/job in shuffledoccupations)
|
||||
if(job.current_positions) //already someone in this job title
|
||||
continue
|
||||
@@ -373,7 +373,7 @@ var/global/datum/controller/occupations/job_master
|
||||
Debug("DO player not old enough, Player: [player], Job:[job.title]")
|
||||
return FALSE
|
||||
// If the player wants that job on this level, then try give it to him.
|
||||
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
|
||||
if(player.client.prefs.jobs[job.title] == level)
|
||||
if (job.title == "Assistant" && !CheckAssistantCount(player, level))
|
||||
return FALSE
|
||||
// If the job isn't filled
|
||||
@@ -397,7 +397,7 @@ var/global/datum/controller/occupations/job_master
|
||||
Debug("AC1 failed, not enough sec.")
|
||||
// Does he want anything else...?
|
||||
for (var/datum/job/J in occupations)
|
||||
if (player.client.prefs.GetJobDepartment(J, level) & J.flag)
|
||||
if (player.client.prefs.jobs[J.title] == level)
|
||||
Debug("AC1 failed, but other job slots for [player]. Adding them to the list of backup assistant slots.")
|
||||
assistant_second_chance[player.ckey] = level
|
||||
return FALSE
|
||||
@@ -572,14 +572,15 @@ var/global/datum/controller/occupations/job_master
|
||||
if(!job.player_old_enough(player.client))
|
||||
level6++
|
||||
continue
|
||||
if(player.client.prefs.GetJobDepartment(job, 1) & job.flag)
|
||||
level1++
|
||||
else if(player.client.prefs.GetJobDepartment(job, 2) & job.flag)
|
||||
level2++
|
||||
else if(player.client.prefs.GetJobDepartment(job, 3) & job.flag)
|
||||
level3++
|
||||
else
|
||||
level4++ //not selected
|
||||
switch(player.client.prefs.jobs[job.title])
|
||||
if(JOB_PREF_LOW)
|
||||
level1++
|
||||
if(JOB_PREF_MED)
|
||||
level2++
|
||||
if(JOB_PREF_HIGH)
|
||||
level3++
|
||||
else
|
||||
level4++ //not selected
|
||||
|
||||
tmp_str += "HIGH=[level1]|MEDIUM=[level2]|LOW=[level3]|NEVER=[level4]|BANNED=[level5]|YOUNG=[level6]|-"
|
||||
feedback_add_details("job_preferences",tmp_str)
|
||||
|
||||
@@ -1,53 +1,3 @@
|
||||
var/const/ENGSEC =(1<<0)
|
||||
|
||||
var/const/CAPTAIN =(1<<0)
|
||||
var/const/HOS =(1<<1)
|
||||
var/const/WARDEN =(1<<2)
|
||||
var/const/DETECTIVE =(1<<3)
|
||||
var/const/OFFICER =(1<<4)
|
||||
var/const/CHIEF =(1<<5)
|
||||
var/const/ENGINEER =(1<<6)
|
||||
var/const/ATMOSTECH =(1<<7)
|
||||
var/const/ROBOTICIST =(1<<8)
|
||||
var/const/AI =(1<<9)
|
||||
var/const/CYBORG =(1<<10)
|
||||
var/const/MOMMI =(1<<11)
|
||||
var/const/MECHANIC =(1<<12)
|
||||
|
||||
|
||||
var/const/MEDSCI =(1<<1)
|
||||
|
||||
var/const/RD =(1<<0)
|
||||
var/const/SCIENTIST =(1<<1)
|
||||
var/const/CHEMIST =(1<<2)
|
||||
var/const/CMO =(1<<3)
|
||||
var/const/DOCTOR =(1<<4)
|
||||
var/const/GENETICIST =(1<<5)
|
||||
var/const/VIROLOGIST =(1<<6)
|
||||
//var/const/PSYCHIATRIST =(1<<7)
|
||||
var/const/PARAMEDIC =(1<<7)
|
||||
var/const/XENOARCH =(1<<9)
|
||||
var/const/XENOBIO =(1<<10)
|
||||
|
||||
|
||||
var/const/CIVILIAN =(1<<2)
|
||||
|
||||
var/const/HOP =(1<<0)
|
||||
var/const/BARTENDER =(1<<1)
|
||||
var/const/BOTANIST =(1<<2)
|
||||
var/const/CHEF =(1<<3)
|
||||
var/const/JANITOR =(1<<4)
|
||||
var/const/LIBRARIAN =(1<<5)
|
||||
var/const/QUARTERMASTER =(1<<6)
|
||||
var/const/CARGOTECH =(1<<7)
|
||||
var/const/MINER =(1<<8)
|
||||
var/const/LAWYER =(1<<9)
|
||||
var/const/CHAPLAIN =(1<<10)
|
||||
var/const/CLOWN =(1<<11)
|
||||
var/const/MIME =(1<<12)
|
||||
var/const/ASSISTANT =(1<<13)
|
||||
var/const/TRADER =(1<<14)
|
||||
|
||||
var/list/command_positions = list(
|
||||
"Captain",
|
||||
"Head of Personnel",
|
||||
|
||||
@@ -160,18 +160,7 @@ var/const/MAX_SAVE_SLOTS = 16
|
||||
var/preview_background = null
|
||||
var/list/background_options = list("Black", "White", "Tile")
|
||||
|
||||
//Jobs, uses bitflags
|
||||
var/job_civilian_high = 0
|
||||
var/job_civilian_med = 0
|
||||
var/job_civilian_low = 0
|
||||
|
||||
var/job_medsci_high = 0
|
||||
var/job_medsci_med = 0
|
||||
var/job_medsci_low = 0
|
||||
|
||||
var/job_engsec_high = 0
|
||||
var/job_engsec_med = 0
|
||||
var/job_engsec_low = 0
|
||||
var/list/jobs = list()
|
||||
|
||||
//Keeps track of preferrence for not getting any wanted jobs
|
||||
var/alternate_option = RETURN_TO_LOBBY
|
||||
@@ -458,36 +447,14 @@ var/const/MAX_SAVE_SLOTS = 16
|
||||
return dat
|
||||
|
||||
/datum/preferences/proc/getPrefLevelText(var/datum/job/job)
|
||||
if(GetJobDepartment(job, 1) & job.flag)
|
||||
return "High"
|
||||
else if(GetJobDepartment(job, 2) & job.flag)
|
||||
return "Medium"
|
||||
else if(GetJobDepartment(job, 3) & job.flag)
|
||||
return "Low"
|
||||
else
|
||||
return "NEVER"
|
||||
|
||||
/datum/preferences/proc/getPrefLevelUpOrDown(var/datum/job/job, var/inc)
|
||||
if(GetJobDepartment(job, 1) & job.flag)
|
||||
if(inc)
|
||||
return "NEVER"
|
||||
else
|
||||
return "Medium"
|
||||
else if(GetJobDepartment(job, 2) & job.flag)
|
||||
if(inc)
|
||||
switch(jobs[job.title])
|
||||
if(JOB_PREF_HIGH)
|
||||
return "High"
|
||||
else
|
||||
return "Low"
|
||||
else if(GetJobDepartment(job, 3) & job.flag)
|
||||
if(inc)
|
||||
if(JOB_PREF_MED)
|
||||
return "Medium"
|
||||
else
|
||||
return "NEVER"
|
||||
else
|
||||
if(inc)
|
||||
if(JOB_PREF_LOW)
|
||||
return "Low"
|
||||
else
|
||||
return "High"
|
||||
return "NEVER"
|
||||
|
||||
/datum/preferences/proc/SetChoices(mob/user, limit = 17, list/splitJobs = list("Chief Engineer", "AI"), widthPerColumn = 295, height = 620)
|
||||
if(!job_master)
|
||||
@@ -502,20 +469,18 @@ var/const/MAX_SAVE_SLOTS = 16
|
||||
|
||||
var/HTML = "<link href='./common.css' rel='stylesheet' type='text/css'><body>"
|
||||
HTML += {"<script type='text/javascript'>function setJobPrefRedirect(level, rank) { window.location.href='?_src_=prefs;preference=job;task=input;level=' + level + ';text=' + encodeURIComponent(rank); return false; }
|
||||
function mouseDown(event,levelup,leveldown,rank){
|
||||
function mouseDown(event,rank){
|
||||
return false;
|
||||
}
|
||||
|
||||
function mouseUp(event,levelup,leveldown,rank){
|
||||
function mouseUp(event,rank){
|
||||
if(event.button == 0 || event.button == 1)
|
||||
{
|
||||
//alert("left click " + levelup + " " + rank);
|
||||
setJobPrefRedirect(1, rank);
|
||||
return false;
|
||||
}
|
||||
if(event.button == 2)
|
||||
{
|
||||
//alert("right click " + leveldown + " " + rank);
|
||||
setJobPrefRedirect(0, rank);
|
||||
return false;
|
||||
}
|
||||
@@ -575,52 +540,28 @@ var/const/MAX_SAVE_SLOTS = 16
|
||||
|
||||
HTML += "</td><td width='40%'>"
|
||||
|
||||
var/prefLevelLabel = "NEVER"
|
||||
var/prefLevelColor = "red"
|
||||
|
||||
|
||||
var/prefLevelLabel = "ERROR"
|
||||
var/prefLevelColor = "pink"
|
||||
var/prefUpperLevel = -1
|
||||
var/prefLowerLevel = -1
|
||||
|
||||
if(GetJobDepartment(job, 1) & job.flag)
|
||||
prefLevelLabel = "High"
|
||||
prefLevelColor = "slateblue"
|
||||
prefUpperLevel = 4
|
||||
prefLowerLevel = 2
|
||||
else if(GetJobDepartment(job, 2) & job.flag)
|
||||
prefLevelLabel = "Medium"
|
||||
prefLevelColor = "green"
|
||||
prefUpperLevel = 1
|
||||
prefLowerLevel = 3
|
||||
else if(GetJobDepartment(job, 3) & job.flag)
|
||||
prefLevelLabel = "Low"
|
||||
prefLevelColor = "orange"
|
||||
prefUpperLevel = 2
|
||||
prefLowerLevel = 4
|
||||
if(job.species_whitelist.len && !job.species_whitelist.Find(src.species))
|
||||
prefLevelLabel = "Unavailable"
|
||||
prefLevelColor = "gray"
|
||||
else if(job.species_blacklist.Find(src.species))
|
||||
prefLevelLabel = "Unavailable"
|
||||
prefLevelColor = "gray"
|
||||
else
|
||||
prefLevelLabel = "NEVER"
|
||||
prefLevelColor = "red"
|
||||
prefUpperLevel = 3
|
||||
prefLowerLevel = 1
|
||||
switch(jobs[job.title])
|
||||
if(JOB_PREF_HIGH)
|
||||
prefLevelLabel = "High"
|
||||
prefLevelColor = "slateblue"
|
||||
if(JOB_PREF_MED)
|
||||
prefLevelLabel = "Medium"
|
||||
prefLevelColor = "green"
|
||||
if(JOB_PREF_LOW)
|
||||
prefLevelLabel = "Low"
|
||||
prefLevelColor = "orange"
|
||||
|
||||
if(job.species_whitelist.len)
|
||||
if(!job.species_whitelist.Find(src.species))
|
||||
prefLevelLabel = "Unavailable"
|
||||
prefLevelColor = "gray"
|
||||
prefUpperLevel = 0
|
||||
prefLowerLevel = 0
|
||||
else if(job.species_blacklist.len)
|
||||
if(job.species_blacklist.Find(src.species))
|
||||
prefLevelLabel = "Unavailable"
|
||||
prefLevelColor = "gray"
|
||||
prefUpperLevel = 0
|
||||
prefLowerLevel = 0
|
||||
|
||||
HTML += "<a class='white' onmouseup='javascript:return mouseUp(event,[prefUpperLevel],[prefLowerLevel], \"[rank]\");' oncontextmenu='javascript:return mouseDown(event,[prefUpperLevel],[prefLowerLevel], \"[rank]\");'>"
|
||||
|
||||
|
||||
//if(job.alt_titles)
|
||||
//HTML += "</a></td></tr><tr bgcolor='[lastJob.selection_color]'><td width='60%' align='center'><a> </a></td><td><a href=\"byond://?src=\ref[user];preference=job;task=alt_title;job=\ref[job]\">\[[GetPlayerAltTitle(job)]\]</a></td></tr>"
|
||||
HTML += "<a class='white' onmouseup='javascript:return mouseUp(event, \"[rank]\");' oncontextmenu='javascript:return mouseDown(event, \"[rank]\");'>"
|
||||
HTML += "<font color=[prefLevelColor]>[prefLevelLabel]</font>"
|
||||
HTML += "</a></td></tr>"
|
||||
|
||||
@@ -781,7 +722,7 @@ var/const/MAX_SAVE_SLOTS = 16
|
||||
if(job.title != new_title)
|
||||
player_alt_titles[job.title] = new_title
|
||||
|
||||
/datum/preferences/proc/SetJob(mob/user, role, inc)
|
||||
/datum/preferences/proc/SetJob(mob/user, role, increase)
|
||||
var/datum/job/job = job_master.GetJob(role)
|
||||
if(!job)
|
||||
user << browse(null, "window=mob_occupation")
|
||||
@@ -804,182 +745,31 @@ var/const/MAX_SAVE_SLOTS = 16
|
||||
to_chat(user, "<span class='notice'>Only the following species can have this job: [allowed_species]. Your species is ([src.species]).</span>")
|
||||
return
|
||||
|
||||
if(inc == null)
|
||||
if(GetJobDepartment(job, 1) & job.flag)
|
||||
SetJobDepartment(job, 1)
|
||||
else if(GetJobDepartment(job, 2) & job.flag)
|
||||
SetJobDepartment(job, 2)
|
||||
else if(GetJobDepartment(job, 3) & job.flag)
|
||||
SetJobDepartment(job, 3)
|
||||
else//job = Never
|
||||
SetJobDepartment(job, 4)
|
||||
var/new_value = jobs[job.title]
|
||||
if(increase)
|
||||
new_value += 1
|
||||
if(new_value > JOB_PREF_HIGH)
|
||||
new_value = JOB_PREF_NEVER
|
||||
else
|
||||
inc = text2num(inc)
|
||||
var/desiredLevel = getPrefLevelUpOrDown(job,inc)
|
||||
while(getPrefLevelText(job) != desiredLevel)
|
||||
if(GetJobDepartment(job, 1) & job.flag)
|
||||
SetJobDepartment(job, 1)
|
||||
else if(GetJobDepartment(job, 2) & job.flag)
|
||||
SetJobDepartment(job, 2)
|
||||
else if(GetJobDepartment(job, 3) & job.flag)
|
||||
SetJobDepartment(job, 3)
|
||||
else//job = Never
|
||||
SetJobDepartment(job, 4)
|
||||
new_value -= 1
|
||||
if(new_value < JOB_PREF_NEVER)
|
||||
new_value = JOB_PREF_HIGH
|
||||
|
||||
/*if(level < 4)
|
||||
to_chat(world,"setting [job] to [level+1]")
|
||||
SetJobDepartment(job,level+1)
|
||||
else
|
||||
to_chat(world,"setting [job] to 1");SetJobDepartment(job,1)
|
||||
*/
|
||||
// If setting a job to high,
|
||||
// set any other job that is currently high to med
|
||||
if(new_value == JOB_PREF_HIGH)
|
||||
for(var/some_job in jobs)
|
||||
if(jobs[some_job] == JOB_PREF_HIGH)
|
||||
jobs[some_job] = JOB_PREF_MED
|
||||
else if(new_value == JOB_PREF_NEVER)
|
||||
jobs -= job.title
|
||||
else
|
||||
jobs[job.title] = new_value
|
||||
SetChoices(user)
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/ResetJobs()
|
||||
job_civilian_high = 0
|
||||
job_civilian_med = 0
|
||||
job_civilian_low = 0
|
||||
|
||||
job_medsci_high = 0
|
||||
job_medsci_med = 0
|
||||
job_medsci_low = 0
|
||||
|
||||
job_engsec_high = 0
|
||||
job_engsec_med = 0
|
||||
job_engsec_low = 0
|
||||
|
||||
/datum/preferences/proc/GetJobDepartment(var/datum/job/job, var/level)
|
||||
if(!job || !level)
|
||||
return 0
|
||||
switch(job.department_flag)
|
||||
if(CIVILIAN)
|
||||
switch(level)
|
||||
if(1)
|
||||
return job_civilian_high
|
||||
if(2)
|
||||
return job_civilian_med
|
||||
if(3)
|
||||
return job_civilian_low
|
||||
if(MEDSCI)
|
||||
switch(level)
|
||||
if(1)
|
||||
return job_medsci_high
|
||||
if(2)
|
||||
return job_medsci_med
|
||||
if(3)
|
||||
return job_medsci_low
|
||||
if(ENGSEC)
|
||||
switch(level)
|
||||
if(1)
|
||||
return job_engsec_high
|
||||
if(2)
|
||||
return job_engsec_med
|
||||
if(3)
|
||||
return job_engsec_low
|
||||
return 0
|
||||
|
||||
/datum/preferences/proc/SetJobDepartment(var/datum/job/job, var/level)
|
||||
if(!job || !level)
|
||||
return 0
|
||||
switch(level)
|
||||
if(1)//Only one of these should ever be active at once so clear them all here
|
||||
job_civilian_high = 0
|
||||
job_medsci_high = 0
|
||||
job_engsec_high = 0
|
||||
return 1
|
||||
if(2)//Set current highs to med, then reset them
|
||||
job_civilian_med |= job_civilian_high
|
||||
job_medsci_med |= job_medsci_high
|
||||
job_engsec_med |= job_engsec_high
|
||||
|
||||
job_civilian_high = 0
|
||||
job_medsci_high = 0
|
||||
job_engsec_high = 0
|
||||
|
||||
switch(job.department_flag)
|
||||
if(CIVILIAN)
|
||||
switch(level)
|
||||
if(2)
|
||||
job_civilian_high = job.flag
|
||||
job_civilian_med &= ~job.flag
|
||||
if(3)
|
||||
job_civilian_med |= job.flag
|
||||
job_civilian_low &= ~job.flag
|
||||
else
|
||||
job_civilian_low |= job.flag
|
||||
if(MEDSCI)
|
||||
switch(level)
|
||||
if(2)
|
||||
job_medsci_high = job.flag
|
||||
job_medsci_med &= ~job.flag
|
||||
if(3)
|
||||
job_medsci_med |= job.flag
|
||||
job_medsci_low &= ~job.flag
|
||||
else
|
||||
job_medsci_low |= job.flag
|
||||
if(ENGSEC)
|
||||
switch(level)
|
||||
if(2)
|
||||
job_engsec_high = job.flag
|
||||
job_engsec_med &= ~job.flag
|
||||
if(3)
|
||||
job_engsec_med |= job.flag
|
||||
job_engsec_low &= ~job.flag
|
||||
else
|
||||
job_engsec_low |= job.flag
|
||||
return 1
|
||||
|
||||
|
||||
/datum/preferences/proc/SetDepartmentFlags(datum/job/job, level, new_flags) //Sets a department's preference flags (job_medsci_high, job_engsec_med - those variables) to 'new_flags'.
|
||||
//First argument can either be a job, or the department's flag (ENGSEC, MISC, ...)
|
||||
//Second argument can be either text ("high", "MEDIUM", "LoW") or number (1-high, 2-med, 3-low)
|
||||
|
||||
//NOTE: If you're not sure what you're doing, be careful when using this proc.
|
||||
|
||||
//Determine department flag
|
||||
var/d_flag
|
||||
if(istype(job))
|
||||
d_flag = job.department_flag
|
||||
else
|
||||
d_flag = job
|
||||
|
||||
//Determine department level
|
||||
var/d_level
|
||||
if(istext(level))
|
||||
switch(lowertext(level))
|
||||
if("high")
|
||||
d_level = 1
|
||||
if("med", "medium")
|
||||
d_level = 2
|
||||
if("low")
|
||||
d_level = 3
|
||||
else
|
||||
d_level = level
|
||||
|
||||
switch(d_flag)
|
||||
if(CIVILIAN)
|
||||
switch(d_level)
|
||||
if(1) //high
|
||||
job_civilian_high = new_flags
|
||||
if(2) //med
|
||||
job_civilian_med = new_flags
|
||||
if(3) //low
|
||||
job_civilian_low = new_flags
|
||||
if(MEDSCI)
|
||||
switch(d_level)
|
||||
if(1) //high
|
||||
job_medsci_high = new_flags
|
||||
if(2) //med
|
||||
job_medsci_med = new_flags
|
||||
if(3) //low
|
||||
job_medsci_low = new_flags
|
||||
if(ENGSEC)
|
||||
switch(d_level)
|
||||
if(1) //high
|
||||
job_engsec_high = new_flags
|
||||
if(2) //med
|
||||
job_engsec_med = new_flags
|
||||
if(3) //low
|
||||
job_engsec_low = new_flags
|
||||
jobs.Cut()
|
||||
|
||||
/datum/preferences/proc/SetRole(var/mob/user, var/list/href_list)
|
||||
var/role_id = href_list["role_id"]
|
||||
@@ -1049,7 +839,7 @@ NOTE: The change will take effect AFTER any current recruiting periods."}
|
||||
SetPlayerAltTitle(job, choice)
|
||||
SetChoices(user)
|
||||
if("input")
|
||||
SetJob(user, href_list["text"], href_list["level"])
|
||||
SetJob(user, href_list["text"], href_list["level"] == "1")
|
||||
else
|
||||
SetChoices(user)
|
||||
return 1
|
||||
@@ -1212,24 +1002,13 @@ NOTE: The change will take effect AFTER any current recruiting periods."}
|
||||
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
if(job.species_blacklist.Find(species)) //If new species is in a job's blacklist
|
||||
for(var/i = 1 to 3)
|
||||
var/F = GetJobDepartment(job, i)
|
||||
|
||||
F &= ~job.flag //Disable that job in our preferences
|
||||
SetDepartmentFlags(job, i, F)
|
||||
|
||||
jobs -= job.title
|
||||
to_chat(usr, "<span class='info'>Your new species ([species]) is blacklisted from [job.title].</span>")
|
||||
|
||||
if(job.species_whitelist.len) //If the job has a species whitelist
|
||||
if(!job.species_whitelist.Find(species)) //And it doesn't include our new species
|
||||
for(var/i = 1 to 3)
|
||||
var/F = GetJobDepartment(job, i)
|
||||
|
||||
if(F & job.flag)
|
||||
to_chat(usr, "<span class='info'>Your new species ([species]) can't be [job.title]. Your preferences have been adjusted.</span>")
|
||||
|
||||
F &= ~job.flag //Disable that job in our preferences
|
||||
SetDepartmentFlags(job, i, F)
|
||||
if(jobs.Remove(job.title))
|
||||
to_chat(usr, "<span class='info'>Your new species ([species]) can't be [job.title]. Your preferences have been adjusted.</span>")
|
||||
|
||||
if("language")
|
||||
var/list/new_languages = list("None")
|
||||
|
||||
@@ -209,15 +209,7 @@ SELECT
|
||||
jobs.player_ckey,
|
||||
jobs.player_slot,
|
||||
jobs.alternate_option,
|
||||
jobs.job_civilian_high,
|
||||
jobs.job_civilian_med,
|
||||
jobs.job_civilian_low,
|
||||
jobs.job_medsci_high,
|
||||
jobs.job_medsci_med,
|
||||
jobs.job_medsci_low,
|
||||
jobs.job_engsec_high,
|
||||
jobs.job_engsec_med,
|
||||
jobs.job_engsec_low,
|
||||
jobs.jobs,
|
||||
body.player_ckey,
|
||||
body.player_slot,
|
||||
body.hair_red,
|
||||
@@ -332,16 +324,7 @@ AND players.player_slot = ? ;"}, ckey, slot)
|
||||
organ_data["liver"] = preference_list["liver"]
|
||||
|
||||
alternate_option = text2num(preference_list["alternate_option"])
|
||||
job_civilian_high = text2num(preference_list["job_civilian_high"])
|
||||
job_civilian_med = text2num(preference_list["job_civilian_med"])
|
||||
job_civilian_low = text2num(preference_list["job_civilian_low"])
|
||||
job_medsci_high = text2num(preference_list["job_medsci_high"])
|
||||
job_medsci_med = text2num(preference_list["job_medsci_med"])
|
||||
job_medsci_low = text2num(preference_list["job_medsci_low"])
|
||||
job_engsec_high = text2num(preference_list["job_engsec_high"])
|
||||
job_engsec_med = text2num(preference_list["job_engsec_med"])
|
||||
job_engsec_low = text2num(preference_list["job_engsec_low"])
|
||||
|
||||
jobs = json_decode(preference_list["jobs"])
|
||||
|
||||
metadata = sanitize_text(metadata, initial(metadata))
|
||||
real_name = reject_bad_name(real_name)
|
||||
@@ -382,15 +365,6 @@ AND players.player_slot = ? ;"}, ckey, slot)
|
||||
//be_special = sanitize_integer(be_special, 0, 65535, initial(be_special))
|
||||
|
||||
alternate_option = sanitize_integer(alternate_option, 0, 2, initial(alternate_option))
|
||||
job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high))
|
||||
job_civilian_med = sanitize_integer(job_civilian_med, 0, 65535, initial(job_civilian_med))
|
||||
job_civilian_low = sanitize_integer(job_civilian_low, 0, 65535, initial(job_civilian_low))
|
||||
job_medsci_high = sanitize_integer(job_medsci_high, 0, 65535, initial(job_medsci_high))
|
||||
job_medsci_med = sanitize_integer(job_medsci_med, 0, 65535, initial(job_medsci_med))
|
||||
job_medsci_low = sanitize_integer(job_medsci_low, 0, 65535, initial(job_medsci_low))
|
||||
job_engsec_high = sanitize_integer(job_engsec_high, 0, 65535, initial(job_engsec_high))
|
||||
job_engsec_med = sanitize_integer(job_engsec_med, 0, 65535, initial(job_engsec_med))
|
||||
job_engsec_low = sanitize_integer(job_engsec_low, 0, 65535, initial(job_engsec_low))
|
||||
|
||||
for(var/role_id in special_roles)
|
||||
roles[role_id]=0
|
||||
@@ -502,27 +476,27 @@ AND players.player_slot = ? ;"}, ckey, slot)
|
||||
check.Add("SELECT player_ckey FROM jobs WHERE player_ckey = ? AND player_slot = ?", ckey, slot)
|
||||
if(check.Execute(db))
|
||||
if(!check.NextRow())
|
||||
// 1 2 3 4 5 6 7 8 9 10 11 12
|
||||
q.Add("INSERT INTO jobs (player_ckey,player_slot,alternate_option,job_civilian_high,job_civilian_med,job_civilian_low,job_medsci_high,job_medsci_med,job_medsci_low,job_engsec_high,job_engsec_med,job_engsec_low) \
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", \
|
||||
ckey, slot, alternate_option,job_civilian_high,job_civilian_med,job_civilian_low,job_medsci_high,job_medsci_med,job_medsci_low,job_engsec_high,job_engsec_med,job_engsec_low)
|
||||
// 1 2 3 4
|
||||
q.Add("INSERT INTO jobs (player_ckey,player_slot,alternate_option,jobs) \
|
||||
VALUES (?, ?, ?, ?)", \
|
||||
ckey, slot, alternate_option,json_encode(jobs))
|
||||
if(!q.Execute(db))
|
||||
message_admins("Error in save_character_sqlite [__FILE__] ln:[__LINE__] #: [q.Error()] - [q.ErrorMsg()]")
|
||||
WARNING("Error in save_character_sqlite [__FILE__] ln:[__LINE__] #:[q.Error()] - [q.ErrorMsg()]")
|
||||
return 0
|
||||
to_chat(user, "Created Job list")
|
||||
else
|
||||
// 1 2 3 4 5 6 7 8 9 10
|
||||
q.Add("UPDATE jobs SET alternate_option=?,job_civilian_high=?,job_civilian_med=?,job_civilian_low=?,job_medsci_high=?,job_medsci_med=?,job_medsci_low=?,job_engsec_high=?,job_engsec_med=?,job_engsec_low=? WHERE player_ckey = ? AND player_slot = ?",\
|
||||
alternate_option, job_civilian_high, job_civilian_med, job_civilian_low, job_medsci_high, job_medsci_med, job_medsci_low, job_engsec_high, job_engsec_med, job_engsec_low, ckey, slot)
|
||||
// 1 2
|
||||
q.Add("UPDATE jobs SET alternate_option=?,jobs=? WHERE player_ckey = ? AND player_slot = ?",\
|
||||
alternate_option, json_encode(jobs), ckey, slot)
|
||||
if(!q.Execute(db))
|
||||
message_admins("Error in save_character_sqlite [__FILE__] ln:[__LINE__] #: [q.Error()] - [q.ErrorMsg()]")
|
||||
WARNING("Error in save_character_sqlite [__FILE__] ln:[__LINE__] #:[q.Error()] - [q.ErrorMsg()]")
|
||||
return 0
|
||||
to_chat(user, "Updated Job List")
|
||||
else
|
||||
message_admins("Error in save_character_sqlite ln 790 #: [check.Error()] - [check.ErrorMsg()]")
|
||||
WARNING("Error in save_character_sqlite ln 790 #:[q.Error()] - [q.ErrorMsg()]")
|
||||
message_admins("Error in save_character_sqlite ln [__LINE__] #: [check.Error()] - [check.ErrorMsg()]")
|
||||
WARNING("Error in save_character_sqlite ln [__LINE__] #:[q.Error()] - [q.ErrorMsg()]")
|
||||
return 0
|
||||
|
||||
check.Add("SELECT player_ckey FROM limbs WHERE player_ckey = ? AND player_slot = ?", ckey, slot)
|
||||
|
||||
13
code/modules/migrations/SS13_Prefs/027-refactor-jobs.dm
Normal file
13
code/modules/migrations/SS13_Prefs/027-refactor-jobs.dm
Normal file
@@ -0,0 +1,13 @@
|
||||
/datum/migration/sqlite/ss13_prefs/_027
|
||||
id = 27
|
||||
name = "Refactor jobs"
|
||||
|
||||
/datum/migration/sqlite/ss13_prefs/_027/up()
|
||||
if(!hasColumn("jobs", "jobs"))
|
||||
return execute("ALTER TABLE `jobs` ADD COLUMN jobs TEXT")
|
||||
return TRUE
|
||||
|
||||
/datum/migration/sqlite/ss13_prefs/_027/down()
|
||||
if(hasColumn("jobs", "jobs"))
|
||||
return execute("ALTER TABLE `jobs` DROP COLUMN jobs")
|
||||
return TRUE
|
||||
@@ -284,220 +284,220 @@
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
|
||||
//else
|
||||
if(job_civilian_high)//I hate how this looks, but there's no reason to go through this switch if it's empty
|
||||
switch(job_civilian_high)
|
||||
if(HOP)
|
||||
clothes_s = new /icon(uniform_dmi, "hop_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "HoP_Coat"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hopcap"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sun"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(BARTENDER)
|
||||
clothes_s = new /icon(uniform_dmi, "ba_suit_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "armor"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(BOTANIST)
|
||||
clothes_s = new /icon(uniform_dmi, "hydroponics_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "ggloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "apron"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-hyd",null,"courierbaghyd")
|
||||
if(CHEF)
|
||||
clothes_s = new /icon(uniform_dmi, "chef_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "chef"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(JANITOR)
|
||||
clothes_s = new /icon(uniform_dmi, "janitor_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(LIBRARIAN)
|
||||
clothes_s = new /icon(uniform_dmi, "red_suit_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(QUARTERMASTER)
|
||||
clothes_s = new /icon(uniform_dmi, "qm_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sun"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/in-hand/right/items_righthand.dmi', "clipboard"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(CARGOTECH)
|
||||
clothes_s = new /icon(uniform_dmi, "cargotech_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(MINER)
|
||||
clothes_s = new /icon(uniform_dmi, "miner_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-eng",null,"courierbagengi")
|
||||
if(LAWYER)
|
||||
clothes_s = new /icon(uniform_dmi, "internalaffairs_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "laceups"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "ia_jacket_open"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/in-hand/right/backpacks_n_bags.dmi', "briefcase-centcomm"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
var/highest_pref = 0
|
||||
var/highest_job = "Assistant"
|
||||
for(var/job in jobs)
|
||||
if(jobs[job] > highest_pref)
|
||||
highest_pref = jobs[job]
|
||||
highest_job = job
|
||||
|
||||
if(CHAPLAIN)
|
||||
clothes_s = new /icon(uniform_dmi, "chapblack_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "laceups"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(CLOWN)
|
||||
clothes_s = new /icon(uniform_dmi, "clown_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "clown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "clown"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "clownpack"), ICON_OVERLAY)
|
||||
if(MIME)
|
||||
clothes_s = new /icon(uniform_dmi, "mime_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "lgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "mime"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "suspenders"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
var/datum/job/highest_job_datum = job_master.GetJob(highest_job)
|
||||
|
||||
else if(job_medsci_high)
|
||||
switch(job_medsci_high)
|
||||
if(RD)
|
||||
clothes_s = new /icon(uniform_dmi, "director_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/in-hand/right/items_righthand.dmi', "clipboard"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-tox",null,"courierbagtox")
|
||||
if(SCIENTIST)
|
||||
clothes_s = new /icon(uniform_dmi, "toxinswhite_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_tox_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-tox",null,"courierbagtox")
|
||||
if(XENOARCH)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "xenoarch_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-tox",null,"courierbagtox")
|
||||
if(XENOBIO)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "xenobio_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
|
||||
if(CHEMIST)
|
||||
clothes_s = new /icon(uniform_dmi, "chemistrywhite_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_chem_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-chem",null,"courierbagchem")
|
||||
if(CMO)
|
||||
clothes_s = new /icon(uniform_dmi, "cmo_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/in-hand/left/items_lefthand.dmi', "firstaid"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_cmo_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-med",null,"courierbagmed")
|
||||
if(DOCTOR)
|
||||
clothes_s = new /icon(uniform_dmi, "medical_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/in-hand/left/items_lefthand.dmi', "firstaid"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-med","medicalpack","courierbagmed")
|
||||
if(GENETICIST)
|
||||
clothes_s = new /icon(uniform_dmi, "geneticswhite_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_gen_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-gen",null,"courierbagmed")
|
||||
if(VIROLOGIST)
|
||||
clothes_s = new /icon(uniform_dmi, "virologywhite_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "sterile"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_vir_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-vir","medicalpack","courierbagmed")
|
||||
if(ROBOTICIST)
|
||||
clothes_s = new /icon(uniform_dmi, "robotics_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/in-hand/right/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
|
||||
else if(job_engsec_high)
|
||||
switch(job_engsec_high)
|
||||
if(CAPTAIN)
|
||||
clothes_s = new /icon(uniform_dmi, "captain_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "captain"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sun"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "caparmor"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-cap",null,"courierbagcom")
|
||||
if(HOS)
|
||||
clothes_s = new /icon(uniform_dmi, "hosred_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "jackboots"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret_badge"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "armor"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-sec","securitypack","courierbagsec")
|
||||
if(WARDEN)
|
||||
clothes_s = new /icon(uniform_dmi, "warden_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "jackboots"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "policehelm"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "armor"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-sec","securitypack","courierbagsec")
|
||||
if(DETECTIVE)
|
||||
clothes_s = new /icon(uniform_dmi, "detective_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "detective"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "detective"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(OFFICER)
|
||||
clothes_s = new /icon(uniform_dmi, "security_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "jackboots"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "armor"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-sec","securitypack","courierbagsec")
|
||||
if(CHIEF)
|
||||
clothes_s = new /icon(uniform_dmi, "chief_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "yellow"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-eng","engiepack","courierbagengi")
|
||||
if(ENGINEER)
|
||||
clothes_s = new /icon(uniform_dmi, "engine_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "orange"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_yellow"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-eng","engiepack","courierbagengi")
|
||||
if(ATMOSTECH)
|
||||
clothes_s = new /icon(uniform_dmi, "atmos_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "yellow"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbagengi")
|
||||
if(MECHANIC)
|
||||
clothes_s = new /icon(uniform_dmi, "mechanic_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "yellow"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-eng","engiepack","courierbagengi")
|
||||
if(ROBOTICIST)
|
||||
clothes_s = new /icon(uniform_dmi, "robotics_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/in-hand/right/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(AI)//Gives AI and borgs assistant-wear, so they can still customize their character
|
||||
clothes_s = new /icon(uniform_dmi, "grey_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(CYBORG)
|
||||
clothes_s = new /icon(uniform_dmi, "grey_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
switch(highest_job_datum.type)
|
||||
if(/datum/job/hop)
|
||||
clothes_s = new /icon(uniform_dmi, "hop_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "HoP_Coat"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hopcap"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sun"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(/datum/job/bartender)
|
||||
clothes_s = new /icon(uniform_dmi, "ba_suit_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "armor"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(/datum/job/hydro)
|
||||
clothes_s = new /icon(uniform_dmi, "hydroponics_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "ggloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "apron"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-hyd",null,"courierbaghyd")
|
||||
if(/datum/job/chef)
|
||||
clothes_s = new /icon(uniform_dmi, "chef_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "chef"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(/datum/job/janitor)
|
||||
clothes_s = new /icon(uniform_dmi, "janitor_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(/datum/job/librarian)
|
||||
clothes_s = new /icon(uniform_dmi, "red_suit_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(/datum/job/qm)
|
||||
clothes_s = new /icon(uniform_dmi, "qm_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sun"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/in-hand/right/items_righthand.dmi', "clipboard"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(/datum/job/cargo_tech)
|
||||
clothes_s = new /icon(uniform_dmi, "cargotech_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(/datum/job/mining)
|
||||
clothes_s = new /icon(uniform_dmi, "miner_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-eng",null,"courierbagengi")
|
||||
if(/datum/job/lawyer)
|
||||
clothes_s = new /icon(uniform_dmi, "internalaffairs_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "laceups"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "ia_jacket_open"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/in-hand/right/backpacks_n_bags.dmi', "briefcase-centcomm"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(/datum/job/chaplain)
|
||||
clothes_s = new /icon(uniform_dmi, "chapblack_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "laceups"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(/datum/job/clown)
|
||||
clothes_s = new /icon(uniform_dmi, "clown_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "clown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "clown"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "clownpack"), ICON_OVERLAY)
|
||||
if(/datum/job/mime)
|
||||
clothes_s = new /icon(uniform_dmi, "mime_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "lgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "mime"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "suspenders"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(/datum/job/rd)
|
||||
clothes_s = new /icon(uniform_dmi, "director_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/in-hand/right/items_righthand.dmi', "clipboard"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-tox",null,"courierbagtox")
|
||||
if(/datum/job/scientist)
|
||||
clothes_s = new /icon(uniform_dmi, "toxinswhite_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_tox_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-tox",null,"courierbagtox")
|
||||
if(/datum/job/xenoarchaeologist)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "xenoarch_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-tox",null,"courierbagtox")
|
||||
if(/datum/job/xenobiologist)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "xenobio_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
|
||||
if(/datum/job/chemist)
|
||||
clothes_s = new /icon(uniform_dmi, "chemistrywhite_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_chem_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-chem",null,"courierbagchem")
|
||||
if(/datum/job/cmo)
|
||||
clothes_s = new /icon(uniform_dmi, "cmo_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/in-hand/left/items_lefthand.dmi', "firstaid"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_cmo_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-med",null,"courierbagmed")
|
||||
if(/datum/job/doctor)
|
||||
clothes_s = new /icon(uniform_dmi, "medical_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/in-hand/left/items_lefthand.dmi', "firstaid"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-med","medicalpack","courierbagmed")
|
||||
if(/datum/job/geneticist)
|
||||
clothes_s = new /icon(uniform_dmi, "geneticswhite_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_gen_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-gen",null,"courierbagmed")
|
||||
if(/datum/job/virologist)
|
||||
clothes_s = new /icon(uniform_dmi, "virologywhite_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "sterile"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_vir_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-vir","medicalpack","courierbagmed")
|
||||
if(/datum/job/roboticist)
|
||||
clothes_s = new /icon(uniform_dmi, "robotics_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/in-hand/right/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(/datum/job/captain)
|
||||
clothes_s = new /icon(uniform_dmi, "captain_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "captain"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sun"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "caparmor"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-cap",null,"courierbagcom")
|
||||
if(/datum/job/hos)
|
||||
clothes_s = new /icon(uniform_dmi, "hosred_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "jackboots"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret_badge"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "armor"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-sec","securitypack","courierbagsec")
|
||||
if(/datum/job/warden)
|
||||
clothes_s = new /icon(uniform_dmi, "warden_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "jackboots"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "policehelm"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "armor"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-sec","securitypack","courierbagsec")
|
||||
if(/datum/job/detective)
|
||||
clothes_s = new /icon(uniform_dmi, "detective_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "detective"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "detective"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(/datum/job/officer)
|
||||
clothes_s = new /icon(uniform_dmi, "security_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "jackboots"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "armor"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-sec","securitypack","courierbagsec")
|
||||
if(/datum/job/chief_engineer)
|
||||
clothes_s = new /icon(uniform_dmi, "chief_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "yellow"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-eng","engiepack","courierbagengi")
|
||||
if(/datum/job/engineer)
|
||||
clothes_s = new /icon(uniform_dmi, "engine_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "orange"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_yellow"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-eng","engiepack","courierbagengi")
|
||||
if(/datum/job/atmos)
|
||||
clothes_s = new /icon(uniform_dmi, "atmos_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "yellow"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbagengi")
|
||||
if(/datum/job/mechanic)
|
||||
clothes_s = new /icon(uniform_dmi, "mechanic_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "yellow"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-eng","engiepack","courierbagengi")
|
||||
if(/datum/job/roboticist)
|
||||
clothes_s = new /icon(uniform_dmi, "robotics_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/in-hand/right/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(suit_dmi, "labcoat_open"), ICON_OVERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(/datum/job/ai)//Gives AI and borgs assistant-wear, so they can still customize their character
|
||||
clothes_s = new /icon(uniform_dmi, "grey_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
if(/datum/job/cyborg)
|
||||
clothes_s = new /icon(uniform_dmi, "grey_s")
|
||||
clothes_s.Blend(new /icon(feet_dmi, "black"), ICON_UNDERLAY)
|
||||
clothes_s=blend_backpack(clothes_s,backbag,"satchel-norm",null,"courierbag")
|
||||
|
||||
preview_icon.Blend(new /icon('icons/mob/previewbg.dmi',preview_background), ICON_UNDERLAY)
|
||||
|
||||
|
||||
@@ -1692,6 +1692,7 @@
|
||||
#include "code\modules\migrations\SS13_Prefs\024-add-tgui-fancy.dm"
|
||||
#include "code\modules\migrations\SS13_Prefs\025-warning_notif.dm"
|
||||
#include "code\modules\migrations\SS13_Prefs\026-add-fps.dm"
|
||||
#include "code\modules\migrations\SS13_Prefs\027-refactor-jobs.dm"
|
||||
#include "code\modules\migrations\SS13_Prefs\_base.dm"
|
||||
#include "code\modules\mining\abandonedcrates.dm"
|
||||
#include "code\modules\mining\debug_shit.dm"
|
||||
|
||||
Reference in New Issue
Block a user