Merge branch 'pr/2'

Conflicts:
	baystation12.dme
	config/example/dbconfig.txt
This commit is contained in:
ZomgPonies
2013-08-17 15:22:49 -04:00
56 changed files with 255 additions and 64416 deletions
+13 -9
View File
@@ -807,7 +807,7 @@ datum/preferences
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) || (S == "Unathi" && is_alien_whitelisted(user,"Soghun")))
if(is_alien_whitelisted(user,S))
new_species += S
whitelisted = 1
if(!whitelisted)
@@ -863,19 +863,23 @@ datum/preferences
s_tone = 0
if("language")
var/languages_available
var/list/new_languages = list("None")
var/language_whitelisted = 0
if(config.usealienwhitelist)
for(var/L in all_languages)
if(is_alien_whitelisted(user, L))
new_languages += L
language_whitelisted = 1
var/datum/language/lang = all_languages[L]
if((!(lang.flags & RESTRICTED)) && (is_alien_whitelisted(user, L)||(!( lang.flags & WHITELISTED ))))
new_languages += lang
languages_available = 1
if(!(languages_available))
alert(user, "There are not currently any available secondary languages.")
else
for(var/L in all_languages)
new_languages += L
if(!language_whitelisted)
alert(user, "You cannot select a secondary language as you need to be whitelisted. If you wish to enable a language, post in the Alien Whitelist forums.")
var/datum/language/lang = all_languages[L]
if(!(lang.flags & RESTRICTED))
new_languages += lang
language = input("Please select a secondary language", "Character Generation", null) in new_languages
+36 -5
View File
@@ -3,35 +3,66 @@
*/
/datum/language
var/name = "name" // Fluff name of language if any.
var/speech_verb // 'says', 'hisses', 'farts'.
var/colour // CSS style to use for strings in this language.
var/key // Character used to speak in language eg. :o for Unathi.
var/name = "an unknown language" // Fluff name of language if any.
var/desc = "A language." // Short description for 'Check Languages'.
var/speech_verb = "says" // 'says', 'hisses', 'farts'.
var/colour = "say_quote" // CSS style to use for strings in this language.
var/key = "x" // Character used to speak in language eg. :o for Unathi.
var/flags = 0 // Various language flags.
var/native // If set, non-native speakers will have trouble speaking.
/datum/language/unathi
name = "Sinta'unathi"
desc = "The common language of Moghes, composed of sibilant hisses and rattles. Spoken natively by Unathi."
speech_verb = "hisses"
colour = "soghun"
key = "o"
flags = WHITELISTED
/datum/language/tajaran
name = "Siik'mas"
name = "Siik'tajr"
desc = "An expressive language that combines yowls and chirps with posture, tail and ears. Native to the Tajaran."
speech_verb = "mrowls"
colour = "tajaran"
key = "j"
flags = WHITELISTED
/datum/language/skrell
name = "Skrellian"
desc = "A melodic and complex language spoken by the Skrell of Qerrbalak. Some of the notes are inaudible to humans."
speech_verb = "warbles"
colour = "skrell"
key = "k"
flags = WHITELISTED
/datum/language/vox
name = "Vox-pidgin"
desc = "The common tongue of the various Vox ships making up the Shoal. It sounds like chaotic shrieking to everyone else."
speech_verb = "shrieks"
colour = "vox"
key = "v"
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."
key = "hum"
flags = RESTRICTED
// Galactic common languages (systemwide accepted standards).
/datum/language/trader
name = "Tradeband"
desc = "Maintained by the various trading cartels in major systems, this elegant, structured language is used for bartering and bargaining."
speech_verb = "enunciates"
key = "tra"
/datum/language/gutter
name = "Gutter"
desc = "Much like Standard, this crude pidgin tongue descended from numerous languages and serves as Tradeband for criminal elements."
speech_verb = "growls"
key = "gut"
*/
// Language handling.
/mob/proc/add_language(var/language)
@@ -376,7 +376,7 @@
message = "\red <B>[source] fails to take off \a [target.wear_mask] from [target]'s head!</B>"
return
else
message = "\red <B>[source] is trying to take off \a [source.wear_mask] from [target]'s head!</B>"
message = "\red <B>[source] is trying to take off \a [target.wear_mask] from [target]'s head!</B>"
if("l_hand")
message = "\red <B>[source] is trying to take off \a [target.l_hand] from [target]'s left hand!</B>"
if("r_hand")
+4 -1
View File
@@ -105,7 +105,10 @@
message = slur(message)
..(message)
/mob/living/carbon/human/say_understands(var/other)
/mob/living/carbon/human/say_understands(var/other,var/datum/language/speaking = null)
if(has_brain_worms()) //Brain worms translate everything. Even mice and alien speak.
return 1
if (istype(other, /mob/living/silicon/ai))
return 1
if (istype(other, /mob/living/silicon/decoy))
+1 -1
View File
@@ -58,7 +58,7 @@
name = "Tajaran"
icobase = 'icons/mob/human_races/r_tajaran.dmi'
deform = 'icons/mob/human_races/r_def_tajaran.dmi'
language = "Siik'mas"
language = "Siik'tajr"
tail = "tajtail"
attack_verb = "scratch"
darksight = 8
+5 -34
View File
@@ -86,7 +86,6 @@ var/list/department_radio_keys = list(
/mob/living/say(var/message)
//world << "[src] speaks! [message]"
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
message = capitalize(message)
@@ -125,7 +124,7 @@ var/list/department_radio_keys = list(
var/italics = 0
var/message_range = null
var/message_mode = null
var/datum/language/speaking //For use if a specific language is being spoken.
var/datum/language/speaking = null //For use if a specific language is being spoken.
// If brain damaged, talk on headset at random.
if (getBrainLoss() >= 60 && prob(50))
@@ -146,11 +145,9 @@ var/list/department_radio_keys = list(
//Check if the person is speaking a language that they know.
for(var/datum/language/L in languages)
if(lowertext(channel_prefix) == ":[L.key]")
//world << "Key [L.key] matches [lowertext(channel_prefix)] for [src]."
speaking = L
break
message_mode = department_radio_keys[channel_prefix]
//world << "channel_prefix=[channel_prefix]; message_mode=[message_mode]"
if (message_mode)
message = trim(copytext(message, 3))
if (!(ishuman(src) || istype(src, /mob/living/simple_animal/parrot) || isrobot(src) && (message_mode=="department" || (message_mode in radiochannels))))
@@ -367,38 +364,12 @@ var/list/department_radio_keys = list(
for (var/M in listening)
if(hascall(M,"say_understands"))
if ((M:say_understands(src) && !speaking))
//world << "[M] understood [src] (0)."
if (M:say_understands(src,speaking))
heard_a += M
else if(ismob(M))
// If speaking is set, it means that a language has been found that uses the given key.
// If it hasn't, then they are likely just speaking English.
var/understood
var/mob/P = M
if (speaking)
for(var/datum/language/L in P.languages)
if(speaking.name == L.name)
understood = 1
if(understood || P.universal_speak)
//world << "[M] understood [src] (1)."
heard_a += M
else if(istype(P,/mob/living/carbon/human))
var/mob/living/carbon/human/H = P
if(H.has_brain_worms()) // Brain worms act like Babelfish.
heard_a += M
else
heard_b += M
else
//world << "[M] didn't understand [src]."
heard_b += M
else
heard_a += M
else
//world << "[M] understood [src] (2)."
heard_a += M
heard_b += M
else
heard_a += M
var/speech_bubble_test = say_test(message)
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
+4 -8
View File
@@ -134,9 +134,7 @@
if(client.prefs.species != "Human")
var/S = client.prefs.species
if(S == "Unathi") S = "Soghun"
if(!is_alien_whitelisted(src, S) && config.usealienwhitelist)
if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist)
src << alert("You are currently not whitelisted to play [client.prefs.species].")
return 0
@@ -151,9 +149,7 @@
usr << "\blue There is an administrative lock on entering the game!"
return
var/S = client.prefs.species
if(S == "Unathi") S = "Soghun"
if(!is_alien_whitelisted(src, S) && config.usealienwhitelist)
if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist)
src << alert("You are currently not whitelisted to play [client.prefs.species].")
return 0
@@ -351,7 +347,7 @@
if(client.prefs.species)
chosen_species = all_species[client.prefs.species]
if(chosen_species)
if(is_alien_whitelisted(src, client.prefs.species) || (client.prefs.species == "Unathi" && is_alien_whitelisted(src, "Soghun")) || !config.usealienwhitelist || !(chosen_species.flags & WHITELISTED))
if(is_alien_whitelisted(src, client.prefs.species) || !config.usealienwhitelist || !(chosen_species.flags & WHITELISTED))
new_character.set_species(client.prefs.species)
if(chosen_species.language)
new_character.add_language(chosen_species.language)
@@ -360,7 +356,7 @@
if(client.prefs.language)
chosen_language = all_languages[client.prefs.language]
if(chosen_language)
if(is_alien_whitelisted(src, client.prefs.language) || !config.usealienwhitelist)
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)
+37 -22
View File
@@ -37,7 +37,7 @@
usr << "\red Speech is currently admin-disabled."
return
if(!(client.prefs.toggles & CHAT_DEAD))
if(client && !(client.prefs.toggles & CHAT_DEAD))
usr << "\red You have deadchat muted."
return
@@ -57,21 +57,34 @@
if(M.client && M.client.holder && (M.client.holder.rights & R_ADMIN|R_MOD) && (M.client.prefs.toggles & CHAT_DEAD)) // Show the message to admins/mods with deadchat toggled on
M << rendered //Admins can hear deadchat, if they choose to, no matter if they're blind/deaf or not.
else if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_DEAD)) // Show the message to regular ghosts with deadchat toggled on.
else if(M.client && M.stat == DEAD && (M.client.prefs.toggles & CHAT_DEAD)) // Show the message to regular ghosts with deadchat toggled on.
M.show_message(rendered, 2) //Takes into account blindness and such.
return
/mob/proc/say_understands(var/mob/other)
/mob/proc/say_understands(var/mob/other,var/datum/language/speaking = null)
if(!other)
return 1
if (src.stat == 2)
return 1
else if (istype(other, src.type))
else if (src.stat == 2)
return 1
else if (speaking) //Language check.
var/understood
for(var/datum/language/L in src.languages)
if(speaking.name == L.name)
understood = 1
break
if(understood || universal_speak)
return 1
else
return 0
else if(other.universal_speak || src.universal_speak)
return 1
else if(isAI(src) && ispAI(other))
return 1
else if (istype(other, src.type) || istype(src, other.type))
return 1
return 0
/mob/proc/say_quote(var/text,var/datum/language/speaking)
@@ -80,26 +93,28 @@
//tcomms code is still runtiming somewhere here
var/ending = copytext(text, length(text))
if (speaking)
return "<span class='say_quote'>[speaking.speech_verb]</span>, \"<span class='[speaking.colour]'>[text]</span>\"";
var/speechverb = "<span class='say_quote'>"
//Needs Virus2
// if (src.disease_symptoms & DISEASE_HOARSE)
// return "rasps, \"[text]\"";
if (src.stuttering)
return "<span class='say_quote'>stammers</span>, \"[text]\"";
if (src.slurring)
return "<span class='say_quote'>slurrs</span>, \"[text]\"";
if(isliving(src))
if (speaking)
speechverb = "[speaking.speech_verb]</span>, \"<span class='[speaking.colour]'>"
else if (src.stuttering)
speechverb = "stammers, \""
else if (src.slurring)
speechverb = "slurrs, \""
else if (ending == "?")
speechverb = "asks, \""
else if (ending == "!")
speechverb = "exclaims, \""
else if(isliving(src))
var/mob/living/L = src
if (L.getBrainLoss() >= 60)
return "<span class='say_quote'>gibbers</span>, \"[text]\"";
if (ending == "?")
return "<span class='say_quote'>asks</span>, \"[text]\"";
if (ending == "!")
return "<span class='say_quote'>exclaims</span>, \"[text]\"";
speechverb = "gibbers, \""
else
speechverb = "says, \""
else
speechverb = "says, \""
return "<span class='say_quote'>says</span>, \"[text]\"";
return "[speechverb][text]</span>\""
/mob/proc/emote(var/act, var/type, var/message)
if(act == "me")
+10 -6
View File
@@ -467,25 +467,29 @@
organ= new /obj/item/weapon/organ/l_arm(owner.loc, owner)
if(LEG_RIGHT)
if(status & ORGAN_ROBOT)
organ = new /obj/item/robot_parts/l_leg(owner.loc)
organ = new /obj/item/robot_parts/r_leg(owner.loc)
else
organ= new /obj/item/weapon/organ/r_leg(owner.loc, owner)
if(LEG_LEFT)
if(status & ORGAN_ROBOT)
organ = new /obj/item/robot_parts/r_leg(owner.loc)
organ = new /obj/item/robot_parts/l_leg(owner.loc)
else
organ= new /obj/item/weapon/organ/l_leg(owner.loc, owner)
if(HAND_RIGHT)
organ= new /obj/item/weapon/organ/r_hand(owner.loc, owner)
if(!(status & ORGAN_ROBOT))
organ= new /obj/item/weapon/organ/r_hand(owner.loc, owner)
owner.u_equip(owner.gloves)
if(HAND_LEFT)
organ= new /obj/item/weapon/organ/l_hand(owner.loc, owner)
if(!(status & ORGAN_ROBOT))
organ= new /obj/item/weapon/organ/l_hand(owner.loc, owner)
owner.u_equip(owner.gloves)
if(FOOT_RIGHT)
organ= new /obj/item/weapon/organ/r_foot/(owner.loc, owner)
if(!(status & ORGAN_ROBOT))
organ= new /obj/item/weapon/organ/r_foot/(owner.loc, owner)
owner.u_equip(owner.shoes)
if(FOOT_LEFT)
organ = new /obj/item/weapon/organ/l_foot(owner.loc, owner)
if(!(status & ORGAN_ROBOT))
organ = new /obj/item/weapon/organ/l_foot(owner.loc, owner)
owner.u_equip(owner.shoes)
if(organ)
destspawn = 1