Skrell Updates, adds the Skrell race (as per @Searif's idea), also fixes and features for alien species...

* Adds Skrell, they have their own language which is used by typing :k
* Adds soghun language that can be used by typing :o
* Skintone of all species can now be changed.
* Eye colour of all species, except Skrell, can now be changed.
* The preview picture in setup should now be fully accurate for non-human species (excluding Tajaran ears)
* Various fixes for talking, such as talking as your real name while unknown.
* Fixes pAI's universal translator not being universal.
* Added admin update mob sprite command, which should solve any buggy transformations.
* Fixes and slightly nerfs claw attacks.
* Cosmetic fixes for alien species
This commit is contained in:
Erthilo
2012-06-06 06:06:22 +01:00
parent 8abdf8e74e
commit 0808c2726b
16 changed files with 183 additions and 84 deletions
+33 -51
View File
@@ -888,51 +888,6 @@
body_overlays_standing += image("icon" = 'genetics.dmi', "icon_state" = "lasereyes_s")
body_overlays_lying += image("icon" = 'genetics.dmi', "icon_state" = "lasereyes_l")
if (mutantrace)
switch(mutantrace)
if("golem","metroid")
body_overlays_standing += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_s")
body_overlays_lying += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_l")
if(face_standing)
del(face_standing)
if(face_lying)
del(face_lying)
if(stand_icon)
del(stand_icon)
if(lying_icon)
del(lying_icon)
if("lizard")
body_overlays_standing += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_[gender]_s")
body_overlays_lying += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_[gender]_l")
if(face_standing)
del(face_standing)
if(face_lying)
del(face_lying)
if(stand_icon)
del(stand_icon)
if(lying_icon)
del(lying_icon)
if("plant")
if(stat != 2) //if not dead, that is
body_overlays_standing += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_[gender]_s")
body_overlays_lying += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_[gender]_l")
else
// not sure why this doesn't need separate lying/standing states
body_overlays_lying += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_d")
if(face_standing)
del(face_standing)
if(face_lying)
del(face_lying)
if(stand_icon)
del(stand_icon)
if(lying_icon)
del(lying_icon)
else
// TODO: rewrite update_face() and update_body() if necessary
if(!face_standing || !face_lying)
update_face()
if(!stand_icon || !lying_icon)
update_body()
// Other procs(probably update_face() and update_body() ) also rebuild their own
// kinds of overlay lists. Think about merging those procs into this proc.
@@ -1406,7 +1361,7 @@
/mob/living/carbon/human/proc/update_body()
if(stand_icon) del(stand_icon)
if(lying_icon) del(lying_icon)
if(mutantrace) return
// if(mutantrace) return
var/g = "m"
if(gender == FEMALE) g = "f"
@@ -1441,6 +1396,31 @@
stand_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('human.dmi', "groin_[g]_l"), ICON_OVERLAY)
if (mutantrace)
switch(mutantrace)
if("golem","metroid")
stand_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_l"), ICON_OVERLAY)
if("lizard")
stand_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_[gender]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_[gender]_l"), ICON_OVERLAY)
if("skrell")
stand_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_[gender]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_[gender]_l"), ICON_OVERLAY)
if("plant")
if(stat != 2) //if not dead, that is
stand_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_[gender]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_[gender]_l"), ICON_OVERLAY)
else
// not sure why this doesn't need separate lying/standing states
lying_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_d"), ICON_OVERLAY)
else
// TODO: rewrite update_face() and update_body() if necessary
if(!face_standing || !face_lying)
update_face()
if(!stand_icon || !lying_icon)
update_body()
if (husk)
var/icon/husk_s = new /icon('human.dmi', "husk_s")
var/icon/husk_l = new /icon('human.dmi', "husk_l")
@@ -1487,15 +1467,16 @@
if(!facial_hair_style || !hair_style) return//Seems people like to lose their icons, this should stop the runtimes for now
if(face_standing) del(face_standing)
if(face_lying) del(face_lying)
if(mutantrace) return
// if(mutantrace) return
var/g = "m"
if (gender == FEMALE) g = "f"
var/icon/eyes_s = new/icon("icon" = 'human_face.dmi', "icon_state" = "eyes_s")
var/icon/eyes_l = new/icon("icon" = 'human_face.dmi', "icon_state" = "eyes_l")
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
eyes_l.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
if(species != "Skrell")
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
eyes_l.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
var/icon/hair_l = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l")
@@ -1515,8 +1496,9 @@
eyes_s.Blend(hair_s, ICON_OVERLAY)
eyes_l.Blend(hair_l, ICON_OVERLAY)
eyes_s.Blend(mouth_s, ICON_OVERLAY)
eyes_l.Blend(mouth_l, ICON_OVERLAY)
if(species == "Human")
eyes_s.Blend(mouth_s, ICON_OVERLAY)
eyes_l.Blend(mouth_l, ICON_OVERLAY)
// if BLOCKHAIR, do not apply facial hair
if((!(head && (head.flags & BLOCKHAIR))) && !(wear_mask && (wear_mask.flags & BLOCKHAIR)))
@@ -154,11 +154,10 @@
var/damage = rand(0, 5)
if(!damage)
switch(attack_verb)
if(("slash") || ("scratch"))
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
else
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
if(attack_verb == "scratch" || attack_verb == "slash")
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
else
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
visible_message("\red <B>[M] has attempted to [attack_verb] [src]!</B>")
return 0
@@ -169,13 +168,11 @@
if(HULK in M.mutations) damage += 5
if(SUPRSTR in M.augmentations) damage += 5
switch(attack_verb)
if(("slash") || ("scratch"))
damage += 10
playsound(loc, 'slice.ogg', 25, 1, -1)
else
playsound(loc, "punch", 25, 1, -1)
if(attack_verb == "scratch" || attack_verb == "slash")
damage += 7
playsound(loc, 'slice.ogg', 25, 1, -1)
else
playsound(loc, "punch", 25, 1, -1)
visible_message("\red <B>[M] has [attack_verb]ed [src]!</B>")
+30 -7
View File
@@ -69,9 +69,10 @@
return emote(copytext(message, 2))
var/alt_name = ""
if (istype(src, /mob/living/carbon/human) && name != real_name)
if (istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
alt_name = " (as [H.get_id_name("Unknown")])"
if(H.get_face_name() != real_name)
alt_name = " (as [H.get_id_name("Unknown")])"
var/italics = 0
var/message_range = null
var/message_mode = null
@@ -156,6 +157,21 @@
if (!message)
return
//work out if we're speaking skrell or not
var/is_speaking_skrell = 0
if(copytext(message, 1, 3) == ":k" || copytext(message, 1, 3) == ":K")
message = copytext(message, 3)
if(skrell_talk_understand || universal_speak)
is_speaking_skrell = 1
//work out if we're speaking soghun or not
var/is_speaking_soghun = 0
if(copytext(message, 1, 3) == ":o" || copytext(message, 1, 3) == ":O")
message = copytext(message, 3)
if(soghun_talk_understand || universal_speak)
is_speaking_soghun = 1
if( !message_mode && (disease_symptoms & DISEASE_WHISPER))
message_mode = "whisper"
@@ -403,7 +419,12 @@
var/list/heard_b = list() // didn't understand us
for (var/mob/M in listening)
if (M.say_understands(src))
//if speaking in skrell, only let other skrell understand
if (M.say_understands(src) && !is_speaking_skrell && !is_speaking_soghun) //This could probably be merged into say_understands(), but I'm too lazy
heard_a += M
else if(is_speaking_skrell && (M.skrell_talk_understand || M.universal_speak))
heard_a += M
else if(is_speaking_soghun && (M.soghun_talk_understand || M.universal_speak))
heard_a += M
else
heard_b += M
@@ -413,18 +434,20 @@
var/rendered = null
if (length(heard_a))
var/message_a = say_quote(message)
var/message_a = say_quote(message,is_speaking_soghun,is_speaking_skrell)
if (italics)
message_a = "<i>[message_a]</i>"
if (!istype(src, /mob/living/carbon/human))
rendered = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
else if(istype(wear_mask, /obj/item/clothing/mask/gas/voice))
var/mob/living/carbon/human/H = src
if(wear_mask:vchange)
rendered = "<span class='game say'><span class='name'>[wear_mask:voice]</span> <span class='message'>[message_a]</span></span>"
else
rendered = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
rendered = "<span class='game say'><span class='name'>[H.get_visible_name()]</span> <span class='message'>[message_a]</span></span>"
else
rendered = "<span class='game say'><span class='name'>[real_name]</span>[alt_name] <span class='message'>[message_a]</span></span>"
var/mob/living/carbon/human/H = src
rendered = "<span class='game say'><span class='name'>[H.get_face_name()]</span>[alt_name] <span class='message'>[message_a]</span></span>"
/*
// Create speech bubble
@@ -491,7 +514,7 @@
message_b = voice_message
else
message_b = stars(message)
message_b = say_quote(message_b)
message_b = say_quote(message_b,is_speaking_soghun,is_speaking_skrell)
if (italics)
message_b = "<i>[message_b]</i>"
+2
View File
@@ -255,6 +255,8 @@
var/robot_talk_understand = 0
var/alien_talk_understand = 0
var/taj_talk_understand = 0
var/soghun_talk_understand = 0
var/skrell_talk_understand = 0
//You can guess what these are for. --SkyMarshal
var/list/atom/hallucinations = list()
@@ -358,6 +358,12 @@
preferences.copy_to(new_character)
if((preferences.species == "Soghun") && (is_alien_whitelisted(src, "Soghun"))) //This probably shouldn't be here, but I can't think of any other way
new_character.mutantrace = "lizard"
new_character.soghun_talk_understand = 1
new_character.voice_name = "Soghun"
if((preferences.species == "Skrell") && (is_alien_whitelisted(src, "Skrell")))
new_character.mutantrace = "skrell"
new_character.skrell_talk_understand = 1
new_character.voice_name = "Skrell"
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1)
new_character.dna.ready_dna(new_character)
+26 -6
View File
@@ -731,17 +731,25 @@ datum/preferences
if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it!
if(is_alien_whitelisted(user, "Soghun")) //Check for Soghun and admins
new_species += "Soghun"
if(is_alien_whitelisted(user, "Tajaran")) //Check for Tajaran
if(is_alien_whitelisted(user, "Tajaran")) //Check for Tajaran and admins
new_species += "Tajaran"
if(is_alien_whitelisted(user, "Skrell")) //Check for Skrell and admins
new_species += "Skrell"
else //Not using the whitelist? Aliens for everyone!
new_species += "Tajaran"
new_species += "Soghun"
new_species += "Skrell"
species = input("Please select a species", "Character Generation", null) in new_species
h_style = "Bald" //Try not to carry face/head hair over.
f_style = "Shaved"
s_tone = 0 //Don't carry over skintone either.
hair_style = new/datum/sprite_accessory/hair/bald
facial_hair_style = new/datum/sprite_accessory/facial_hair/shaved
if(species == "Skrell")
if(gender == FEMALE)
hair_style = new/datum/sprite_accessory/hair/alien/skrell/female/tentacle
else
hair_style = new/datum/sprite_accessory/hair/alien/skrell/male/tentacle
if(link_tags["hair"])
switch(link_tags["hair"])
@@ -781,16 +789,16 @@ datum/preferences
if("random")
randomize_skin_tone()
if("input")
var/new_tone = input(user, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black) or 20-70 for Tajarans", "Character Generation") as num
var/new_tone = input(user, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black) or 20-70 for other species.", "Character Generation") as num
if(new_tone)
if(species == "Tajaran")
if(species != "Human")
s_tone = max(min(round(text2num(new_tone)), 70), 20)
else
s_tone = max(min(round(text2num(new_tone)), 220), 1)
s_tone = -s_tone + 35
if(link_tags["h_style"])
if(species != "Human")
if(species == "Tajaran" || species == "Soghun")
return
switch(link_tags["h_style"])
@@ -803,7 +811,13 @@ datum/preferences
if("input") // input hair selection
// Generate list of hairs via typesof()
var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair
var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair - typesof(/datum/sprite_accessory/hair/alien)
if(species == "Skrell")
if(gender == FEMALE)
all_hairs = typesof(/datum/sprite_accessory/hair/alien/skrell/female) - /datum/sprite_accessory/hair/alien/skrell/female
else
all_hairs = typesof(/datum/sprite_accessory/hair/alien/skrell/male) - /datum/sprite_accessory/hair/alien/skrell/male
// List of hair names
var/list/hairs = list()
@@ -836,7 +850,7 @@ datum/preferences
src.ooccolor = ooccolor
if(link_tags["f_style"])
if(species != "Human") //Tajarans and Soghuns don't have hair stuff yet.
if(species != "Human") //Non-humans don't have hair stuff yet.
return
switch(link_tags["f_style"])
@@ -868,8 +882,12 @@ datum/preferences
if(link_tags["gender"])
if(gender == MALE)
gender = FEMALE
if(species == "Skrell")
hair_style = new/datum/sprite_accessory/hair/alien/skrell/female/tentacle
else
gender = MALE
if(species == "Skrell")
hair_style = new/datum/sprite_accessory/hair/alien/skrell/male/tentacle
if(link_tags["UI"])
switch(UI_style)
@@ -1063,6 +1081,8 @@ datum/preferences
character.real_name = real_name
character.original_name = real_name //Original name is only used in ghost chat! It is not to be edited by anything!
character.species = species
character.flavor_text = flavor_text
character.med_record = med_record
character.sec_record = sec_record
@@ -27,7 +27,7 @@ datum/preferences
proc/randomize_hair(var/gender)
// Generate list of all possible hairs via typesof(), subtract the parent type however
var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair
var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair - typesof(/datum/sprite_accessory/hair/alien)
// List of hair datums. Used in pick() to select random hair
var/list/hairs = list()
@@ -213,6 +213,11 @@ datum/preferences
preview_icon = new /icon('genetics.dmi', "lizard_male_s", "dir" = preview_dir)
else if(g == "f")
preview_icon = new /icon('genetics.dmi', "lizard_female_s", "dir" = preview_dir)
else if(species == "Skrell")
if(g == "m")
preview_icon = new /icon('genetics.dmi', "skrell_male_s", "dir" = preview_dir)
else if(g == "f")
preview_icon = new /icon('genetics.dmi', "skrell_female_s", "dir" = preview_dir)
else
preview_icon = new /icon('human.dmi', "body_[g]_s", "dir" = preview_dir)
@@ -226,7 +231,8 @@ datum/preferences
preview_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_s", "dir" = preview_dir), ICON_OVERLAY)
var/icon/eyes_s = new/icon("icon" = 'human_face.dmi', "icon_state" = "eyes_s", "dir" = preview_dir)
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
if(species != "Skrell")
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
// Hair and facial hair, improved by Doohl
@@ -240,7 +246,8 @@ datum/preferences
var/icon/mouth_s = new/icon("icon" = 'human_face.dmi', "icon_state" = "mouth_[g]_s", "dir" = preview_dir)
eyes_s.Blend(hair_s, ICON_OVERLAY)
eyes_s.Blend(mouth_s, ICON_OVERLAY)
if(species == "Human")
eyes_s.Blend(mouth_s, ICON_OVERLAY)
eyes_s.Blend(facial_s, ICON_OVERLAY)
preview_icon.Blend(eyes_s, ICON_OVERLAY)
@@ -153,6 +153,22 @@
spikey
name = "Spikey"
icon_state = "hair_spikey"
//////
//Begin Alien Hairstyle
//////
alien
//Skrell
skrell
male
tentacle
name = "Skrell Male Tentacles"
icon_state = "skrell_hair_m"
female
tentacle
name = "Skrell Female Tentacles"
icon_state = "skrell_hair_f"
/*
///////////////////////////////////
+5 -1
View File
@@ -51,7 +51,7 @@
return 1
return 0
/mob/proc/say_quote(var/text)
/mob/proc/say_quote(var/text,var/is_speaking_soghun,var/is_speaking_skrell)
if(!text)
return "says, \"...\""; //not the best solution, but it will stop a large number of runtimes. The cause is somewhere in the Tcomms code
var/ending = copytext(text, length(text))
@@ -67,6 +67,10 @@
return "asks, \"[text]\"";
if (ending == "!")
return "exclaims, \"[text]\"";
if (is_speaking_soghun)
return "hisses, \"[text]\"";
if (is_speaking_skrell)
return "warbles, \"[text]\"";
return "says, \"[text]\"";