mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-29 11:32:13 +00:00
Generalizes whitelist/species lists for datacore/preferences/new player code. Removes vox whitelist check from raid spawn.
This commit is contained in:
@@ -123,20 +123,7 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
|
||||
if (H.gender == FEMALE)
|
||||
g = "f"
|
||||
|
||||
var/icon/icobase
|
||||
switch(H.get_species())
|
||||
if("Tajaran")
|
||||
icobase = 'icons/mob/human_races/r_tajaran.dmi'
|
||||
if("Unathi")
|
||||
icobase = 'icons/mob/human_races/r_lizard.dmi'
|
||||
if("Skrell")
|
||||
icobase = 'icons/mob/human_races/r_skrell.dmi'
|
||||
|
||||
if("Vox")
|
||||
icobase = 'icons/mob/human_races/r_vox.dmi'
|
||||
|
||||
else
|
||||
icobase = 'icons/mob/human_races/r_human.dmi'
|
||||
var/icon/icobase = H.species.icobase
|
||||
|
||||
preview_icon = new /icon(icobase, "torso_[g]")
|
||||
var/icon/temp
|
||||
@@ -153,15 +140,13 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
|
||||
preview_icon.Blend(temp, ICON_OVERLAY)
|
||||
|
||||
// Skin tone
|
||||
if(H.get_species() == "Human")
|
||||
if(H.species.flags & HAS_SKIN_TONE)
|
||||
if (H.s_tone >= 0)
|
||||
preview_icon.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD)
|
||||
else
|
||||
preview_icon.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
|
||||
|
||||
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "eyes_s")
|
||||
if(H.get_species()=="Vox")
|
||||
eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "vox_eyes_s")
|
||||
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = H.species ? H.species.eyes : "eyes_s")
|
||||
|
||||
eyes_s.Blend(rgb(H.r_eyes, H.g_eyes, H.b_eyes), ICON_ADD)
|
||||
|
||||
|
||||
@@ -444,7 +444,6 @@ client/proc/one_click_antag()
|
||||
//Generates a list of candidates from active ghosts.
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
spawn(0)
|
||||
if(is_alien_whitelisted(G, "Vox") || !config.usealienwhitelist)
|
||||
switch(alert(G,"Do you wish to be considered for a vox raiding party arriving on the station?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
|
||||
@@ -799,31 +799,21 @@ datum/preferences
|
||||
if(new_age)
|
||||
age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN)
|
||||
if("species")
|
||||
|
||||
var/list/new_species = list("Human")
|
||||
var/prev_species = species
|
||||
var/whitelisted = 0
|
||||
|
||||
if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it!
|
||||
if(is_alien_whitelisted(user, "Soghun")) //Check for Unathi and admins
|
||||
new_species += "Unathi"
|
||||
for(var/S in whitelisted_species)
|
||||
if(is_alien_whitelisted(user,S))
|
||||
new_species += S
|
||||
whitelisted = 1
|
||||
if(is_alien_whitelisted(user, "Tajaran")) //Check for Tajaran and admins
|
||||
new_species += "Tajaran"
|
||||
whitelisted = 1
|
||||
if(is_alien_whitelisted(user, "Skrell")) //Check for Skrell and admins
|
||||
new_species += "Skrell"
|
||||
whitelisted = 1
|
||||
if(is_alien_whitelisted(user, "Vox")) //Check for Skrell and admins
|
||||
new_species += "Vox"
|
||||
whitelisted = 1
|
||||
|
||||
|
||||
if(!whitelisted)
|
||||
alert(user, "You cannot change your species as you need to be whitelisted. If you wish to be whitelisted contact an admin in-game, on the forums, or on IRC.")
|
||||
else //Not using the whitelist? Aliens for everyone!
|
||||
new_species += "Tajaran"
|
||||
new_species += "Unathi"
|
||||
new_species += "Skrell"
|
||||
new_species += "Vox"
|
||||
new_species = whitelisted_species
|
||||
|
||||
species = input("Please select a species", "Character Generation", null) in new_species
|
||||
|
||||
if(prev_species != species)
|
||||
@@ -872,31 +862,21 @@ datum/preferences
|
||||
s_tone = 0
|
||||
|
||||
if("language")
|
||||
var/list/new_language = list("None")
|
||||
var/list/new_languages = list("None")
|
||||
var/language_whitelisted = 0
|
||||
if(config.usealienwhitelist)
|
||||
if(is_alien_whitelisted(user, "Language_Soghun"))
|
||||
new_language += "Unathi"
|
||||
language_whitelisted = 1
|
||||
if(is_alien_whitelisted(user, "Language_Tajaran"))
|
||||
new_language += "Tajaran"
|
||||
language_whitelisted = 1
|
||||
if(is_alien_whitelisted(user, "Language_Skrell"))
|
||||
new_language += "Skrell"
|
||||
language_whitelisted = 1
|
||||
if(is_alien_whitelisted(user, "Language_Kidan"))
|
||||
new_language += "Kidan"
|
||||
for(var/L in all_languages)
|
||||
if(is_alien_whitelisted(user, L))
|
||||
new_languages += L
|
||||
language_whitelisted = 1
|
||||
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.")
|
||||
|
||||
else
|
||||
new_language += "Unathi"
|
||||
new_language += "Tajaran"
|
||||
new_language += "Skrell"
|
||||
new_language += "Kidan"
|
||||
language = input("Please select a secondary language", "Character Generation", null) in new_language
|
||||
language = input("Please select a secondary language", "Character Generation", null) in new_languages
|
||||
|
||||
if("metadata")
|
||||
var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/mob/living/carbon/human/tajaran/New()
|
||||
h_style = "Tajaran Ears"
|
||||
set_species("Tajara")
|
||||
set_species("Tajaran")
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/unathi/New()
|
||||
|
||||
@@ -347,28 +347,21 @@
|
||||
var/mob/living/carbon/human/new_character = new(loc)
|
||||
new_character.lastarea = get_area(loc)
|
||||
|
||||
if(client.prefs.species == "Tajaran") //This is like the worst, but it works, so meh. - Erthilo
|
||||
if(is_alien_whitelisted(src, "Tajaran") || !config.usealienwhitelist)
|
||||
new_character.set_species("Tajara")
|
||||
new_character.add_language("Siik'mas")
|
||||
if(client.prefs.species == "Unathi")
|
||||
if(is_alien_whitelisted(src, "Soghun") || !config.usealienwhitelist)
|
||||
new_character.set_species("Unathi")
|
||||
new_character.add_language("Sinta'unathi")
|
||||
if(client.prefs.species == "Skrell")
|
||||
if(is_alien_whitelisted(src, "Skrell") || !config.usealienwhitelist)
|
||||
new_character.set_species("Skrell")
|
||||
new_character.add_language("Skrellian")
|
||||
var/datum/species/chosen_species
|
||||
if(client.prefs.species)
|
||||
chosen_species = all_species[client.prefs.species]
|
||||
if(chosen_species)
|
||||
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)
|
||||
|
||||
if(client.prefs.language == "Tajaran")
|
||||
if(is_alien_whitelisted(src, "Language_Tajaran") || !config.usealienwhitelist)
|
||||
new_character.add_language("Siik'mas")
|
||||
if(client.prefs.language == "Unathi")
|
||||
if(is_alien_whitelisted(src, "Language_Soghun") || !config.usealienwhitelist)
|
||||
new_character.add_language("Sinta'unathi")
|
||||
if(client.prefs.language == "Skrell")
|
||||
if(is_alien_whitelisted(src, "Language_Skrell") || !config.usealienwhitelist)
|
||||
new_character.add_language("Skrellian")
|
||||
var/datum/language/chosen_language
|
||||
if(client.prefs.language)
|
||||
chosen_language = all_languages[client.prefs.language]
|
||||
if(chosen_language)
|
||||
if(is_alien_whitelisted(src, client.prefs.language) || !config.usealienwhitelist)
|
||||
new_character.add_language(client.prefs.language)
|
||||
|
||||
if(ticker.random_players)
|
||||
new_character.gender = pick(MALE, FEMALE)
|
||||
|
||||
@@ -137,19 +137,13 @@ datum/preferences
|
||||
if(gender == FEMALE) g = "f"
|
||||
|
||||
var/icon/icobase
|
||||
switch(species)
|
||||
if("Tajaran")
|
||||
icobase = 'icons/mob/human_races/r_tajaran.dmi'
|
||||
if("Unathi")
|
||||
icobase = 'icons/mob/human_races/r_lizard.dmi'
|
||||
if("Skrell")
|
||||
icobase = 'icons/mob/human_races/r_skrell.dmi'
|
||||
|
||||
if("Vox")
|
||||
icobase = 'icons/mob/human_races/r_vox.dmi'
|
||||
var/datum/species/current_species = all_species[species]
|
||||
|
||||
if(current_species)
|
||||
icobase = current_species.icobase
|
||||
else
|
||||
icobase = 'icons/mob/human_races/r_human.dmi'
|
||||
|
||||
preview_icon = new /icon(icobase, "torso_[g]")
|
||||
preview_icon.Blend(new /icon(icobase, "groin_[g]"), ICON_OVERLAY)
|
||||
preview_icon.Blend(new /icon(icobase, "head_[g]"), ICON_OVERLAY)
|
||||
@@ -169,16 +163,13 @@ datum/preferences
|
||||
preview_icon.Blend(temp, ICON_OVERLAY)
|
||||
|
||||
// Skin tone
|
||||
if(species == "Human")
|
||||
if(current_species && (current_species.flags & HAS_SKIN_TONE))
|
||||
if (s_tone >= 0)
|
||||
preview_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
else
|
||||
preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
|
||||
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "eyes_s")
|
||||
if(species=="Vox")
|
||||
eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "vox_eyes_s")
|
||||
|
||||
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = current_species ? current_species.eyes : "eyes_s")
|
||||
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
|
||||
|
||||
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
|
||||
|
||||
Reference in New Issue
Block a user