mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Fixes languages not being properly added to mobs
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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user