diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm
index 4ca8ece26e0..a15170a3956 100644
--- a/code/game/dna/dna2.dm
+++ b/code/game/dna/dna2.dm
@@ -406,14 +406,15 @@ var/global/list/bad_blocks[0]
// Initial DNA setup. I'm kind of wondering why the hell this doesn't just call the above.
// ready_dna is (hopefully) only used on mob creation, and sets the struc_enzymes_original and SE_original only once - Bone White
-/datum/dna/proc/ready_dna(mob/living/carbon/human/character)
+/datum/dna/proc/ready_dna(mob/living/carbon/human/character, flatten_SE = 1)
ResetUIFrom(character)
- ResetSE()
+ if(flatten_SE)
+ ResetSE()
struc_enzymes_original = struc_enzymes // sets the original struc_enzymes when ready_dna is called
- SE_original = SE
+ SE_original = SE.Copy()
unique_enzymes = md5(character.real_name)
reg_dna[unique_enzymes] = character.real_name
diff --git a/code/game/dna/dna2_domutcheck.dm b/code/game/dna/dna2_domutcheck.dm
index 9d8f68fd81a..eddf68c679d 100644
--- a/code/game/dna/dna2_domutcheck.dm
+++ b/code/game/dna/dna2_domutcheck.dm
@@ -5,7 +5,6 @@
// flags: See below, bitfield.
#define MUTCHK_FORCED 1
/proc/domutcheck(var/mob/living/M, var/connected=null, var/flags=0)
-
for(var/datum/dna/gene/gene in dna_genes)
if(!M || !M.dna)
return
@@ -13,38 +12,6 @@
continue
domutation(gene, M, connected, flags)
- // To prevent needless copy pasting of code i put this commented out section
- // into domutation so domutcheck and genemutcheck can both use it.
- /*
- // Sanity checks, don't skip.
- if(!gene.can_activate(M,flags))
- //testing("[M] - Failed to activate [gene.name] (can_activate fail).")
- continue
-
- // Current state
- var/gene_active = (gene.flags & GENE_ALWAYS_ACTIVATE)
- if(!gene_active)
- gene_active = M.dna.GetSEState(gene.block)
-
- // Prior state
- var/gene_prior_status = (gene.type in M.active_genes)
- var/changed = gene_active != gene_prior_status || (gene.flags & GENE_ALWAYS_ACTIVATE)
-
- // If gene state has changed:
- if(changed)
- // Gene active (or ALWAYS ACTIVATE)
- if(gene_active || (gene.flags & GENE_ALWAYS_ACTIVATE))
-// testing("[gene.name] activated!")
- gene.activate(M,connected,flags)
- if(M)
- M.active_genes |= gene.type
- // If Gene is NOT active:
- else
-// testing("[gene.name] deactivated!")
- gene.deactivate(M,connected,flags)
- if(M)
- M.active_genes -= gene.type
- */
// Use this to force a mut check on a single gene!
/proc/genemutcheck(var/mob/living/M, var/block, var/connected=null, var/flags=0)
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index c51fccc381f..eaa68fd22de 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -1571,6 +1571,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
return 1
/datum/preferences/proc/copy_to(mob/living/carbon/human/character)
+ var/datum/species/S = all_species[species]
character.change_species(species) // Yell at me if this causes everything to melt
if(be_random_name)
real_name = random_name(gender,species)
@@ -1583,6 +1584,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
else if(firstspace == name_length)
real_name += "[pick(last_names)]"
+ character.add_language(language)
+
character.real_name = real_name
character.name = character.real_name
@@ -1645,15 +1648,30 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
else if(status == "mechanical")
I.robotize()
+ character.dna.b_type = b_type
if(disabilities & DISABILITY_FLAG_FAT && character.species.flags & CAN_BE_FAT)
+ character.dna.SetSEState(FATBLOCK,1,1)
character.mutations += FAT
character.mutations += OBESITY
+ character.overeatduration = 600
if(disabilities & DISABILITY_FLAG_NEARSIGHTED)
+ character.dna.SetSEState(GLASSESBLOCK,1,1)
character.disabilities|=NEARSIGHTED
if(disabilities & DISABILITY_FLAG_EPILEPTIC)
+ character.dna.SetSEState(EPILEPSYBLOCK,1,1)
character.disabilities|=EPILEPSY
if(disabilities & DISABILITY_FLAG_DEAF)
+ character.dna.SetSEState(DEAFBLOCK,1,1)
character.sdisabilities|=DEAF
+ if(disabilities & DISABILITY_FLAG_MUTE)
+ character.dna.SetSEState(MUTEBLOCK,1,1)
+ character.sdisabilities |= MUTE
+
+ S.handle_dna(character)
+
+ if(character.dna.dirtySE)
+ character.dna.UpdateSE()
+ domutcheck(character)
// Wheelchair necessary?
var/obj/item/organ/external/l_foot = character.get_organ("l_foot")
@@ -1694,9 +1712,14 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
message_admins("[key_name_admin(character)] has spawned with their gender as plural or neuter. Please notify coders.")
character.change_gender(MALE)
- character.dna.ready_dna(character)
+ character.dna.ready_dna(character, flatten_SE = 0)
character.sync_organ_dna(assimilate=1)
+ // Do the initial caching of the player's body icons.
+ character.force_update_limbs()
+ character.update_eyes()
+ character.regenerate_icons()
+
/datum/preferences/proc/open_load_dialog(mob/user)
var/DBQuery/query = dbcon.NewQuery("SELECT slot,real_name FROM [format_table_name("characters")] WHERE ckey='[user.ckey]' ORDER BY slot")
diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm
index f77e2ff7ed5..0f493a22dab 100644
--- a/code/modules/mob/new_player/new_player.dm
+++ b/code/modules/mob/new_player/new_player.dm
@@ -15,505 +15,466 @@
anchored = 1 // don't get pushed around
- New()
- mob_list += src
+/mob/new_player/New()
+ mob_list += src
- verb/new_player_panel()
- set src = usr
- new_player_panel_proc()
+/mob/new_player/verb/new_player_panel()
+ set src = usr
+ new_player_panel_proc()
- proc/new_player_panel_proc()
- var/output = "
Setup Character
"
+/mob/new_player/proc/new_player_panel_proc()
+ var/output = "Setup Character
"
- if(!ticker || ticker.current_state <= GAME_STATE_PREGAME)
- if(!ready) output += "Declare Ready
"
- else output += "You are ready (Cancel)
"
+ if(!ticker || ticker.current_state <= GAME_STATE_PREGAME)
+ if(!ready) output += "Declare Ready
"
+ else output += "You are ready (Cancel)
"
- else
- output += "View the Crew Manifest
"
- output += "Join Game!
"
+ else
+ output += "View the Crew Manifest
"
+ output += "Join Game!
"
- output += "Observe
"
+ output += "Observe
"
- if(!IsGuestKey(src.key))
- establish_db_connection()
+ if(!IsGuestKey(src.key))
+ establish_db_connection()
- if(dbcon.IsConnected())
- var/isadmin = 0
- if(src.client && src.client.holder)
- isadmin = 1
- var/DBQuery/query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM [format_table_name("poll_vote")] WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM [format_table_name("poll_textreply")] WHERE ckey = \"[ckey]\")")
- query.Execute()
- var/newpoll = 0
- while(query.NextRow())
- newpoll = 1
- break
+ if(dbcon.IsConnected())
+ var/isadmin = 0
+ if(src.client && src.client.holder)
+ isadmin = 1
+ var/DBQuery/query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM [format_table_name("poll_vote")] WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM [format_table_name("poll_textreply")] WHERE ckey = \"[ckey]\")")
+ query.Execute()
+ var/newpoll = 0
+ while(query.NextRow())
+ newpoll = 1
+ break
- if(newpoll)
- output += "Show Player Polls (NEW!)
"
- else
- output += "Show Player Polls
"
-
- output += ""
-
- var/datum/browser/popup = new(src, "playersetup", "New Player Options
", 220, 290)
- popup.set_window_options("can_close=0")
- popup.set_content(output)
- popup.open(0)
- return
-
- Stat()
- if((!ticker) || ticker.current_state == GAME_STATE_PREGAME)
- statpanel("Lobby") // First tab during pre-game.
- ..()
-
- statpanel("Status")
- if (client.statpanel == "Status" && ticker)
- if (ticker.current_state != GAME_STATE_PREGAME)
- stat(null, "Station Time: [worldtime2text()]")
- statpanel("Lobby")
- if(client.statpanel=="Lobby" && ticker)
- if(ticker.hide_mode)
- stat("Game Mode:", "Secret")
+ if(newpoll)
+ output += "Show Player Polls (NEW!)
"
else
- if(ticker.hide_mode == 0)
- stat("Game Mode:", "[master_mode]") // Old setting for showing the game mode
- else
- stat("Game Mode: ", "Secret")
+ output += "Show Player Polls
"
- if((ticker.current_state == GAME_STATE_PREGAME) && going)
- stat("Time To Start:", ticker.pregame_timeleft)
- if((ticker.current_state == GAME_STATE_PREGAME) && !going)
- stat("Time To Start:", "DELAYED")
+ output += ""
- if(ticker.current_state == GAME_STATE_PREGAME)
- stat("Players: [totalPlayers]", "Players Ready: [totalPlayersReady]")
- totalPlayers = 0
- totalPlayersReady = 0
- for(var/mob/new_player/player in player_list)
- stat("[player.key]", (player.ready)?("(Playing)"):(null))
- totalPlayers++
- if(player.ready)totalPlayersReady++
+ var/datum/browser/popup = new(src, "playersetup", "New Player Options
", 220, 290)
+ popup.set_window_options("can_close=0")
+ popup.set_content(output)
+ popup.open(0)
+ return
- Topic(href, href_list[])
- if(!client) return 0
+/mob/new_player/Stat()
+ if((!ticker) || ticker.current_state == GAME_STATE_PREGAME)
+ statpanel("Lobby") // First tab during pre-game.
+ ..()
- if(href_list["show_preferences"])
- client.prefs.ShowChoices(src)
- return 1
+ statpanel("Status")
+ if (client.statpanel == "Status" && ticker)
+ if (ticker.current_state != GAME_STATE_PREGAME)
+ stat(null, "Station Time: [worldtime2text()]")
+ statpanel("Lobby")
+ if(client.statpanel=="Lobby" && ticker)
+ if(ticker.hide_mode)
+ stat("Game Mode:", "Secret")
+ else
+ if(ticker.hide_mode == 0)
+ stat("Game Mode:", "[master_mode]") // Old setting for showing the game mode
+ else
+ stat("Game Mode: ", "Secret")
- if(href_list["ready"])
- ready = !ready
- new_player_panel_proc()
+ if((ticker.current_state == GAME_STATE_PREGAME) && going)
+ stat("Time To Start:", ticker.pregame_timeleft)
+ if((ticker.current_state == GAME_STATE_PREGAME) && !going)
+ stat("Time To Start:", "DELAYED")
- if(href_list["refresh"])
- src << browse(null, "window=playersetup") //closes the player setup window
- new_player_panel_proc()
+ if(ticker.current_state == GAME_STATE_PREGAME)
+ stat("Players: [totalPlayers]", "Players Ready: [totalPlayersReady]")
+ totalPlayers = 0
+ totalPlayersReady = 0
+ for(var/mob/new_player/player in player_list)
+ stat("[player.key]", (player.ready)?("(Playing)"):(null))
+ totalPlayers++
+ if(player.ready)totalPlayersReady++
- if(href_list["observe"])
+/mob/new_player/Topic(href, href_list[])
+ if(!client) return 0
- if(alert(src,"Are you sure you wish to observe? You cannot normally join the round after doing this!","Player Setup","Yes","No") == "Yes")
- if(!client) return 1
- var/mob/dead/observer/observer = new()
- src << browse(null, "window=playersetup")
- spawning = 1
- src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
-
- observer.started_as_observer = 1
- close_spawn_windows()
- var/obj/O = locate("landmark*Observer-Start")
- src << "\blue Now teleporting."
- observer.loc = O.loc
- observer.timeofdeath = world.time // Set the time of death so that the respawn timer works correctly.
- client.prefs.update_preview_icon(1)
- observer.icon = client.prefs.preview_icon
- observer.alpha = 127
-
- if(client.prefs.be_random_name)
- client.prefs.real_name = random_name(client.prefs.gender,client.prefs.species)
- observer.real_name = client.prefs.real_name
- observer.name = observer.real_name
- if(!client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
- observer.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
- observer.key = key
- respawnable_list += observer
- qdel(src)
- return 1
-
- if(href_list["late_join"])
- if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
- usr << "\red The round is either not ready, or has already finished..."
- return
-
- if(client.prefs.species in whitelisted_species)
-
- if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist)
- src << alert("You are currently not whitelisted to play [client.prefs.species].")
- return 0
-
- LateChoices()
-
- if(href_list["manifest"])
- ViewManifest()
-
- if(href_list["SelectedJob"])
-
- if(!enter_allowed)
- usr << "\blue There is an administrative lock on entering the game!"
- return
-
- if(client.prefs.species in whitelisted_species)
- if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist)
- src << alert("You are currently not whitelisted to play [client.prefs.species].")
- return 0
-
- AttemptLateSpawn(href_list["SelectedJob"],client.prefs.spawnpoint)
- return
-
- if(!ready && href_list["preference"])
- if(client)
- client.prefs.process_link(src, href_list)
- else if(!href_list["late_join"])
- new_player_panel()
-
- if(href_list["showpoll"])
-
- handle_player_polling()
- return
-
- if(href_list["pollid"])
-
- var/pollid = href_list["pollid"]
- if(istext(pollid))
- pollid = text2num(pollid)
- if(isnum(pollid))
- src.poll_player(pollid)
- return
-
- if(href_list["votepollid"] && href_list["votetype"])
- var/pollid = text2num(href_list["votepollid"])
- var/votetype = href_list["votetype"]
- switch(votetype)
- if("OPTION")
- var/optionid = text2num(href_list["voteoptionid"])
- vote_on_poll(pollid, optionid)
- if("TEXT")
- var/replytext = href_list["replytext"]
- log_text_poll_reply(pollid, replytext)
- if("NUMVAL")
- var/id_min = text2num(href_list["minid"])
- var/id_max = text2num(href_list["maxid"])
-
- if( (id_max - id_min) > 100 ) //Basic exploit prevention
- usr << "The option ID difference is too big. Please contact administration or the database admin."
- return
-
- for(var/optionid = id_min; optionid <= id_max; optionid++)
- if(!isnull(href_list["o[optionid]"])) //Test if this optionid was replied to
- var/rating
- if(href_list["o[optionid]"] == "abstain")
- rating = null
- else
- rating = text2num(href_list["o[optionid]"])
- if(!isnum(rating))
- return
-
- vote_on_numval_poll(pollid, optionid, rating)
- if("MULTICHOICE")
- var/id_min = text2num(href_list["minoptionid"])
- var/id_max = text2num(href_list["maxoptionid"])
-
- if( (id_max - id_min) > 100 ) //Basic exploit prevention
- usr << "The option ID difference is too big. Please contact administration or the database admin."
- return
-
- for(var/optionid = id_min; optionid <= id_max; optionid++)
- if(!isnull(href_list["option_[optionid]"])) //Test if this optionid was selected
- vote_on_poll(pollid, optionid, 1)
-
- proc/IsJobAvailable(rank)
- var/datum/job/job = job_master.GetJob(rank)
- if(!job) return 0
- if(!job.is_position_available()) return 0
- if(jobban_isbanned(src,rank)) return 0
- if(!is_job_whitelisted(src, rank)) return 0
- if(!job.player_old_enough(src.client)) return 0
- if(config.assistantlimit)
- if(job.title == "Civilian")
- var/count = 0
- var/datum/job/officer = job_master.GetJob("Security Officer")
- var/datum/job/warden = job_master.GetJob("Warden")
- var/datum/job/hos = job_master.GetJob("Head of Security")
- count += (officer.current_positions + warden.current_positions + hos.current_positions)
- if(job.current_positions > (config.assistantratio * count))
- if(count >= 5) // if theres more than 5 security on the station just let assistants join regardless, they should be able to handle the tide
- return 1
- return 0
+ if(href_list["show_preferences"])
+ client.prefs.ShowChoices(src)
return 1
+ if(href_list["ready"])
+ ready = !ready
+ new_player_panel_proc()
- proc/AttemptLateSpawn(rank,var/spawning_at)
- if (src != usr)
- return 0
+ if(href_list["refresh"])
+ src << browse(null, "window=playersetup") //closes the player setup window
+ new_player_panel_proc()
+
+ if(href_list["observe"])
+
+ if(alert(src,"Are you sure you wish to observe? You cannot normally join the round after doing this!","Player Setup","Yes","No") == "Yes")
+ if(!client) return 1
+ var/mob/dead/observer/observer = new()
+ src << browse(null, "window=playersetup")
+ spawning = 1
+ src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
+
+ observer.started_as_observer = 1
+ close_spawn_windows()
+ var/obj/O = locate("landmark*Observer-Start")
+ src << "\blue Now teleporting."
+ observer.loc = O.loc
+ observer.timeofdeath = world.time // Set the time of death so that the respawn timer works correctly.
+ client.prefs.update_preview_icon(1)
+ observer.icon = client.prefs.preview_icon
+ observer.alpha = 127
+
+ if(client.prefs.be_random_name)
+ client.prefs.real_name = random_name(client.prefs.gender,client.prefs.species)
+ observer.real_name = client.prefs.real_name
+ observer.name = observer.real_name
+ if(!client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
+ observer.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
+ observer.key = key
+ respawnable_list += observer
+ qdel(src)
+ return 1
+
+ if(href_list["late_join"])
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
usr << "\red The round is either not ready, or has already finished..."
- return 0
- if(!enter_allowed)
- usr << "\blue There is an administrative lock on entering the game!"
- return 0
- if(!IsJobAvailable(rank))
- src << alert("[rank] is not available. Please try another.")
- return 0
-
- job_master.AssignRole(src, rank, 1)
-
- var/mob/living/character = create_character() //creates the human and transfers vars and mind
- character = job_master.EquipRank(character, rank, 1) //equips the human
- EquipCustomItems(character)
-
- // AIs don't need a spawnpoint, they must spawn at an empty core
- if(character.mind.assigned_role == "AI")
-
- character = character.AIize(move=0) // AIize the character, but don't move them yet
-
- // IsJobAvailable for AI checks that there is an empty core available in this list
- var/obj/structure/AIcore/deactivated/C = empty_playable_ai_cores[1]
- empty_playable_ai_cores -= C
-
- character.loc = C.loc
-
- AnnounceCyborg(character, rank, "has been downloaded to the empty core in \the [character.loc.loc]")
- ticker.mode.latespawn(character)
-
- qdel(C)
- qdel(src)
return
- //Find our spawning point.
- var/join_message
- var/datum/spawnpoint/S
+ if(client.prefs.species in whitelisted_species)
- if(spawning_at)
- S = spawntypes[spawning_at]
+ if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist)
+ src << alert("You are currently not whitelisted to play [client.prefs.species].")
+ return 0
- if(S && istype(S))
- if(S.check_job_spawning(rank))
- character.loc = pick(S.turfs)
- join_message = S.msg
- else
- character << "Your chosen spawnpoint ([S.display_name]) is unavailable for your chosen job. Spawning you at the Arrivals shuttle instead."
- character.loc = pick(latejoin)
- join_message = "has arrived on the station"
- else
- character.loc = pick(latejoin)
- join_message = "has arrived on the station"
+ LateChoices()
- character.lastarea = get_area(loc)
- // Moving wheelchair if they have one
- if(character.buckled && istype(character.buckled, /obj/structure/stool/bed/chair/wheelchair))
- character.buckled.loc = character.loc
- character.buckled.dir = character.dir
+ if(href_list["manifest"])
+ ViewManifest()
- ticker.mode.latespawn(character)
+ if(href_list["SelectedJob"])
- if(character.mind.assigned_role != "Cyborg")
- data_core.manifest_inject(character)
- ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn
- AnnounceArrival(character, rank, join_message)
- callHook("latespawn", list(character))
- else
- AnnounceCyborg(character, rank, join_message)
- callHook("latespawn", list(character))
- qdel(src)
+ if(!enter_allowed)
+ usr << "\blue There is an administrative lock on entering the game!"
+ return
+
+ if(client.prefs.species in whitelisted_species)
+ if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist)
+ src << alert("You are currently not whitelisted to play [client.prefs.species].")
+ return 0
+
+ AttemptLateSpawn(href_list["SelectedJob"],client.prefs.spawnpoint)
+ return
+
+ if(!ready && href_list["preference"])
+ if(client)
+ client.prefs.process_link(src, href_list)
+ else if(!href_list["late_join"])
+ new_player_panel()
+
+ if(href_list["showpoll"])
+
+ handle_player_polling()
+ return
+
+ if(href_list["pollid"])
+
+ var/pollid = href_list["pollid"]
+ if(istext(pollid))
+ pollid = text2num(pollid)
+ if(isnum(pollid))
+ src.poll_player(pollid)
+ return
+
+ if(href_list["votepollid"] && href_list["votetype"])
+ var/pollid = text2num(href_list["votepollid"])
+ var/votetype = href_list["votetype"]
+ switch(votetype)
+ if("OPTION")
+ var/optionid = text2num(href_list["voteoptionid"])
+ vote_on_poll(pollid, optionid)
+ if("TEXT")
+ var/replytext = href_list["replytext"]
+ log_text_poll_reply(pollid, replytext)
+ if("NUMVAL")
+ var/id_min = text2num(href_list["minid"])
+ var/id_max = text2num(href_list["maxid"])
+
+ if( (id_max - id_min) > 100 ) //Basic exploit prevention
+ usr << "The option ID difference is too big. Please contact administration or the database admin."
+ return
+
+ for(var/optionid = id_min; optionid <= id_max; optionid++)
+ if(!isnull(href_list["o[optionid]"])) //Test if this optionid was replied to
+ var/rating
+ if(href_list["o[optionid]"] == "abstain")
+ rating = null
+ else
+ rating = text2num(href_list["o[optionid]"])
+ if(!isnum(rating))
+ return
+
+ vote_on_numval_poll(pollid, optionid, rating)
+ if("MULTICHOICE")
+ var/id_min = text2num(href_list["minoptionid"])
+ var/id_max = text2num(href_list["maxoptionid"])
+
+ if( (id_max - id_min) > 100 ) //Basic exploit prevention
+ usr << "The option ID difference is too big. Please contact administration or the database admin."
+ return
+
+ for(var/optionid = id_min; optionid <= id_max; optionid++)
+ if(!isnull(href_list["option_[optionid]"])) //Test if this optionid was selected
+ vote_on_poll(pollid, optionid, 1)
+
+/mob/new_player/proc/IsJobAvailable(rank)
+ var/datum/job/job = job_master.GetJob(rank)
+ if(!job) return 0
+ if(!job.is_position_available()) return 0
+ if(jobban_isbanned(src,rank)) return 0
+ if(!is_job_whitelisted(src, rank)) return 0
+ if(!job.player_old_enough(src.client)) return 0
+ if(config.assistantlimit)
+ if(job.title == "Civilian")
+ var/count = 0
+ var/datum/job/officer = job_master.GetJob("Security Officer")
+ var/datum/job/warden = job_master.GetJob("Warden")
+ var/datum/job/hos = job_master.GetJob("Head of Security")
+ count += (officer.current_positions + warden.current_positions + hos.current_positions)
+ if(job.current_positions > (config.assistantratio * count))
+ if(count >= 5) // if theres more than 5 security on the station just let assistants join regardless, they should be able to handle the tide
+ return 1
+ return 0
+ return 1
- proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank, var/join_message)
- if (ticker.current_state == GAME_STATE_PLAYING)
- var/ailist[] = list()
- for (var/mob/living/silicon/ai/A in living_mob_list)
- ailist += A
- if (ailist.len)
- var/mob/living/silicon/ai/announcer = pick(ailist)
- if(character.mind)
- if((character.mind.assigned_role != "Cyborg") && (character.mind.special_role != "MODE"))
- if(character.mind.role_alt_title)
- rank = character.mind.role_alt_title
- var/arrivalmessage = announcer.arrivalmsg
- arrivalmessage = replacetext(arrivalmessage,"$name",character.real_name)
- arrivalmessage = replacetext(arrivalmessage,"$rank",rank ? "[rank]" : "visitor")
- arrivalmessage = replacetext(arrivalmessage,"$species",character.species.name)
- arrivalmessage = replacetext(arrivalmessage,"$age",num2text(character.age))
- arrivalmessage = replacetext(arrivalmessage,"$gender",character.gender == FEMALE ? "Female" : "Male")
- announcer.say(";[arrivalmessage]")
- else
- if(character.mind)
- if((character.mind.assigned_role != "Cyborg") && (character.mind.special_role != "MODE"))
- if(character.mind.role_alt_title)
- rank = character.mind.role_alt_title
- global_announcer.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer")
-
- proc/AnnounceCyborg(var/mob/living/character, var/rank, var/join_message)
- if (ticker.current_state == GAME_STATE_PLAYING)
- var/ailist[] = list()
- for (var/mob/living/silicon/ai/A in living_mob_list)
- ailist += A
- if (ailist.len)
- var/mob/living/silicon/ai/announcer = pick(ailist)
- if(character.mind)
- if((character.mind.special_role != "MODE"))
- var/arrivalmessage = "A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"]."
- announcer.say(";[arrivalmessage]")
- else
- if(character.mind)
- if((character.mind.special_role != "MODE"))
- // can't use their name here, since cyborg namepicking is done post-spawn, so we'll just say "A new Cyborg has arrived"/"A new Android has arrived"/etc.
- global_announcer.autosay("A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer")
-
- proc/LateChoices()
- var/mills = world.time // 1/10 of a second, not real milliseconds but whatever
- //var/secs = ((mills % 36000) % 600) / 10 //Not really needed, but I'll leave it here for refrence.. or something
- var/mins = (mills % 36000) / 600
- var/hours = mills / 36000
-
- var/dat = ""
- dat += "Round Duration: [round(hours)]h [round(mins)]m
"
-
- if(shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
- dat += "The station has been evacuated.
"
- else if(shuttle_master.emergency.mode >= SHUTTLE_CALL)
- dat += "The station is currently undergoing evacuation procedures.
"
-
- dat += "Choose from the following open positions:
"
- for(var/datum/job/job in job_master.occupations)
- if(job && IsJobAvailable(job.title))
- 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)
- active++
- dat += "[job.title] ([job.current_positions]) (Active: [active])
"
-
- dat += ""
- // Removing the old window method but leaving it here for reference
-// src << browse(dat, "window=latechoices;size=300x640;can_close=1")
- // Added the new browser window method
- var/datum/browser/popup = new(src, "latechoices", "Choose Profession", 440, 500)
- popup.add_stylesheet("playeroptions", 'html/browser/playeroptions.css')
- popup.set_content(dat)
- popup.open(0) // 0 is passed to open so that it doesn't use the onclose() proc
-
- proc/create_character()
- spawning = 1
- close_spawn_windows()
-
- var/mob/living/carbon/human/new_character
-
- var/datum/species/chosen_species
- if(client.prefs.species)
- chosen_species = all_species[client.prefs.species]
- if(chosen_species)
- // Have to recheck admin due to no usr at roundstart. Latejoins are fine though.
- if(is_species_whitelisted(chosen_species) || has_admin_rights())
- new_character = new(loc, client.prefs.species)
-
- if(!new_character)
- new_character = new(loc)
-
- new_character.lastarea = get_area(loc)
-
- var/datum/language/chosen_language
- if(client.prefs.language)
- chosen_language = all_languages[client.prefs.language]
- if(chosen_language)
- if(is_alien_whitelisted(src, client.prefs.language) || !config.usealienwhitelist || !(chosen_language.flags & WHITELISTED))
- new_character.add_language(client.prefs.language)
- if(ticker.random_players || appearance_isbanned(new_character))
- client.prefs.random_character()
- client.prefs.real_name = random_name(new_character.gender)
- client.prefs.copy_to(new_character)
-
- src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
-
- if(mind)
- mind.active = 0 //we wish to transfer the key manually
- if(mind.assigned_role == "Clown") //give them a clownname if they are a clown
- new_character.real_name = pick(clown_names) //I hate this being here of all places but unfortunately dna is based on real_name!
- new_character.rename_self("clown")
- else if(new_character.species == "Diona")
- new_character.real_name = pick(diona_names) //I hate this being here of all places but unfortunately dna is based on real_name!
- new_character.rename_self("diona")
- mind.original = new_character
- mind.transfer_to(new_character) //won't transfer key since the mind is not active
-
- new_character.name = real_name
- new_character.dna.ready_dna(new_character)
- new_character.dna.b_type = client.prefs.b_type
-
- if(client.prefs.disabilities & DISABILITY_FLAG_NEARSIGHTED)
- new_character.dna.SetSEState(GLASSESBLOCK,1,1)
- new_character.disabilities |= NEARSIGHTED
-
- if(client.prefs.disabilities & DISABILITY_FLAG_FAT)
- new_character.mutations += FAT
- new_character.overeatduration = 600 // Max overeat
-
- if(client.prefs.disabilities & DISABILITY_FLAG_EPILEPTIC)
- new_character.dna.SetSEState(EPILEPSYBLOCK,1,1)
- new_character.disabilities |= EPILEPSY
-
- if(client.prefs.disabilities & DISABILITY_FLAG_DEAF)
- new_character.dna.SetSEState(DEAFBLOCK,1,1)
- new_character.sdisabilities |= DEAF
-
- if(client.prefs.disabilities & DISABILITY_FLAG_BLIND)
- new_character.dna.SetSEState(BLINDBLOCK,1,1)
- new_character.sdisabilities |= BLIND
-
- if(client.prefs.disabilities & DISABILITY_FLAG_MUTE)
- new_character.dna.SetSEState(MUTEBLOCK,1,1)
- new_character.sdisabilities |= MUTE
-
- chosen_species.handle_dna(new_character)
-
- domutcheck(new_character)
- new_character.dna.UpdateSE()
- new_character.sync_organ_dna(1) //just fucking incase I guess
-
- // Do the initial caching of the player's body icons.
- new_character.force_update_limbs()
- new_character.update_eyes()
- new_character.regenerate_icons()
-
- new_character.key = key //Manually transfer the key to log them in
-
- return new_character
-
- proc/ViewManifest()
- var/dat = ""
- dat += "Crew Manifest
"
- dat += data_core.get_manifest(OOC = 1)
-
- src << browse(dat, "window=manifest;size=370x420;can_close=1")
-
- Move()
+/mob/new_player/proc/AttemptLateSpawn(rank,var/spawning_at)
+ if (src != usr)
+ return 0
+ if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
+ usr << "\red The round is either not ready, or has already finished..."
+ return 0
+ if(!enter_allowed)
+ usr << "\blue There is an administrative lock on entering the game!"
+ return 0
+ if(!IsJobAvailable(rank))
+ src << alert("[rank] is not available. Please try another.")
return 0
+ job_master.AssignRole(src, rank, 1)
- proc/close_spawn_windows()
+ var/mob/living/character = create_character() //creates the human and transfers vars and mind
+ character = job_master.EquipRank(character, rank, 1) //equips the human
+ EquipCustomItems(character)
- src << browse(null, "window=latechoices") //closes late choices window
- src << browse(null, "window=playersetup") //closes the player setup window
- src << browse(null, "window=preferences") //closes job selection
- src << browse(null, "window=mob_occupation")
- src << browse(null, "window=latechoices") //closes late job selection
+ // AIs don't need a spawnpoint, they must spawn at an empty core
+ if(character.mind.assigned_role == "AI")
+
+ character = character.AIize(move=0) // AIize the character, but don't move them yet
+
+ // IsJobAvailable for AI checks that there is an empty core available in this list
+ var/obj/structure/AIcore/deactivated/C = empty_playable_ai_cores[1]
+ empty_playable_ai_cores -= C
+
+ character.loc = C.loc
+
+ AnnounceCyborg(character, rank, "has been downloaded to the empty core in \the [get_area(character)]")
+ ticker.mode.latespawn(character)
+
+ qdel(C)
+ qdel(src)
+ return
+
+ //Find our spawning point.
+ var/join_message
+ var/datum/spawnpoint/S
+
+ if(spawning_at)
+ S = spawntypes[spawning_at]
+
+ if(S && istype(S))
+ if(S.check_job_spawning(rank))
+ character.loc = pick(S.turfs)
+ join_message = S.msg
+ else
+ character << "Your chosen spawnpoint ([S.display_name]) is unavailable for your chosen job. Spawning you at the Arrivals shuttle instead."
+ character.loc = pick(latejoin)
+ join_message = "has arrived on the station"
+ else
+ character.loc = pick(latejoin)
+ join_message = "has arrived on the station"
+
+ character.lastarea = get_area(loc)
+ // Moving wheelchair if they have one
+ if(character.buckled && istype(character.buckled, /obj/structure/stool/bed/chair/wheelchair))
+ character.buckled.loc = character.loc
+ character.buckled.dir = character.dir
+
+ ticker.mode.latespawn(character)
+
+ if(character.mind.assigned_role != "Cyborg")
+ data_core.manifest_inject(character)
+ ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn
+ AnnounceArrival(character, rank, join_message)
+ callHook("latespawn", list(character))
+ else
+ AnnounceCyborg(character, rank, join_message)
+ callHook("latespawn", list(character))
+ qdel(src)
- proc/has_admin_rights()
- return check_rights(R_ADMIN, 0, src)
+/mob/new_player/proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank, var/join_message)
+ if (ticker.current_state == GAME_STATE_PLAYING)
+ var/ailist[] = list()
+ for (var/mob/living/silicon/ai/A in living_mob_list)
+ ailist += A
+ if (ailist.len)
+ var/mob/living/silicon/ai/announcer = pick(ailist)
+ if(character.mind)
+ if((character.mind.assigned_role != "Cyborg") && (character.mind.special_role != "MODE"))
+ if(character.mind.role_alt_title)
+ rank = character.mind.role_alt_title
+ var/arrivalmessage = announcer.arrivalmsg
+ arrivalmessage = replacetext(arrivalmessage,"$name",character.real_name)
+ arrivalmessage = replacetext(arrivalmessage,"$rank",rank ? "[rank]" : "visitor")
+ arrivalmessage = replacetext(arrivalmessage,"$species",character.species.name)
+ arrivalmessage = replacetext(arrivalmessage,"$age",num2text(character.age))
+ arrivalmessage = replacetext(arrivalmessage,"$gender",character.gender == FEMALE ? "Female" : "Male")
+ announcer.say(";[arrivalmessage]")
+ else
+ if(character.mind)
+ if((character.mind.assigned_role != "Cyborg") && (character.mind.special_role != "MODE"))
+ if(character.mind.role_alt_title)
+ rank = character.mind.role_alt_title
+ global_announcer.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer")
- proc/is_species_whitelisted(datum/species/S)
- if(!S) return 1
- return is_alien_whitelisted(src, S.name) || !config.usealienwhitelist || !(S.flags & IS_WHITELISTED)
+/mob/new_player/proc/AnnounceCyborg(var/mob/living/character, var/rank, var/join_message)
+ if (ticker.current_state == GAME_STATE_PLAYING)
+ var/ailist[] = list()
+ for (var/mob/living/silicon/ai/A in living_mob_list)
+ ailist += A
+ if (ailist.len)
+ var/mob/living/silicon/ai/announcer = pick(ailist)
+ if(character.mind)
+ if((character.mind.special_role != "MODE"))
+ var/arrivalmessage = "A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"]."
+ announcer.say(";[arrivalmessage]")
+ else
+ if(character.mind)
+ if((character.mind.special_role != "MODE"))
+ // can't use their name here, since cyborg namepicking is done post-spawn, so we'll just say "A new Cyborg has arrived"/"A new Android has arrived"/etc.
+ global_announcer.autosay("A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer")
+
+/mob/new_player/proc/LateChoices()
+ var/mills = world.time // 1/10 of a second, not real milliseconds but whatever
+ //var/secs = ((mills % 36000) % 600) / 10 //Not really needed, but I'll leave it here for refrence.. or something
+ var/mins = (mills % 36000) / 600
+ var/hours = mills / 36000
+
+ var/dat = ""
+ dat += "Round Duration: [round(hours)]h [round(mins)]m
"
+
+ if(shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
+ dat += "The station has been evacuated.
"
+ else if(shuttle_master.emergency.mode >= SHUTTLE_CALL)
+ dat += "The station is currently undergoing evacuation procedures.
"
+
+ dat += "Choose from the following open positions:
"
+ for(var/datum/job/job in job_master.occupations)
+ if(job && IsJobAvailable(job.title))
+ 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)
+ active++
+ dat += "[job.title] ([job.current_positions]) (Active: [active])
"
+
+ dat += ""
+ // Removing the old window method but leaving it here for reference
+// src << browse(dat, "window=latechoices;size=300x640;can_close=1")
+ // Added the new browser window method
+ var/datum/browser/popup = new(src, "latechoices", "Choose Profession", 440, 500)
+ popup.add_stylesheet("playeroptions", 'html/browser/playeroptions.css')
+ popup.set_content(dat)
+ popup.open(0) // 0 is passed to open so that it doesn't use the onclose() proc
+
+/mob/new_player/proc/create_character()
+ spawning = 1
+ close_spawn_windows()
+
+ check_prefs_are_sane()
+ var/mob/living/carbon/human/new_character = new(loc)
+ new_character.lastarea = get_area(loc)
+
+ if(ticker.random_players || appearance_isbanned(new_character))
+ client.prefs.random_character()
+ client.prefs.real_name = random_name(client.prefs.gender)
+ client.prefs.copy_to(new_character)
+
+ src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
+
+ if(mind)
+ mind.active = 0 //we wish to transfer the key manually
+ if(mind.assigned_role == "Clown") //give them a clownname if they are a clown
+ new_character.real_name = pick(clown_names) //I hate this being here of all places but unfortunately dna is based on real_name!
+ new_character.rename_self("clown")
+ else if(new_character.species == "Diona")
+ new_character.real_name = pick(diona_names) //I hate this being here of all places but unfortunately dna is based on real_name!
+ new_character.rename_self("diona")
+ mind.original = new_character
+ mind.transfer_to(new_character) //won't transfer key since the mind is not active
+
+
+ new_character.key = key //Manually transfer the key to log them in
+
+ return new_character
+
+// This is to check that the player only has preferences set that they're supposed to
+/mob/new_player/proc/check_prefs_are_sane()
+ var/datum/species/chosen_species
+ if(client.prefs.species)
+ chosen_species = all_species[client.prefs.species]
+ if(!(chosen_species && (is_species_whitelisted(chosen_species) || has_admin_rights())))
+ // Have to recheck admin due to no usr at roundstart. Latejoins are fine though.
+ log_to_dd("[src] had species [client.prefs.species], though they weren't supposed to. Setting to Human.")
+ client.prefs.species = "Human"
+
+ var/datum/language/chosen_language
+ if(client.prefs.language)
+ chosen_language = all_languages[client.prefs.language]
+ if(!((chosen_language || client.prefs.language == "None") && (is_alien_whitelisted(src, client.prefs.language) || !config.usealienwhitelist || !(chosen_language.flags & WHITELISTED))))
+ log_to_dd("[src] had language [client.prefs.language], though they weren't supposed to. Setting to None.")
+ client.prefs.language = "None"
+
+/mob/new_player/proc/ViewManifest()
+ var/dat = ""
+ dat += "Crew Manifest
"
+ dat += data_core.get_manifest(OOC = 1)
+
+ src << browse(dat, "window=manifest;size=370x420;can_close=1")
+
+/mob/new_player/Move()
+ return 0
+
+
+/mob/new_player/proc/close_spawn_windows()
+ src << browse(null, "window=latechoices") //closes late choices window
+ src << browse(null, "window=playersetup") //closes the player setup window
+ src << browse(null, "window=preferences") //closes job selection
+ src << browse(null, "window=mob_occupation")
+ src << browse(null, "window=latechoices") //closes late job selection
+
+
+/mob/new_player/proc/has_admin_rights()
+ return check_rights(R_ADMIN, 0, src)
+
+/mob/new_player/proc/is_species_whitelisted(datum/species/S)
+ if(!S) return 1
+ return is_alien_whitelisted(src, S.name) || !config.usealienwhitelist || !(S.flags & IS_WHITELISTED)
/mob/new_player/get_species()
var/datum/species/chosen_species
diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm
index e8b9f948ee7..aed5d50939e 100644
--- a/code/modules/mob/new_player/preferences_setup.dm
+++ b/code/modules/mob/new_player/preferences_setup.dm
@@ -1,849 +1,848 @@
-datum/preferences
- //The mob should have a gender you want before running this proc. Will run fine without H
- proc/random_character(gender_override)
- if(gender_override)
- gender = gender_override
+//The mob should have a gender you want before running this proc. Will run fine without H
+/datum/preferences/proc/random_character(gender_override)
+ if(gender_override)
+ gender = gender_override
+ else
+ gender = pick(MALE, FEMALE)
+ underwear = random_underwear(gender, species)
+ undershirt = random_undershirt(gender, species)
+ socks = random_socks(gender, species)
+ if(species == "Human")
+ s_tone = random_skin_tone()
+ h_style = random_hair_style(gender, species)
+ f_style = random_facial_hair_style(gender, species)
+ if(species == "Human" || species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Machine" || species == "Vulpkanin")
+ randomize_hair_color("hair")
+ randomize_hair_color("facial")
+ randomize_eyes_color()
+ if(species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Vulpkanin")
+ randomize_skin_color()
+ backbag = 2
+ age = rand(AGE_MIN,AGE_MAX)
+
+
+/datum/preferences/proc/randomize_hair_color(var/target = "hair")
+ if(prob (75) && target == "facial") // Chance to inherit hair color
+ r_facial = r_hair
+ g_facial = g_hair
+ b_facial = b_hair
+ return
+
+ var/red
+ var/green
+ var/blue
+
+ var/col = pick ("blonde", "black", "chestnut", "copper", "brown", "wheat", "old", "punk")
+ switch(col)
+ if("blonde")
+ red = 255
+ green = 255
+ blue = 0
+ if("black")
+ red = 0
+ green = 0
+ blue = 0
+ if("chestnut")
+ red = 153
+ green = 102
+ blue = 51
+ if("copper")
+ red = 255
+ green = 153
+ blue = 0
+ if("brown")
+ red = 102
+ green = 51
+ blue = 0
+ if("wheat")
+ red = 255
+ green = 255
+ blue = 153
+ if("old")
+ red = rand (100, 255)
+ green = red
+ blue = red
+ if("punk")
+ red = rand (0, 255)
+ green = rand (0, 255)
+ blue = rand (0, 255)
+
+ red = max(min(red + rand (-25, 25), 255), 0)
+ green = max(min(green + rand (-25, 25), 255), 0)
+ blue = max(min(blue + rand (-25, 25), 255), 0)
+
+ switch(target)
+ if("hair")
+ r_hair = red
+ g_hair = green
+ b_hair = blue
+ if("facial")
+ r_facial = red
+ g_facial = green
+ b_facial = blue
+
+/datum/preferences/proc/randomize_eyes_color()
+ var/red
+ var/green
+ var/blue
+
+ var/col = pick ("black", "grey", "brown", "chestnut", "blue", "lightblue", "green", "albino")
+ switch(col)
+ if("black")
+ red = 0
+ green = 0
+ blue = 0
+ if("grey")
+ red = rand (100, 200)
+ green = red
+ blue = red
+ if("brown")
+ red = 102
+ green = 51
+ blue = 0
+ if("chestnut")
+ red = 153
+ green = 102
+ blue = 0
+ if("blue")
+ red = 51
+ green = 102
+ blue = 204
+ if("lightblue")
+ red = 102
+ green = 204
+ blue = 255
+ if("green")
+ red = 0
+ green = 102
+ blue = 0
+ if("albino")
+ red = rand (200, 255)
+ green = rand (0, 150)
+ blue = rand (0, 150)
+
+ red = max(min(red + rand (-25, 25), 255), 0)
+ green = max(min(green + rand (-25, 25), 255), 0)
+ blue = max(min(blue + rand (-25, 25), 255), 0)
+
+ r_eyes = red
+ g_eyes = green
+ b_eyes = blue
+
+/datum/preferences/proc/randomize_skin_color()
+ var/red
+ var/green
+ var/blue
+
+ var/col = pick ("black", "grey", "brown", "chestnut", "blue", "lightblue", "green", "albino")
+ switch(col)
+ if("black")
+ red = 0
+ green = 0
+ blue = 0
+ if("grey")
+ red = rand (100, 200)
+ green = red
+ blue = red
+ if("brown")
+ red = 102
+ green = 51
+ blue = 0
+ if("chestnut")
+ red = 153
+ green = 102
+ blue = 0
+ if("blue")
+ red = 51
+ green = 102
+ blue = 204
+ if("lightblue")
+ red = 102
+ green = 204
+ blue = 255
+ if("green")
+ red = 0
+ green = 102
+ blue = 0
+ if("albino")
+ red = rand (200, 255)
+ green = rand (0, 150)
+ blue = rand (0, 150)
+
+ red = max(min(red + rand (-25, 25), 255), 0)
+ green = max(min(green + rand (-25, 25), 255), 0)
+ blue = max(min(blue + rand (-25, 25), 255), 0)
+
+ r_skin = red
+ g_skin = green
+ b_skin = blue
+
+/datum/preferences/proc/blend_backpack(var/icon/clothes_s,var/backbag,var/satchel,var/backpack="backpack")
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', backpack), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', satchel), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ return clothes_s
+
+/datum/preferences/proc/update_preview_icon(var/for_observer=0) //seriously. This is horrendous.
+ qdel(preview_icon_front)
+ qdel(preview_icon_side)
+ qdel(preview_icon)
+
+ var/g = "m"
+ if(gender == FEMALE) g = "f"
+
+ var/icon/icobase
+ var/datum/species/current_species = all_species[species]
+
+ if(current_species)
+ icobase = current_species.icobase
+ else
+ icobase = 'icons/mob/human_races/r_human.dmi'
+
+ var/fat=""
+ if(disabilities&DISABILITY_FLAG_FAT && current_species.flags & CAN_BE_FAT)
+ fat="_fat"
+ preview_icon = new /icon(icobase, "torso_[g][fat]")
+ preview_icon.Blend(new /icon(icobase, "groin_[g]"), ICON_OVERLAY)
+ preview_icon.Blend(new /icon(icobase, "head_[g]"), ICON_OVERLAY)
+
+ //Tail
+ if(current_species && (current_species.bodyflags & HAS_TAIL))
+ var/tail_icon
+ var/tail_icon_state
+
+ if(body_accessory)
+ var/datum/body_accessory/accessory = body_accessory_by_name[body_accessory]
+ tail_icon = accessory.icon
+ tail_icon_state = accessory.icon_state
else
- gender = pick(MALE, FEMALE)
- underwear = random_underwear(gender, species)
- undershirt = random_undershirt(gender, species)
- socks = random_socks(gender, species)
- if(species == "Human")
- s_tone = random_skin_tone()
- h_style = random_hair_style(gender, species)
- f_style = random_facial_hair_style(gender, species)
- if(species == "Human" || species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Machine" || species == "Vulpkanin")
- randomize_hair_color("hair")
- randomize_hair_color("facial")
- randomize_eyes_color()
- if(species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Vulpkanin")
- randomize_skin_color()
- backbag = 2
- age = rand(AGE_MIN,AGE_MAX)
+ tail_icon = "icons/effects/species.dmi"
+ tail_icon_state = "[current_species.tail]_s"
+ var/icon/temp = new /icon("icon" = tail_icon, "icon_state" = tail_icon_state)
+ preview_icon.Blend(temp, ICON_OVERLAY)
- proc/randomize_hair_color(var/target = "hair")
- if(prob (75) && target == "facial") // Chance to inherit hair color
- r_facial = r_hair
- g_facial = g_hair
- b_facial = b_hair
- return
+ for(var/name in list("r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","l_arm","l_hand"))
+ if(organ_data[name] == "amputated") continue
+ if(organ_data[name] == "cyborg")
+ var/datum/robolimb/R
+ if(rlimb_data[name]) R = all_robolimbs[rlimb_data[name]]
+ if(!R) R = basic_robolimb
+ preview_icon.Blend(icon(R.icon, "[name]"), ICON_OVERLAY) // This doesn't check gendered_icon. Not an issue while only limbs can be robotic.
+ continue
+ preview_icon.Blend(new /icon(icobase, "[name]"), ICON_OVERLAY)
- var/red
- var/green
- var/blue
+ // Skin color
+ if(current_species && (current_species.bodyflags & HAS_SKIN_COLOR))
+ preview_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
- var/col = pick ("blonde", "black", "chestnut", "copper", "brown", "wheat", "old", "punk")
- switch(col)
- if("blonde")
- red = 255
- green = 255
- blue = 0
- if("black")
- red = 0
- green = 0
- blue = 0
- if("chestnut")
- red = 153
- green = 102
- blue = 51
- if("copper")
- red = 255
- green = 153
- blue = 0
- if("brown")
- red = 102
- green = 51
- blue = 0
- if("wheat")
- red = 255
- green = 255
- blue = 153
- if("old")
- red = rand (100, 255)
- green = red
- blue = red
- if("punk")
- red = rand (0, 255)
- green = rand (0, 255)
- blue = rand (0, 255)
-
- red = max(min(red + rand (-25, 25), 255), 0)
- green = max(min(green + rand (-25, 25), 255), 0)
- blue = max(min(blue + rand (-25, 25), 255), 0)
-
- switch(target)
- if("hair")
- r_hair = red
- g_hair = green
- b_hair = blue
- if("facial")
- r_facial = red
- g_facial = green
- b_facial = blue
-
- proc/randomize_eyes_color()
- var/red
- var/green
- var/blue
-
- var/col = pick ("black", "grey", "brown", "chestnut", "blue", "lightblue", "green", "albino")
- switch(col)
- if("black")
- red = 0
- green = 0
- blue = 0
- if("grey")
- red = rand (100, 200)
- green = red
- blue = red
- if("brown")
- red = 102
- green = 51
- blue = 0
- if("chestnut")
- red = 153
- green = 102
- blue = 0
- if("blue")
- red = 51
- green = 102
- blue = 204
- if("lightblue")
- red = 102
- green = 204
- blue = 255
- if("green")
- red = 0
- green = 102
- blue = 0
- if("albino")
- red = rand (200, 255)
- green = rand (0, 150)
- blue = rand (0, 150)
-
- red = max(min(red + rand (-25, 25), 255), 0)
- green = max(min(green + rand (-25, 25), 255), 0)
- blue = max(min(blue + rand (-25, 25), 255), 0)
-
- r_eyes = red
- g_eyes = green
- b_eyes = blue
-
- proc/randomize_skin_color()
- var/red
- var/green
- var/blue
-
- var/col = pick ("black", "grey", "brown", "chestnut", "blue", "lightblue", "green", "albino")
- switch(col)
- if("black")
- red = 0
- green = 0
- blue = 0
- if("grey")
- red = rand (100, 200)
- green = red
- blue = red
- if("brown")
- red = 102
- green = 51
- blue = 0
- if("chestnut")
- red = 153
- green = 102
- blue = 0
- if("blue")
- red = 51
- green = 102
- blue = 204
- if("lightblue")
- red = 102
- green = 204
- blue = 255
- if("green")
- red = 0
- green = 102
- blue = 0
- if("albino")
- red = rand (200, 255)
- green = rand (0, 150)
- blue = rand (0, 150)
-
- red = max(min(red + rand (-25, 25), 255), 0)
- green = max(min(green + rand (-25, 25), 255), 0)
- blue = max(min(blue + rand (-25, 25), 255), 0)
-
- r_skin = red
- g_skin = green
- b_skin = blue
-
- proc/blend_backpack(var/icon/clothes_s,var/backbag,var/satchel,var/backpack="backpack")
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', backpack), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', satchel), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- return clothes_s
-
- proc/update_preview_icon(var/for_observer=0) //seriously. This is horrendous.
- qdel(preview_icon_front)
- qdel(preview_icon_side)
- qdel(preview_icon)
-
- var/g = "m"
- if(gender == FEMALE) g = "f"
-
- var/icon/icobase
- var/datum/species/current_species = all_species[species]
-
- if(current_species)
- icobase = current_species.icobase
+ // Skin tone
+ if(current_species && (current_species.bodyflags & HAS_SKIN_TONE))
+ if (s_tone >= 0)
+ preview_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
else
- icobase = 'icons/mob/human_races/r_human.dmi'
+ preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
- var/fat=""
- if(disabilities&DISABILITY_FLAG_FAT && current_species.flags & CAN_BE_FAT)
- fat="_fat"
- preview_icon = new /icon(icobase, "torso_[g][fat]")
- preview_icon.Blend(new /icon(icobase, "groin_[g]"), ICON_OVERLAY)
- preview_icon.Blend(new /icon(icobase, "head_[g]"), ICON_OVERLAY)
-
- //Tail
- if(current_species && (current_species.bodyflags & HAS_TAIL))
- var/tail_icon
- var/tail_icon_state
-
- if(body_accessory)
- var/datum/body_accessory/accessory = body_accessory_by_name[body_accessory]
- tail_icon = accessory.icon
- tail_icon_state = accessory.icon_state
- else
- tail_icon = "icons/effects/species.dmi"
- tail_icon_state = "[current_species.tail]_s"
-
- var/icon/temp = new /icon("icon" = tail_icon, "icon_state" = tail_icon_state)
- preview_icon.Blend(temp, ICON_OVERLAY)
-
- for(var/name in list("r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","l_arm","l_hand"))
- if(organ_data[name] == "amputated") continue
- if(organ_data[name] == "cyborg")
- var/datum/robolimb/R
- if(rlimb_data[name]) R = all_robolimbs[rlimb_data[name]]
- if(!R) R = basic_robolimb
- preview_icon.Blend(icon(R.icon, "[name]"), ICON_OVERLAY) // This doesn't check gendered_icon. Not an issue while only limbs can be robotic.
- continue
- preview_icon.Blend(new /icon(icobase, "[name]"), ICON_OVERLAY)
-
- // Skin color
- if(current_species && (current_species.bodyflags & HAS_SKIN_COLOR))
- preview_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
-
- // Skin tone
- if(current_species && (current_species.bodyflags & HAS_SKIN_TONE))
- if (s_tone >= 0)
- preview_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
- else
- preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
-
- //Body Markings
- if(current_species && (current_species.bodyflags & HAS_MARKINGS))
- var/datum/sprite_accessory/marking_style = marking_styles_list[m_style]
- if(marking_style && marking_style.species_allowed)
- var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s")
- markings_s.Blend(rgb(r_markings, g_markings, b_markings), ICON_ADD)
- preview_icon.Blend(markings_s, ICON_OVERLAY)
+ //Body Markings
+ if(current_species && (current_species.bodyflags & HAS_MARKINGS))
+ var/datum/sprite_accessory/marking_style = marking_styles_list[m_style]
+ if(marking_style && marking_style.species_allowed)
+ var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s")
+ markings_s.Blend(rgb(r_markings, g_markings, b_markings), ICON_ADD)
+ preview_icon.Blend(markings_s, ICON_OVERLAY)
- var/icon/face_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "bald_s")
- if(!(current_species.bodyflags & NO_EYES))
- var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = current_species ? current_species.eyes : "eyes_s")
- eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
- face_s.Blend(eyes_s, ICON_OVERLAY)
+ var/icon/face_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "bald_s")
+ if(!(current_species.bodyflags & NO_EYES))
+ var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = current_species ? current_species.eyes : "eyes_s")
+ eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
+ face_s.Blend(eyes_s, ICON_OVERLAY)
- var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
- if(hair_style)
- var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
- if(current_species.name == "Slime People") // whee I am part of the problem
- hair_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_ADD)
- else
- hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
- face_s.Blend(hair_s, ICON_OVERLAY)
+ var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
+ if(hair_style)
+ var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
+ if(current_species.name == "Slime People") // whee I am part of the problem
+ hair_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_ADD)
+ else
+ hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
+ face_s.Blend(hair_s, ICON_OVERLAY)
- //Head Accessory
- if(current_species && (current_species.bodyflags & HAS_HEAD_ACCESSORY))
- var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[ha_style]
- if(head_accessory_style && head_accessory_style.species_allowed)
- var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s")
- head_accessory_s.Blend(rgb(r_headacc, g_headacc, b_headacc), ICON_ADD)
- face_s.Blend(head_accessory_s, ICON_OVERLAY)
+ //Head Accessory
+ if(current_species && (current_species.bodyflags & HAS_HEAD_ACCESSORY))
+ var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[ha_style]
+ if(head_accessory_style && head_accessory_style.species_allowed)
+ var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s")
+ head_accessory_s.Blend(rgb(r_headacc, g_headacc, b_headacc), ICON_ADD)
+ face_s.Blend(head_accessory_s, ICON_OVERLAY)
- var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
- if(facial_hair_style && facial_hair_style.species_allowed)
- var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
- if(current_species.name == "Slime People") // whee I am part of the problem
- facial_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_ADD)
- else
- facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
- face_s.Blend(facial_s, ICON_OVERLAY)
+ var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
+ if(facial_hair_style && facial_hair_style.species_allowed)
+ var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
+ if(current_species.name == "Slime People") // whee I am part of the problem
+ facial_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_ADD)
+ else
+ facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
+ face_s.Blend(facial_s, ICON_OVERLAY)
- var/icon/underwear_s = null
- if(underwear && (current_species.clothing_flags & HAS_UNDERWEAR))
- var/datum/sprite_accessory/underwear/U = underwear_list[underwear]
- if(U)
- underwear_s = new/icon(U.icon, "uw_[U.icon_state]_s", ICON_OVERLAY)
+ var/icon/underwear_s = null
+ if(underwear && (current_species.clothing_flags & HAS_UNDERWEAR))
+ var/datum/sprite_accessory/underwear/U = underwear_list[underwear]
+ if(U)
+ underwear_s = new/icon(U.icon, "uw_[U.icon_state]_s", ICON_OVERLAY)
- var/icon/undershirt_s = null
- if(undershirt && (current_species.clothing_flags & HAS_UNDERSHIRT))
- var/datum/sprite_accessory/undershirt/U2 = undershirt_list[undershirt]
- if(U2)
- undershirt_s = new/icon(U2.icon, "us_[U2.icon_state]_s", ICON_OVERLAY)
+ var/icon/undershirt_s = null
+ if(undershirt && (current_species.clothing_flags & HAS_UNDERSHIRT))
+ var/datum/sprite_accessory/undershirt/U2 = undershirt_list[undershirt]
+ if(U2)
+ undershirt_s = new/icon(U2.icon, "us_[U2.icon_state]_s", ICON_OVERLAY)
- var/icon/socks_s = null
- if(socks && (current_species.clothing_flags & HAS_SOCKS))
- var/datum/sprite_accessory/socks/U3 = socks_list[socks]
- if(U3)
- socks_s = new/icon(U3.icon, "sk_[U3.icon_state]_s", ICON_OVERLAY)
+ var/icon/socks_s = null
+ if(socks && (current_species.clothing_flags & HAS_SOCKS))
+ var/datum/sprite_accessory/socks/U3 = socks_list[socks]
+ if(U3)
+ socks_s = new/icon(U3.icon, "sk_[U3.icon_state]_s", ICON_OVERLAY)
- var/icon/clothes_s = null
- var/uniform_dmi='icons/mob/uniform.dmi'
- if(disabilities&DISABILITY_FLAG_FAT)
- uniform_dmi='icons/mob/uniform_fat.dmi'
- if(job_support_low & CIVILIAN)//This gives the preview icon clothes depending on which job(if any) is set to 'high'
- clothes_s = new /icon(uniform_dmi, "grey_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- if(backbag == 2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- else if(backbag == 3 || backbag == 4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ var/icon/clothes_s = null
+ var/uniform_dmi='icons/mob/uniform.dmi'
+ if(disabilities&DISABILITY_FLAG_FAT)
+ uniform_dmi='icons/mob/uniform_fat.dmi'
+ if(job_support_low & CIVILIAN)//This gives the preview icon clothes depending on which job(if any) is set to 'high'
+ clothes_s = new /icon(uniform_dmi, "grey_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ if(backbag == 2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ else if(backbag == 3 || backbag == 4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- else if(job_support_high)//I hate how this looks, but there's no reason to go through this switch if it's empty
- switch(job_support_high)
- if(HOP)
- clothes_s = new /icon(uniform_dmi, "hop_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "ianshirt"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(BARTENDER)
- clothes_s = new /icon(uniform_dmi, "ba_suit_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "tophat"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(BOTANIST)
- clothes_s = new /icon(uniform_dmi, "hydroponics_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/hands.dmi', "ggloves"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "apron"), ICON_OVERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "nymph"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-hyd"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(CHEF)
- clothes_s = new /icon(uniform_dmi, "chef_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "chefhat"), ICON_OVERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "apronchef"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(JANITOR)
- clothes_s = new /icon(uniform_dmi, "janitor_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "bio_janitor"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(LIBRARIAN)
- clothes_s = new /icon(uniform_dmi, "red_suit_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "hairflower"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(QUARTERMASTER)
- clothes_s = new /icon(uniform_dmi, "qm_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "poncho"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(CARGOTECH)
- clothes_s = new /icon(uniform_dmi, "cargotech_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "flat_cap"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(MINER)
- clothes_s = new /icon(uniform_dmi, "miner_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "bearpelt"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(LAWYER)
- clothes_s = new /icon(uniform_dmi, "internalaffairs_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "briefcase"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suitjacket_blue"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(CHAPLAIN)
- clothes_s = new /icon(uniform_dmi, "chapblack_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "imperium_monk"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(CLOWN)
- clothes_s = new /icon(uniform_dmi, "clown_s")
- clothes_s.Blend(new /icon('icons/mob/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('icons/mob/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('icons/mob/suit.dmi', "suspenders"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
-
- else if(job_medsci_high)
- switch(job_medsci_high)
- if(RD)
- clothes_s = new /icon(uniform_dmi, "director_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "petehat"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(SCIENTIST)
- clothes_s = new /icon(uniform_dmi, "toxinswhite_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(prob(1))
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "metroid"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(CHEMIST)
- clothes_s = new /icon(uniform_dmi, "chemistrywhite_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labgreen"), ICON_OVERLAY)
- else
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_chem_open"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-chem"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(CMO)
- clothes_s = new /icon(uniform_dmi, "cmo_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "bio_cmo"), ICON_OVERLAY)
- else
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_cmo_open"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(DOCTOR)
- clothes_s = new /icon(uniform_dmi, "medical_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "surgeon"), ICON_OVERLAY)
- else
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(GENETICIST)
- clothes_s = new /icon(uniform_dmi, "geneticswhite_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "monkeysuit"), ICON_OVERLAY)
- else
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_gen_open"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-gen"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(VIROLOGIST)
- clothes_s = new /icon(uniform_dmi, "virologywhite_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/mask.dmi', "sterile"), ICON_OVERLAY)
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "plaguedoctor"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-vir"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(PSYCHIATRIST)
- clothes_s = new /icon(uniform_dmi, "psych_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(PARAMEDIC)
- clothes_s = new /icon(uniform_dmi, "paramedic_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigoff"), ICON_OVERLAY)
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "bluesoft"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
- if(ROBOTICIST)
- clothes_s = new /icon(uniform_dmi, "robotics_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
-
- else if(job_engsec_high)
- switch(job_engsec_high)
- if(CAPTAIN)
- clothes_s = new /icon(uniform_dmi, "captain_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "centcomcaptain"), ICON_OVERLAY)
- else
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "captain"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-cap"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(HOS)
- clothes_s = new /icon(uniform_dmi, "hosred_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret_hos"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(WARDEN)
- clothes_s = new /icon('icons/mob/uniform.dmi', "warden_s")
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "slippers_worn"), ICON_OVERLAY)
- else
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(DETECTIVE)
- clothes_s = new /icon(uniform_dmi, "detective_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
- if(prob(1))
- 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('icons/mob/suit.dmi', "detective"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(OFFICER)
- clothes_s = new /icon(uniform_dmi, "secred_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret_officer"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(CHIEF)
- clothes_s = new /icon(uniform_dmi, "chief_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "blueprints"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(ENGINEER)
- clothes_s = new /icon(uniform_dmi, "engine_s")
- clothes_s.Blend(new /icon('icons/mob/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)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "hazard"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(ATMOSTECH)
- clothes_s = new /icon(uniform_dmi, "atmos_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
- if(prob(1))
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "firesuit"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
-
- 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('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "straight_jacket"), ICON_OVERLAY)
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "cardborg_h"), ICON_OVERLAY)
- if(backbag == 2)
+ else if(job_support_high)//I hate how this looks, but there's no reason to go through this switch if it's empty
+ switch(job_support_high)
+ if(HOP)
+ clothes_s = new /icon(uniform_dmi, "hop_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "ianshirt"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- else if(backbag == 3 || backbag == 4)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(CYBORG)
- clothes_s = new /icon(uniform_dmi, "grey_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "cardborg"), ICON_OVERLAY)
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "cardborg_h"), ICON_OVERLAY)
- if(backbag == 2)
+ if(BARTENDER)
+ clothes_s = new /icon(uniform_dmi, "ba_suit_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "tophat"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- else if(backbag == 3 || backbag == 4)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- else if(job_karma_high)
- switch(job_karma_high)
- if(MECHANIC)
- clothes_s = new /icon(uniform_dmi, "mechanic_s")
- clothes_s.Blend(new /icon('icons/mob/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)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(PILOT)
- clothes_s = new /icon(uniform_dmi, "secred_s")
+ if(BOTANIST)
+ clothes_s = new /icon(uniform_dmi, "hydroponics_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "ggloves"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "apron"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "nymph"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-hyd"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CHEF)
+ clothes_s = new /icon(uniform_dmi, "chef_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "chefhat"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "apronchef"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(JANITOR)
+ clothes_s = new /icon(uniform_dmi, "janitor_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "bio_janitor"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(LIBRARIAN)
+ clothes_s = new /icon(uniform_dmi, "red_suit_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "hairflower"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(QUARTERMASTER)
+ clothes_s = new /icon(uniform_dmi, "qm_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "poncho"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CARGOTECH)
+ clothes_s = new /icon(uniform_dmi, "cargotech_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "flat_cap"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(MINER)
+ clothes_s = new /icon(uniform_dmi, "miner_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "bearpelt"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(LAWYER)
+ clothes_s = new /icon(uniform_dmi, "internalaffairs_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "briefcase"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suitjacket_blue"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CHAPLAIN)
+ clothes_s = new /icon(uniform_dmi, "chapblack_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "imperium_monk"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CLOWN)
+ clothes_s = new /icon(uniform_dmi, "clown_s")
+ clothes_s.Blend(new /icon('icons/mob/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('icons/mob/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('icons/mob/suit.dmi', "suspenders"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+
+ else if(job_medsci_high)
+ switch(job_medsci_high)
+ if(RD)
+ clothes_s = new /icon(uniform_dmi, "director_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "petehat"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(SCIENTIST)
+ clothes_s = new /icon(uniform_dmi, "toxinswhite_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(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "metroid"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CHEMIST)
+ clothes_s = new /icon(uniform_dmi, "chemistrywhite_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labgreen"), ICON_OVERLAY)
+ else
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_chem_open"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-chem"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CMO)
+ clothes_s = new /icon(uniform_dmi, "cmo_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "bio_cmo"), ICON_OVERLAY)
+ else
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_cmo_open"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(DOCTOR)
+ clothes_s = new /icon(uniform_dmi, "medical_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "surgeon"), ICON_OVERLAY)
+ else
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(GENETICIST)
+ clothes_s = new /icon(uniform_dmi, "geneticswhite_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "monkeysuit"), ICON_OVERLAY)
+ else
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_gen_open"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-gen"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(VIROLOGIST)
+ clothes_s = new /icon(uniform_dmi, "virologywhite_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/mask.dmi', "sterile"), ICON_OVERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "plaguedoctor"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-vir"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(PSYCHIATRIST)
+ clothes_s = new /icon(uniform_dmi, "psych_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(PARAMEDIC)
+ clothes_s = new /icon(uniform_dmi, "paramedic_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigoff"), ICON_OVERLAY)
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "bluesoft"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
+ if(ROBOTICIST)
+ clothes_s = new /icon(uniform_dmi, "robotics_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+
+ else if(job_engsec_high)
+ switch(job_engsec_high)
+ if(CAPTAIN)
+ clothes_s = new /icon(uniform_dmi, "captain_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "centcomcaptain"), ICON_OVERLAY)
+ else
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "captain"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-cap"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(HOS)
+ clothes_s = new /icon(uniform_dmi, "hosred_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret_hos"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(WARDEN)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "warden_s")
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "slippers_worn"), ICON_OVERLAY)
+ else
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "bomber"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(BRIGDOC)
- clothes_s = new /icon(uniform_dmi, "medical_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "fr_jacket_open"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(NANO)
- clothes_s = new /icon(uniform_dmi, "officer_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(BLUESHIELD)
- clothes_s = new /icon(uniform_dmi, "officer_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/hands.dmi', "swat_gl"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "blueshield"), ICON_OVERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(JUDGE)
- clothes_s = new /icon(uniform_dmi, "really_black_suit_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/head.dmi', "mercy_hood"), ICON_UNDERLAY)
- clothes_s.Blend(new /icon('icons/mob/suit.dmi', "judge"), ICON_UNDERLAY)
- switch(backbag)
- if(2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- if(3)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
- if(4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(DETECTIVE)
+ clothes_s = new /icon(uniform_dmi, "detective_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ if(prob(1))
+ 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('icons/mob/suit.dmi', "detective"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(OFFICER)
+ clothes_s = new /icon(uniform_dmi, "secred_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret_officer"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CHIEF)
+ clothes_s = new /icon(uniform_dmi, "chief_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "blueprints"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(ENGINEER)
+ clothes_s = new /icon(uniform_dmi, "engine_s")
+ clothes_s.Blend(new /icon('icons/mob/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)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "hazard"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(ATMOSTECH)
+ clothes_s = new /icon(uniform_dmi, "atmos_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "firesuit"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(disabilities & NEARSIGHTED)
- preview_icon.Blend(new /icon('icons/mob/eyes.dmi', "glasses"), ICON_OVERLAY)
+ 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('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "straight_jacket"), ICON_OVERLAY)
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "cardborg_h"), ICON_OVERLAY)
+ if(backbag == 2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ else if(backbag == 3 || backbag == 4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CYBORG)
+ clothes_s = new /icon(uniform_dmi, "grey_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "cardborg"), ICON_OVERLAY)
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "cardborg_h"), ICON_OVERLAY)
+ if(backbag == 2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ else if(backbag == 3 || backbag == 4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ else if(job_karma_high)
+ switch(job_karma_high)
+ if(MECHANIC)
+ clothes_s = new /icon(uniform_dmi, "mechanic_s")
+ clothes_s.Blend(new /icon('icons/mob/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)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(PILOT)
+ clothes_s = new /icon(uniform_dmi, "secred_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "bomber"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(BRIGDOC)
+ clothes_s = new /icon(uniform_dmi, "medical_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "fr_jacket_open"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(NANO)
+ clothes_s = new /icon(uniform_dmi, "officer_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(BLUESHIELD)
+ clothes_s = new /icon(uniform_dmi, "officer_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "swat_gl"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "blueshield"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(JUDGE)
+ clothes_s = new /icon(uniform_dmi, "really_black_suit_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "mercy_hood"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "judge"), ICON_UNDERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- // Observers get tourist outfit.
- if(for_observer)
- clothes_s = new /icon(uniform_dmi, "tourist_s")
- clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
- if(backbag == 2)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
- else if(backbag == 3 || backbag == 4)
- clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(disabilities & NEARSIGHTED)
+ preview_icon.Blend(new /icon('icons/mob/eyes.dmi', "glasses"), ICON_OVERLAY)
- if(underwear_s)
- preview_icon.Blend(underwear_s, ICON_OVERLAY)
- if(undershirt_s)
- preview_icon.Blend(undershirt_s, ICON_OVERLAY)
- if(socks_s)
- preview_icon.Blend(socks_s, ICON_OVERLAY)
- if(clothes_s)
- preview_icon.Blend(clothes_s, ICON_OVERLAY)
- preview_icon.Blend(face_s, ICON_OVERLAY)
- preview_icon_front = new(preview_icon, dir = SOUTH)
- preview_icon_side = new(preview_icon, dir = WEST)
+ // Observers get tourist outfit.
+ if(for_observer)
+ clothes_s = new /icon(uniform_dmi, "tourist_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ if(backbag == 2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ else if(backbag == 3 || backbag == 4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- qdel(face_s)
- qdel(underwear_s)
- qdel(undershirt_s)
- qdel(socks_s)
- qdel(clothes_s)
+ if(underwear_s)
+ preview_icon.Blend(underwear_s, ICON_OVERLAY)
+ if(undershirt_s)
+ preview_icon.Blend(undershirt_s, ICON_OVERLAY)
+ if(socks_s)
+ preview_icon.Blend(socks_s, ICON_OVERLAY)
+ if(clothes_s)
+ preview_icon.Blend(clothes_s, ICON_OVERLAY)
+ preview_icon.Blend(face_s, ICON_OVERLAY)
+ preview_icon_front = new(preview_icon, dir = SOUTH)
+ preview_icon_side = new(preview_icon, dir = WEST)
+
+ qdel(face_s)
+ qdel(underwear_s)
+ qdel(undershirt_s)
+ qdel(socks_s)
+ qdel(clothes_s)