//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 var/list/preferences_datums = list() var/global/list/special_role_times = list( //minimum age (in days) for accounts to play these roles ROLE_PAI = 0, ROLE_POSIBRAIN = 0, ROLE_GUARDIAN = 0, ROLE_TRAITOR = 7, ROLE_CHANGELING = 14, ROLE_SHADOWLING = 14, ROLE_WIZARD = 14, ROLE_REV = 14, ROLE_VAMPIRE = 14, ROLE_BLOB = 14, ROLE_REVENANT = 14, ROLE_OPERATIVE = 21, ROLE_CULTIST = 21, ROLE_RAIDER = 21, ROLE_ALIEN = 21, ROLE_DEMON = 21, ROLE_SENTIENT = 21, // ROLE_GANG = 21, ROLE_BORER = 21, ROLE_NINJA = 21, ROLE_MUTINEER = 21, ROLE_MALF = 30, ROLE_ABDUCTOR = 30, ) /proc/player_old_enough_antag(client/C, role) if(available_in_days_antag(C, role) == 0) return 1 //Available in 0 days = available right now = player is old enough to play. return 0 /proc/available_in_days_antag(client/C, role) if(!C) return 0 if(!role) return 0 if(!config.use_age_restriction_for_antags) return 0 if(!isnum(C.player_age)) return 0 //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced var/minimal_player_age_antag = special_role_times[num2text(role)] if(!isnum(minimal_player_age_antag)) return 0 return max(0, minimal_player_age_antag - C.player_age) /proc/check_client_age(client/C, var/days) // If days isn't provided, returns the age of the client. If it is provided, it returns the days until the player_age is equal to or greater than the days variable if(!days) return C.player_age else return max(0, days - C.player_age) return 0 //used for alternate_option #define GET_RANDOM_JOB 0 #define BE_CIVILIAN 1 #define RETURN_TO_LOBBY 2 #define MAX_SAVE_SLOTS 20 // Save slots for regular players #define MAX_SAVE_SLOTS_MEMBER 20 // Save slots for BYOND members #define MAX_GEAR_COST config.max_loadout_points #define TAB_CHAR 0 #define TAB_GAME 1 #define TAB_GEAR 2 /datum/preferences //doohickeys for savefiles // var/path var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used // var/savefile_version = 0 var/max_save_slots = MAX_SAVE_SLOTS //non-preference stuff var/warns = 0 var/muted = 0 var/last_ip var/last_id //game-preferences var/lastchangelog = "" //Saved changlog filesize to detect if there was a change var/ooccolor = "#b82e00" var/be_special = list() //Special role selection var/UI_style = "Midnight" var/nanoui_fancy = TRUE var/toggles = TOGGLES_DEFAULT var/sound = SOUND_DEFAULT var/show_ghostitem_attack = TRUE var/UI_style_color = "#ffffff" var/UI_style_alpha = 255 //character preferences var/real_name //our character's name var/be_random_name = 0 //whether we are a random name every round var/gender = MALE //gender of character (well duh) var/age = 30 //age of character var/spawnpoint = "Arrivals Shuttle" //where this character will spawn (0-2). var/b_type = "A+" //blood type (not-chooseable) var/underwear = "Nude" //underwear type var/undershirt = "Nude" //undershirt type var/socks = "Nude" //socks type var/backbag = 2 //backpack type var/ha_style = "None" //Head accessory style var/r_headacc = 0 //Head accessory colour var/g_headacc = 0 //Head accessory colour var/b_headacc = 0 //Head accessory colour var/m_styles = "head=None;\ body=None;\ tail=None" //Marking styles. var/m_colours = "head=#000000;\ body=#000000;\ tail=#000000" //Marking colours. var/h_style = "Bald" //Hair type var/r_hair = 0 //Hair color var/g_hair = 0 //Hair color var/b_hair = 0 //Hair color var/f_style = "Shaved" //Facial hair type var/r_facial = 0 //Facial hair color var/g_facial = 0 //Facial hair color var/b_facial = 0 //Facial hair color var/r_facial_sec = 0 //Secondary facial hair color var/g_facial_sec = 0 //Secondary facial hair color var/b_facial_sec = 0 //Secondary facial hair color var/s_tone = 0 //Skin tone var/r_skin = 0 //Skin color var/g_skin = 0 //Skin color var/b_skin = 0 //Skin color var/r_eyes = 0 //Eye color var/g_eyes = 0 //Eye color var/b_eyes = 0 //Eye color var/alt_head = "None" //Alt head style. var/species = "Human" var/language = "None" //Secondary language var/body_accessory = null var/speciesprefs = 0//I hate having to do this, I really do (Using this for oldvox code, making names universal I guess //Mob preview var/icon/preview_icon = null var/icon/preview_icon_front = null var/icon/preview_icon_side = null //Jobs, uses bitflags var/job_support_high = 0 var/job_support_med = 0 var/job_support_low = 0 var/job_medsci_high = 0 var/job_medsci_med = 0 var/job_medsci_low = 0 var/job_engsec_high = 0 var/job_engsec_med = 0 var/job_engsec_low = 0 var/job_karma_high = 0 var/job_karma_med = 0 var/job_karma_low = 0 //Keeps track of preferrence for not getting any wanted jobs var/alternate_option = 0 // maps each organ to either null(intact), "cyborg" or "amputated" // will probably not be able to do this for head and torso ;) var/list/organ_data = list() var/list/rlimb_data = list() var/list/player_alt_titles = new() // the default name of a job like "Medical Doctor" // var/accent = "en-us" // var/voice = "m1" // var/pitch = 50 // var/talkspeed = 175 var/flavor_text = "" var/med_record = "" var/sec_record = "" var/gen_record = "" var/disabilities = 0 var/nanotrasen_relation = "Neutral" // 0 = character settings, 1 = game preferences var/current_tab = TAB_CHAR // OOC Metadata: var/metadata = "" var/slot_name = "" // Whether or not to use randomized character slots var/randomslot = 0 // jukebox volume var/volume = 100 // BYOND membership var/unlock_content = 0 //Gear stuff var/list/gear = list() var/gear_tab = "General" /datum/preferences/New(client/C) b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+") if(istype(C)) if(!IsGuestKey(C.key)) unlock_content = C.IsByondMember() if(unlock_content) max_save_slots = MAX_SAVE_SLOTS_MEMBER var/loaded_preferences_successfully = load_preferences(C) if(loaded_preferences_successfully) if(load_character(C)) return //we couldn't load character data so just randomize the character appearance + name random_character() //let's create a random character then - rather than a fat, bald and naked man. real_name = random_name(gender) if(!loaded_preferences_successfully) save_preferences(C) save_character(C) //let's save this new random character so it doesn't keep generating new ones. /datum/preferences/proc/color_square(r, g, b) return "___" // Hello I am a proc full of snowflake species checks how are you /datum/preferences/proc/ShowChoices(mob/user) if(!user || !user.client) return update_preview_icon() user << browse_rsc(preview_icon_front, "previewicon.png") user << browse_rsc(preview_icon_side, "previewicon2.png") var/dat = "" dat += "
| "
dat += "Name: "
dat += "[real_name]"
dat += "(Randomize)"
dat += "(Always Randomize) " dat += " | "
dat += " |
"
dat += "Identity" if(appearance_isbanned(user)) dat += "You are banned from using custom names and appearances. \ You can continue to adjust your characters, but you will be randomised once you join the game.\" dat += "Gender: [gender == MALE ? "Male" : "Female"] " dat += "Age: [age] " dat += "Body: (®) " dat += "Species: [species] " if(species == "Vox") dat += "N2 Tank: [speciesprefs ? "Large N2 Tank" : "Specialized N2 Tank"] " dat += "Secondary Language: [language] " dat += "Blood Type: [b_type] " if(species in list("Human", "Drask", "Vox")) dat += "Skin Tone: [species == "Vox" ? "[s_tone]" : "[-s_tone + 35]/220"] " dat += "Disabilities: \[Set\] " dat += "Nanotrasen Relation: [nanotrasen_relation] " dat += "Set Flavor Text " if(lentext(flavor_text) <= 40) if(!lentext(flavor_text)) dat += "\[...\] " else dat += "[flavor_text] " else dat += "[TextPreview(flavor_text)]... " dat += " Hair & Accessories" if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species that have head accessories. var/headaccessoryname = "Head Accessory: " if(species == "Unathi") headaccessoryname = "Horns: " dat += "[headaccessoryname]" dat += "[ha_style] " dat += "Color [color_square(r_headacc, g_headacc, b_headacc)]" if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. var/list/marking_styles = params2list(m_styles) var/list/marking_colours = params2list(m_colours) marking_colours["head"] = sanitize_hexcolor(marking_colours["head"]) dat += "Head Markings: " dat += "[marking_styles["head"]]" dat += "Color [color_square(hex2num(copytext(marking_colours["head"], 2, 4)), hex2num(copytext(marking_colours["head"], 4, 6)), hex2num(copytext(marking_colours["head"], 6, 8)))] " if(species in list("Unathi", "Vulpkanin", "Tajaran")) //Species with body markings. var/list/marking_styles = params2list(m_styles) var/list/marking_colours = params2list(m_colours) marking_colours["body"] = sanitize_hexcolor(marking_colours["body"]) dat += "Body Markings: " dat += "[marking_styles["body"]]" dat += "Color [color_square(hex2num(copytext(marking_colours["body"], 2, 4)), hex2num(copytext(marking_colours["body"], 4, 6)), hex2num(copytext(marking_colours["body"], 6, 8)))] " if(species in list("Vox", "Vulpkanin")) //Species with tail markings. var/list/marking_styles = params2list(m_styles) var/list/marking_colours = params2list(m_colours) marking_colours["tail"] = sanitize_hexcolor(marking_colours["tail"]) dat += "Tail Markings: " dat += "[marking_styles["tail"]]" dat += "Color [color_square(hex2num(copytext(marking_colours["tail"], 2, 4)), hex2num(copytext(marking_colours["tail"], 4, 6)), hex2num(copytext(marking_colours["tail"], 6, 8)))] " dat += "Hair: " dat += "[h_style]" dat += "Color [color_square(r_hair, g_hair, b_hair)] " dat += "Facial Hair: " dat += "[f_style ? "[f_style]" : "Shaved"]" dat += "Color [color_square(r_facial, g_facial, b_facial)] " var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style] if(facial_hair_style.secondary_colour) dat += "Secondary Color [color_square(r_facial_sec, g_facial_sec, b_facial_sec)] " if(species != "Machine") dat += "Eyes: " dat += "Color [color_square(r_eyes, g_eyes, b_eyes)] " if((species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine")) || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user)) //admins can always fuck with this, because they are admins dat += "Body Color: " dat += "Color [color_square(r_skin, g_skin, b_skin)] " if(body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user)) dat += "Body Accessory: " dat += "[body_accessory ? "[body_accessory]" : "None"] " dat += " | "
dat += "Occupation Choices" dat += "Set Occupation Preferences" if(jobban_isbanned(user, "Records")) dat += "You are banned from using character records. " else dat += "Character Records " dat += " Limbs" if(species in list("Unathi")) //Species with alt heads. dat += "Alternate Head: " dat += "[alt_head]" dat += "Limbs and Parts: Adjust " if(species != "Slime People" && species != "Machine") dat += "Internal Organs: Adjust " //display limbs below var/ind = 0 for(var/name in organ_data) var/status = organ_data[name] var/organ_name = null switch(name) if("chest") organ_name = "torso" if("groin") organ_name = "lower body" if("head") organ_name = "head" if("l_arm") organ_name = "left arm" if("r_arm") organ_name = "right arm" if("l_leg") organ_name = "left leg" if("r_leg") organ_name = "right leg" if("l_foot") organ_name = "left foot" if("r_foot") organ_name = "right foot" if("l_hand") organ_name = "left hand" if("r_hand") organ_name = "right hand" if("heart") organ_name = "heart" if("eyes") organ_name = "eyes" if(status in list("cyborg", "amputated", "mechanical", "assisted")) ++ind if(ind > 1) dat += ", " switch(status) if("cyborg") var/datum/robolimb/R if(rlimb_data[name] && all_robolimbs[rlimb_data[name]]) R = all_robolimbs[rlimb_data[name]] else R = basic_robolimb dat += "\t[R.company] [organ_name] prosthesis" if("amputated") dat += "\tAmputated [organ_name]" if("mechanical") dat += "\tMechanical [organ_name]" if("assisted") switch(organ_name) if("heart") dat += "\tPacemaker-assisted [organ_name]" if("voicebox") dat += "\tSurgically altered [organ_name]" if("eyes") dat += "\tRetinal overlayed [organ_name]" else dat += "\tMechanically assisted [organ_name]" if(!ind) dat += "\[...\] " else dat += " " dat += " Clothing" dat += "Underwear: [underwear]" dat += "Undershirt: [undershirt] " dat += "Socks: [socks] " dat += "Backpack Type: [backbaglist[backbag]] " dat += " |
"
dat += "General Settings" dat += "Fancy NanoUI: [(nanoui_fancy) ? "Yes" : "No"]" dat += "Ghost-Item Attack Animation: [(show_ghostitem_attack) ? "Yes" : "No"] " dat += "Custom UI settings: " dat += " - UI Style: [UI_style] " dat += " - Color: [UI_style_color]
" dat += " - Alpha (transparency): [UI_style_alpha] " dat += " " dat += "Play admin midis: [(sound & SOUND_MIDI) ? "Yes" : "No"] " dat += "Play lobby music: [(sound & SOUND_LOBBY) ? "Yes" : "No"] " if(user.client.holder) dat += "Adminhelp sound: " dat += "[(sound & SOUND_ADMINHELP)?"On":"Off"] " if(check_rights(R_ADMIN,0)) dat += "OOC: Change " if(config.allow_Metadata) dat += "OOC notes: Edit " if(unlock_content) dat += "BYOND Membership Publicity: [(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"] " dat += "Randomized character slot: [randomslot ? "Yes" : "No"] " dat += "Ghost ears: [(toggles & CHAT_GHOSTEARS) ? "Nearest Creatures" : "All Speech"] " dat += "Ghost sight: [(toggles & CHAT_GHOSTSIGHT) ? "Nearest Creatures" : "All Emotes"] " dat += "Ghost radio: [(toggles & CHAT_GHOSTRADIO) ? "Nearest Speakers" : "All Chatter"] " dat += " | "
dat += "Special Role Settings" if(jobban_isbanned(user, "Syndicate")) dat += "You are banned from special roles." be_special = list() else for(var/i in special_roles) if(jobban_isbanned(user, i)) dat += "Be [capitalize(i)]: \[BANNED]" else if(!player_old_enough_antag(user.client,i)) var/available_in_days_antag = available_in_days_antag(user.client,i) dat += "Be [capitalize(i)]: \[IN [(available_in_days_antag)] DAYS] " else dat += "Be [capitalize(i)]: [(i in src.be_special) ? "Yes" : "No"] " dat += " |
| [G.display_name] | " dat += "[G.cost] | " if(G.allowed_roles) dat += "Restrictions: " for(var/role in G.allowed_roles) dat += role + " " dat += "" dat += " | [G.description] |
| " for(var/datum/gear_tweak/tweak in G.gear_tweaks) . += " [tweak.get_contents(get_tweak_metadata(G, tweak))]" . += " | |||
" // Table within a table for alignment, also allows you to easily add more colomns.
HTML += "
|
|