mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 22:48:38 +01:00
Merge pull request #2123 from Yoshax/languages
Makes languages great again
This commit is contained in:
@@ -32,13 +32,16 @@ var/list/whitelist = list()
|
||||
|
||||
/proc/is_alien_whitelisted(mob/M, var/datum/species/species)
|
||||
//They are admin or the whitelist isn't in use
|
||||
if(whitelist_overrides(M)) return 1
|
||||
if(whitelist_overrides(M))
|
||||
return 1
|
||||
|
||||
//You did something wrong
|
||||
if(!M || !species) return 0
|
||||
if(!M || !species)
|
||||
return 0
|
||||
|
||||
//The species isn't even whitelisted
|
||||
if(!(species.spawn_flags & SPECIES_IS_WHITELISTED)) return 1
|
||||
if(!(species.spawn_flags & SPECIES_IS_WHITELISTED))
|
||||
return 1
|
||||
|
||||
//If we have a loaded file, search it
|
||||
if(alien_whitelist)
|
||||
@@ -50,13 +53,16 @@ var/list/whitelist = list()
|
||||
|
||||
/proc/is_lang_whitelisted(mob/M, var/datum/language/language)
|
||||
//They are admin or the whitelist isn't in use
|
||||
if(whitelist_overrides(M)) return 1
|
||||
if(whitelist_overrides(M))
|
||||
return 1
|
||||
|
||||
//You did something wrong
|
||||
if(!M || !language) return 0
|
||||
if(!M || !language)
|
||||
return 0
|
||||
|
||||
//The language isn't even whitelisted
|
||||
if(!(language.flags & WHITELISTED)) return 1
|
||||
if(!(language.flags & WHITELISTED))
|
||||
return 1
|
||||
|
||||
//If we have a loaded file, search it
|
||||
if(alien_whitelist)
|
||||
|
||||
@@ -410,12 +410,6 @@
|
||||
|
||||
new_character.lastarea = get_area(loc)
|
||||
|
||||
for(var/lang in client.prefs.alternate_languages)
|
||||
var/datum/language/chosen_language = all_languages[lang]
|
||||
if(chosen_language)
|
||||
if(is_lang_whitelisted(src,chosen_language) || (new_character.species && (chosen_language.name in new_character.species.secondary_langs)))
|
||||
new_character.add_language(lang)
|
||||
|
||||
if(ticker.random_players)
|
||||
new_character.gender = pick(MALE, FEMALE)
|
||||
client.prefs.real_name = random_name(new_character.gender)
|
||||
@@ -442,6 +436,11 @@
|
||||
new_character.dna.SetSEState(GLASSESBLOCK,1,0)
|
||||
new_character.disabilities |= NEARSIGHTED
|
||||
|
||||
for(var/lang in client.prefs.alternate_languages)
|
||||
var/datum/language/chosen_language = all_languages[lang]
|
||||
if(chosen_language)
|
||||
if(is_lang_whitelisted(src,chosen_language) || (new_character.species && (chosen_language.name in new_character.species.secondary_langs)))
|
||||
new_character.add_language(lang)
|
||||
// And uncomment this, too.
|
||||
//new_character.dna.UpdateSE()
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# Your name.
|
||||
author: Yoshax
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- bugfix: "Languages selected during character setup will once again be properly added to mobs."
|
||||
Reference in New Issue
Block a user