Language and IPC Random Name Fix

Fixes an incorrect language datum path that was the true culprit for the
"an unknown language" option.
- Fixing this path also has fixed IPC random names being random strings
of 0's, 1's, and the occasional 2.

Re-consolidated the vars for the /datum/language define to be in a
single code block

Adds a new proc for clients that lists all language names, their path,
and whether they are restricted.
- Can only be called via proc-call
- For debugging purposes only, please do not use on live server as it
will spam chat due to sending the messages to world.
This commit is contained in:
FalseIncarnate
2015-09-09 02:43:40 -04:00
parent 81deb3f062
commit 76817f8c59
4 changed files with 18 additions and 15 deletions
+16 -7
View File
@@ -183,8 +183,8 @@
if(!prefs.unlock_content)
src << "Become a BYOND member to access member-perks and features, as well as support the engine that makes this game possible. <a href='http://www.byond.com/membership'>Click here to find out more</a>."
return 0
return 1
return 1
/client/proc/handle_spam_prevention(var/message, var/mute_type)
if(config.automute_on && !holder && src.last_message == message)
src.last_message_count++
@@ -330,8 +330,8 @@
related_accounts_cid = list()
while(query_cid.NextRow())
if(ckey != query_cid.item[1])
related_accounts_cid.Add("[query_cid.item[1]]")
related_accounts_cid.Add("[query_cid.item[1]]")
//Log all the alts
if(related_accounts_cid.len)
log_access("Alts: [key_name(src)]:[list2text(related_accounts_cid, " - ")]")
@@ -339,8 +339,8 @@
var/watchreason = check_watchlist(sql_ckey)
if(watchreason)
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'>[key_name_admin(src)] is on the watchlist and has just connected - Reason: [watchreason]</font>")
send2irc_adminless_only("Watchlist", "[key_name(src)] is on the watchlist and has just connected - Reason: [watchreason]")
send2irc_adminless_only("Watchlist", "[key_name(src)] is on the watchlist and has just connected - Reason: [watchreason]")
//Just the standard check to see if it's actually a number
if(sql_id)
if(istext(sql_id))
@@ -389,6 +389,15 @@
'html/search.js', // Used in various non-NanoUI HTML windows for search functionality
'html/panels.css' // Used for styling certain panels, such as in the new player panel
)
// Send NanoUI resources to this client
spawn nanomanager.send_resources(src)
//For debugging purposes
/client/proc/list_all_languages()
for(var/L in all_languages)
var/datum/language/lang = all_languages[L]
var/message = "[lang.name] : [lang.type]"
if(lang.flags & RESTRICTED)
message += " (RESTRICTED)"
world << "[message]"
-3
View File
@@ -1125,9 +1125,6 @@ datum/preferences
*/
for(var/L in all_languages)
var/datum/language/lang = all_languages[L]
if(lang.name == "an unknown language")
//don't add the parent type language as an option
continue
if(!(lang.flags & RESTRICTED))
new_languages += lang.name
+2 -4
View File
@@ -19,6 +19,7 @@
var/list/syllables // Used when scrambling text for a non-speaker.
var/list/space_chance = 55 // Likelihood of getting a space in the random scramble string.
var/follow = 0 // Applies to HIVEMIND languages - should a follow link be included for dead mobs?
var/list/scramble_cache = list()
/datum/language/proc/get_random_name(var/gender, name_count=2, syllable_count=4)
if(!syllables || !syllables.len)
@@ -38,9 +39,6 @@
return "[trim(full_name)]"
/datum/language
var/list/scramble_cache = list()
/datum/language/proc/scramble(var/input)
if(!syllables || !syllables.len)
@@ -247,7 +245,7 @@
flags = RESTRICTED | WHITELISTED
syllables = list("02011","01222","10100","10210","21012","02011","21200","1002","2001","0002","0012","0012","000","120","121","201","220","10","11","0")
/datum/language/machine/get_random_name()
/datum/language/trinary/get_random_name()
var/new_name
if(prob(70))
new_name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"