Added a more interesting/informative species selection window to chargen.

This commit is contained in:
Zuhayr
2014-12-10 21:08:31 +10:30
parent a3dc661c62
commit ed29f5ca2b
2 changed files with 97 additions and 20 deletions

View File

@@ -73,6 +73,7 @@ datum/preferences
var/g_eyes = 0 //Eye color
var/b_eyes = 0 //Eye color
var/species = "Human" //Species datum to use.
var/species_preview //Used for the species selection window.
var/language = "None" //Secondary language
var/list/gear //Custom/fluff item loadout.
@@ -302,7 +303,7 @@ datum/preferences
dat += "<br><table><tr><td><b>Body</b> "
dat += "(<a href='?_src_=prefs;preference=all;task=random'>&reg;</A>)"
dat += "<br>"
dat += "Species: <a href='byond://?src=\ref[user];preference=species;task=input'>[species]</a><br>"
dat += "Species: <a href='?src=\ref[user];preference=species;task=change'>[species]</a><br>"
dat += "Secondary Language:<br><a href='byond://?src=\ref[user];preference=language;task=input'>[language]</a><br>"
dat += "Blood Type: <a href='byond://?src=\ref[user];preference=b_type;task=input'>[b_type]</a><br>"
dat += "Skin Tone: <a href='?_src_=prefs;preference=s_tone;task=input'>[-s_tone + 35]/220<br></a>"
@@ -588,6 +589,60 @@ datum/preferences
user << browse(HTML, "window=records;size=350x300")
return
/datum/preferences/proc/SetSpecies(mob/user)
if(!species_preview || !(species_preview in all_species))
species_preview = "Human"
var/datum/species/current_species = all_species[species_preview]
var/dat = "<body>"
dat += "<center><h2>[current_species.name] \[<a href='?src=\ref[user];preference=species;task=change'>change</a>\]</h2></center><hr/>"
dat += "<table padding='8px'>"
dat += "<tr>"
dat += "<td width = 400>[current_species.blurb]</td>"
dat += "<td width = 200 align='center'>"
dat += "<center>\[icon goes here\]<br/><br/>"
dat += "<b>Language:</b> [current_species.language]<br/>"
dat += "<small>"
if(current_species.flags & IS_WHITELISTED)
dat += "</br><b>Whitelist restricted.</b>"
if(current_species.flags & NO_BLOOD)
dat += "</br><b>Does not have blood.</b>"
if(current_species.flags & NO_BREATHE)
dat += "</br><b>Does not breathe.</b>"
if(current_species.flags & NO_SCAN)
dat += "</br><b>Does not have DNA.</b>"
if(current_species.flags & NO_PAIN)
dat += "</br><b>Does not feel pain.</b>"
if(current_species.flags & NO_SLIP)
dat += "</br><b>Has excellent traction.</b>"
if(current_species.flags & NO_POISON)
dat += "</br><b>Immune to most poisons.</b>"
if(current_species.flags & HAS_SKIN_TONE)
dat += "</br><b>Has a variety of skin tones.</b>"
if(current_species.flags & HAS_SKIN_COLOR)
dat += "</br><b>Has a variety of skin colours.</b>"
if(current_species.flags & HAS_EYE_COLOR)
dat += "</br><b>Has a variety of eye colours.</b>"
if(current_species.flags & IS_PLANT)
dat += "</br><b>Has a plantlike physiology.</b>"
if(current_species.flags & IS_SYNTHETIC)
dat += "</br><b>Is machine-based.</b>"
dat += "</small></center></td>"
dat += "</tr>"
dat += "</table><center><hr/>"
var/restricted
if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it!
if((current_species.flags & IS_WHITELISTED) && !is_alien_whitelisted(user,current_species))
restricted = 1
if(restricted)
dat += "<font color='red'><b>You cannot play as this species.</br><small>If you wish to be whitelisted, you can make an application post on the forums.</small></b></font>"
else
dat += "\[<a href='?src=\ref[user];preference=species;task=input;newspecies=[species_preview]'>select</a>\]"
dat += "</center></body>"
user << browse(null, "window=preferences")
user << browse(dat, "window=species;size=700x400")
/datum/preferences/proc/SetAntagoptions(mob/user)
if(uplinklocation == "" || !uplinklocation)
uplinklocation = "PDA"
@@ -1078,6 +1133,14 @@ datum/preferences
break
switch(href_list["task"])
if("change")
if(href_list["preference"] == "species")
// Actual whitelist checks are handled elsewhere, this is just for accessing the preview window.
var/choice = input("Which species would you like to look at?") as null|anything in whitelisted_species
if(!choice) return
species_preview = choice
SetSpecies(user)
if("random")
switch(href_list["preference"])
if("name")
@@ -1133,24 +1196,11 @@ datum/preferences
var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null
if(new_age)
age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN)
if("species")
var/list/new_species = list("Human")
user << browse(null, "window=species")
var/prev_species = species
var/whitelisted = 0
if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it!
for(var/S in whitelisted_species)
if(is_alien_whitelisted(user,S))
new_species += S
whitelisted = 1
if(!whitelisted)
alert(user, "You cannot change your species as you need to be whitelisted. If you wish to be whitelisted contact an admin in-game, on the forums, or on IRC.")
else //Not using the whitelist? Aliens for everyone!
new_species = whitelisted_species
species = input("Please select a species", "Character Generation", null) in new_species
species = href_list["newspecies"]
if(prev_species != species)
//grab one of the valid hair styles for the newly chosen species
var/list/valid_hairstyles = list()

View File

@@ -11,6 +11,7 @@
var/deform = 'icons/mob/human_races/r_def_human.dmi' // Mutated icon set.
var/prone_icon // If set, draws this from icobase when mob is prone.
var/eyes = "eyes_s" // Icon for eyes.
var/blurb = "A completely nondescript species." // A brief lore summary for use in the chargen screen.
var/primitive // Lesser form, if any (ie. monkey for humans)
var/tail // Name of tail image in species effects icon file.
@@ -208,12 +209,14 @@
language = "Sol Common"
primitive = /mob/living/carbon/monkey
unarmed_type = /datum/unarmed_attack/punch
blurb = "Humanity originated in the Sol system, and over the last five centuries has spread \
colonies across a wide swathe of space. They hold a wide range of forms and creeds.<br/><br/> \
While the central Sol government maintains control of its far-flung people, powerful corporate \
interests, rampant cyber and bio-augmentation and secretive factions make life on most human \
worlds tumultous at best."
flags = HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR
//If you wanted to add a species-level ability:
/*abilities = list(/client/proc/test_ability)*/
/datum/species/unathi
name = "Unathi"
name_plural = "Unathi"
@@ -227,6 +230,12 @@
darksight = 3
gluttonous = 1
blurb = "A heavily reptillian species, Unathi (or 'Sinta as they call themselves) hail from the \
Uuosa-Eso system, which roughly translates to 'burning mother'.<br/><br/>Coming from a harsh, radioactive \
desert planet, they mostly hold ideals of honesty, virtue, martial combat and bravery above all \
else, frequently even their own lives. They prefer warmer temperatures than most species and \
their native tongue is a heavy hissing laungage called Sinta'Unathi."
cold_level_1 = 280 //Default 260 - Lower is better
cold_level_2 = 220 //Default 200
cold_level_3 = 130 //Default 120
@@ -252,6 +261,11 @@
unarmed_type = /datum/unarmed_attack/claws
secondary_unarmed_type = /datum/unarmed_attack/bite/sharp
darksight = 8
blurb = "The Tajaran race is a species of feline-like bipeds hailing from the planet of Ahdomai in the \
S'randarr system. They have been brought up into the space age by the Humans and Skrell, and have been \
influenced heavily by their long history of Slavemaster rule. They have a structured, clan-influenced way \
of family and politics. They prefer colder environments, and speak a variety of languages, mostly Siik'Maas, \
using unique inflections their mouths form."
cold_level_1 = 200 //Default 260
cold_level_2 = 140 //Default 200
@@ -295,6 +309,12 @@
unarmed_type = /datum/unarmed_attack/claws/strong
secondary_unarmed_type = /datum/unarmed_attack/bite/strong
rarity_value = 2
blurb = "The Vox are the broken remnants of a once-proud race, now reduced to little more than \
scavenging vermin who prey on isolated stations, ships or planets to keep their own ancient arkships \
alive. They are four to five feet tall, reptillian, beaked, tailed and quilled; human crews often \
refer to them as 'shitbirds' for their violent and offensive nature, as well as their horrible \
smell.<br/><br/>Most humans will never meet a Vox raider, instead learning of this insular species through \
dealing with their traders and merchants; those that do rarely enjoy the experience."
speech_sounds = list('sound/voice/shriek1.ogg')
speech_chance = 20
@@ -385,6 +405,13 @@
primitive = /mob/living/carbon/alien/diona
slowdown = 7
rarity_value = 3
blurb = "Commonly referred to (erroneously) as 'plant people', the Dionaea are a strange space-dwelling collective \
species hailing from Epsilon Ursae Minoris. Each 'diona' is a cluster of numerous cat-sized organisms called nymphs; \
there is no effective upper limit to the number that can fuse in gestalt, and reports exist of the Epsilon Ursae \
Minoris primary being ringed with a cloud of singing space-station-sized entities.<br/><br/>The Dionaea coexist peacefully with \
all known species, especially the Skrell. Their communal mind makes them slow to react, and they have difficulty understanding \
even the simplest concepts of other minds. Their alien physiology allows them survive happily off a diet of nothing but light, \
water and other radiation."
has_organ = list(
"nutrient channel" = /datum/organ/internal/diona/nutrients,