diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index feae925a86..14c134dc08 100755 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -73,6 +73,13 @@ key = "q" flags = RESTRICTED +/datum/language/common + name = "Galactic Common" + desc = "The common galactic tongue." + speech_verb = "says" + key = "0" + flags = RESTRICTED + /datum/language/human name = "Sol Common" desc = "A bastardized hybrid of informal English and elements of Mandarin Chinese; the common language of the Sol system." @@ -95,6 +102,14 @@ colour = "rough" key = "3" +/datum/language/xenocommon + name = "Xenomorph" + colour = "alien" + desc = "The common tongue of the xenomorphs." + speech_verb = "hisses" + key = "4" + flags = RESTRICTED + /datum/language/xenos name = "Hivemind" desc = "Xenomorphs have the strange ability to commune over a psychic hivemind." diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index c811fd2b09..7f77e33631 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -16,4 +16,4 @@ /mob/living/carbon/alien/larva/New() ..() - add_language("Rootspeak") \ No newline at end of file + add_language("Xenomorph") //Bonus language. \ No newline at end of file diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 5daa904bf6..f7c85f0b71 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -28,7 +28,7 @@ if(B.health <= 0) user << "\red That brain is well and truly dead." return - else if(!B:brainmob) + else if(!B.brainmob) user << "\red You aren't sure where this brain came from, but you're pretty sure it's a useless brain." return diff --git a/code/modules/mob/living/carbon/human/alien/alien_species.dm b/code/modules/mob/living/carbon/human/alien/alien_species.dm index 09c8a19b13..fc7d589cd9 100644 --- a/code/modules/mob/living/carbon/human/alien/alien_species.dm +++ b/code/modules/mob/living/carbon/human/alien/alien_species.dm @@ -1,12 +1,12 @@ //Stand-in until this is made more lore-friendly. /datum/species/xenos name = "Xenomorph" + default_language = "Xenomorph" language = "Hivemind" unarmed_type = /datum/unarmed_attack/claws/strong secondary_unarmed_type = /datum/unarmed_attack/bite/strong hud_type = /datum/hud_data/alien rarity_value = 3 - speaks_common = 0 has_fine_manipulation = 0 insulated = 1 @@ -57,11 +57,6 @@ if(istype(other,/mob/living/carbon/alien/larva)) return 1 - if(istype(other,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = other - if(istype(H.species,/datum/species/xenos)) - return 1 - return 0 /datum/species/xenos/hug(var/mob/living/carbon/human/H,var/mob/living/target) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 69653cd5a8..c8294d7358 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1263,6 +1263,9 @@ if(species.language) remove_language(species.language) + if(species.default_language) + remove_language(species.default_language) + species = all_species[new_species] species.create_organs(src) @@ -1270,6 +1273,9 @@ if(species.language) add_language(species.language) + if(species.default_language) + add_language(species.default_language) + if(species.base_color && default_colour) //Apply colour. r_skin = hex2num(copytext(species.base_color,2,4)) @@ -1426,4 +1432,4 @@ var/datum/organ/internal/eyes = internal_organs_by_name["eyes"] if(eyes && istype(eyes) && !eyes.status & ORGAN_CUT_AWAY) return 1 - return 0 + return 0 diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 35c310c5de..0b7d601ca9 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -1,7 +1,5 @@ /mob/living/carbon/human/say(var/message) - //TODO: Add checks for species who do not speak common. - var/verb = "says" var/alt_name = "" var/message_range = world.view @@ -34,9 +32,13 @@ //parse the language code and consume it var/datum/language/speaking = parse_language(message) + if(speaking) + message = copytext(message,3) + else if(species.default_language) + speaking = all_languages[species.default_language] + if (speaking) verb = speaking.speech_verb - message = copytext(message,3) // This is broadcast to all mobs with the language, // irrespective of distance or anything else. @@ -183,10 +185,6 @@ return 1 if (istype(other, /mob/living/carbon/slime)) return 1 - if(istype(other,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = other - if(!species.speaks_common || !H.species.speaks_common) - return 0 //This is already covered by mob/say_understands() //if (istype(other, /mob/living/simple_animal)) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 895e0234d3..917251731d 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -13,7 +13,6 @@ var/primitive // Lesser form, if any (ie. monkey for humans) var/tail // Name of tail image in species effects icon file. - var/language // Default racial language, if any. var/datum/unarmed_attack/unarmed // For empty hand harm-intent attack var/datum/unarmed_attack/secondary_unarmed // For empty hand harm-intent attack if the first fails. var/datum/hud_data/hud @@ -24,7 +23,9 @@ var/unarmed_type = /datum/unarmed_attack var/secondary_unarmed_type = /datum/unarmed_attack/bite - var/speaks_common = 1 // Speaks the common galactic tongue. + var/language // Default racial language, if any. + // Default language is used when 'say' is used without modifiers. + var/default_language = "Galactic Common" var/secondary_langs = list() // The names of secondary languages that are available to this species. var/mutantrace // Safeguard due to old code. var/list/speech_sounds // A list of sounds to potentially play when speaking. @@ -279,7 +280,8 @@ name = "Vox" icobase = 'icons/mob/human_races/r_vox.dmi' deform = 'icons/mob/human_races/r_def_vox.dmi' - language = "Vox-pidgin" + default_language = "Vox-pidgin" + language = "Galactic Common" unarmed_type = /datum/unarmed_attack/claws/strong secondary_unarmed_type = /datum/unarmed_attack/bite/strong rarity_value = 2 @@ -324,7 +326,6 @@ name = "Vox Armalis" icobase = 'icons/mob/human_races/r_armalis.dmi' deform = 'icons/mob/human_races/r_armalis.dmi' - language = "Vox-pidgin" rarity_value = 10 warning_low_pressure = 50 diff --git a/code/modules/organs/organ_alien.dm b/code/modules/organs/organ_alien.dm index 8ca87ef3ba..8ecb8bb658 100644 --- a/code/modules/organs/organ_alien.dm +++ b/code/modules/organs/organ_alien.dm @@ -92,8 +92,12 @@ // They're also super gross and ooze ichor. if(prob(5)) - var/datum/reagent/blood = owner.reagents.reagent_list["blood"] - blood_splatter(owner,blood,1) + var/mob/living/carbon/human/H = owner + if(!istype(H)) + return + + var/datum/reagent/blood = H.vessel.reagent_list["blood"] + blood_splatter(H,blood,1) var/obj/effect/decal/cleanable/blood/splatter/goo = locate() in get_turf(owner) if(goo) goo.name = "husk ichor"