From 81deb3f062adf223d8c5ab84c745953c82236152 Mon Sep 17 00:00:00 2001 From: FalseIncarnate Date: Sun, 6 Sep 2015 00:01:27 -0400 Subject: [PATCH 1/2] Unknown Language Fix, Shrimp Recipe Tweak Removes "an unknown language" from selectable options in character creation - Fixes #1940 Tweaks the recipe for Cooked Shrimp to be more in-line with similar recipes - Previously required 1 unit of water, now requires 5 units of water --- code/modules/client/preferences.dm | 15 +++++++++------ code/modules/food/recipes_microwave.dm | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 338d57dd616..d88416b9bfb 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -185,17 +185,17 @@ datum/preferences // jukebox volume var/volume = 100 - + // BYOND membership var/unlock_content = 0 - + /datum/preferences/New(client/C) b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+") if(istype(C)) if(!IsGuestKey(C.key)) unlock_content = C.IsByondMember() if(unlock_content) - max_save_slots = MAX_SAVE_SLOTS_MEMBER + max_save_slots = MAX_SAVE_SLOTS_MEMBER var/loaded_preferences_successfully = load_preferences(C) if(loaded_preferences_successfully) if(load_character(C)) @@ -385,7 +385,7 @@ datum/preferences dat += "Ghost radio: [(toggles & CHAT_GHOSTRADIO) ? "Nearest Speakers" : "All Chatter"]
" if(config.allow_Metadata) dat += "OOC notes: Edit
" - + if(user.client) if(user.client.holder) dat += "Adminhelp sound: " @@ -393,7 +393,7 @@ datum/preferences if(check_rights(R_ADMIN,0)) dat += "OOC:     Change
" - + if(unlock_content) dat += "BYOND Membership Publicity: [(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]
" @@ -1125,6 +1125,9 @@ 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 @@ -1360,7 +1363,7 @@ datum/preferences if("publicity") if(unlock_content) toggles ^= MEMBER_PUBLIC - + if("gender") if(gender == MALE) gender = FEMALE diff --git a/code/modules/food/recipes_microwave.dm b/code/modules/food/recipes_microwave.dm index 580f626bf47..0aabf6fb3ef 100644 --- a/code/modules/food/recipes_microwave.dm +++ b/code/modules/food/recipes_microwave.dm @@ -632,7 +632,7 @@ result = /obj/item/weapon/reagent_containers/food/snacks/mint /datum/recipe/microwave/boiled_shrimp - reagents = list("water" = 1) + reagents = list("water" = 5) items = list( /obj/item/weapon/reagent_containers/food/snacks/shrimp ) From 76817f8c5929a93a6f783a499ba8682ec1d3ddec Mon Sep 17 00:00:00 2001 From: FalseIncarnate Date: Wed, 9 Sep 2015 02:43:40 -0400 Subject: [PATCH 2/2] 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. --- code/__HELPERS/lists.dm | 1 - code/modules/client/client procs.dm | 23 ++++++++++++++++------- code/modules/client/preferences.dm | 3 --- code/modules/mob/language.dm | 6 ++---- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index 871c06a58fe..5f4be64c9db 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -583,4 +583,3 @@ proc/dd_sortedObjectList(list/incoming) /datum/alarm/dd_SortValue() return "[sanitize(last_name)]" - \ No newline at end of file diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 1376f088aea..cc97f6193f7 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -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. Click here to find out more." 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("Notice: [key_name_admin(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]") - + 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]" diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index d88416b9bfb..c8ea372573c 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -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 diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index 835e13f7104..937ee9d86d8 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -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)]"