Merge pull request #3501 from VOREStation/aro-is3478

Cleans up custom species icon base code
This commit is contained in:
Aronai Sieyes
2018-04-19 20:26:13 -04:00
committed by GitHub
5 changed files with 23 additions and 29 deletions
+1
View File
@@ -26,3 +26,4 @@
#define SPECIES_XENOHYBRID "Xenomorph Hybrid"
#define SPECIES_ZORREN_FLAT "Flatland Zorren"
#define SPECIES_ZORREN_HIGH "Highlander Zorren"
#define SPECIES_CUSTOM "Custom Species"
+1 -1
View File
@@ -32,7 +32,7 @@ var/global/list/all_species[0]
var/global/list/all_languages[0]
var/global/list/language_keys[0] // Table of say codes for all languages
var/global/list/whitelisted_species = list(SPECIES_HUMAN) // Species that require a whitelist check.
var/global/list/playable_species = list("Custom Species", SPECIES_HUMAN) // A list of ALL playable species, whitelisted, latejoin or otherwise. //VOREStation Edit - Making sure custom species is obvious.
var/global/list/playable_species = list(SPECIES_CUSTOM, SPECIES_HUMAN) // A list of ALL playable species, whitelisted, latejoin or otherwise. //VOREStation Edit - Making sure custom species is obvious.
var/list/mannequins_
+13 -1
View File
@@ -11,6 +11,8 @@ var/global/list/positive_traits = list() // Positive custom species traits, inde
var/global/list/traits_costs = list() // Just path = cost list, saves time in char setup
var/global/list/all_traits = list() // All of 'em at once (same instances)
var/global/list/custom_species_bases = list() // Species that can be used for a Custom Species icon base
//stores numeric player size options indexed by name
var/global/list/player_sizes_list = list(
"Macro" = RESIZE_HUGE,
@@ -195,4 +197,14 @@ var/global/list/edible_trash = list(/obj/item/trash,
if(0.1 to INFINITY)
positive_traits[path] = instance
return 1 // Hooks must return 1
// Custom species icon bases
var/list/blacklisted_icons = list(SPECIES_CUSTOM,SPECIES_PROMETHEAN) //Just ones that won't work well.
for(var/species_name in playable_species)
if(species_name in blacklisted_icons)
continue
var/datum/species/S = all_species[species_name]
if(S.spawn_flags & SPECIES_IS_WHITELISTED)
continue
custom_species_bases += species_name
return 1 // Hooks must return 1
@@ -55,7 +55,7 @@
pref.starting_trait_points = STARTING_SPECIES_POINTS
pref.max_traits = MAX_SPECIES_TRAITS
if(pref.species != "Custom Species")
if(pref.species != SPECIES_CUSTOM)
pref.pos_traits.Cut()
pref.neu_traits.Cut()
pref.neg_traits.Cut()
@@ -73,12 +73,12 @@
if(!(path in negative_traits))
pref.neg_traits -= path
if(!pref.custom_base || (pref.custom_base != "Xenochimera" && !(pref.custom_base in playable_species - whitelisted_species)))
if(!pref.custom_base || !(pref.custom_base in custom_species_bases))
pref.custom_base = "Human"
/datum/category_item/player_setup_item/vore/traits/copy_to_mob(var/mob/living/carbon/human/character)
character.custom_species = pref.custom_species
if(pref.species == "Custom Species")
if(pref.species == SPECIES_CUSTOM || pref.species == SPECIES_XENOCHIMERA)
var/datum/species/custom/CS = character.species
var/S = pref.custom_base ? pref.custom_base : "Human"
var/datum/species/custom/new_CS = CS.produceCopy(S, pref.pos_traits + pref.neu_traits + pref.neg_traits, character)
@@ -86,28 +86,15 @@
//Any additional non-trait settings can be applied here
new_CS.blood_color = pref.blood_color
if(pref.species == "Xenochimera")
var/datum/species/xenochimera/CS = character.species
var/S = pref.custom_base ? pref.custom_base : "Human"
var/datum/species/xenochimera/new_CS = CS.produceCopy(S, pref.pos_traits + pref.neu_traits + pref.neg_traits, character)
//Any additional non-trait settings can be applied here
new_CS.blood_color = pref.blood_color
/datum/category_item/player_setup_item/vore/traits/content(var/mob/user)
. += "<b>Custom Species</b> "
. += "<a href='?src=\ref[src];custom_species=1'>[pref.custom_species ? pref.custom_species : "-Input Name-"]</a><br>"
if(pref.species == "Custom Species")
if(pref.species == SPECIES_CUSTOM || pref.species == SPECIES_XENOCHIMERA)
. += "<b>Icon Base: </b> "
. += "<a href='?src=\ref[src];custom_base=1'>[pref.custom_base ? pref.custom_base : "Human"]</a><br>"
if(pref.species == "Xenochimera")
. += "<b>Icon Base: </b> "
. += "<a href='?src=\ref[src];custom_base_xenochimera=1'>[pref.custom_base ? pref.custom_base : "Human"]</a><br>"
if(pref.species == "Custom Species")
if(pref.species == SPECIES_CUSTOM)
var/points_left = pref.starting_trait_points
var/traits_left = pref.max_traits
for(var/T in pref.pos_traits + pref.neg_traits)
@@ -161,14 +148,8 @@
return TOPIC_REFRESH
else if(href_list["custom_base"])
var/text_choice = input("Pick an icon set for your species:","Icon Base") in playable_species - whitelisted_species - "Custom Species" - "Promethean"
if(text_choice in playable_species)
pref.custom_base = text_choice
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["custom_base_xenochimera"])
var/text_choice = input("Pick an icon set for your species:","Icon Base") in playable_species - whitelisted_species - "Custom Species" - "Promethean" + "Xenochimera"
if(text_choice in playable_species)
var/text_choice = input("Pick an icon set for your species:","Icon Base") in custom_species_bases
if(text_choice in custom_species_bases)
pref.custom_base = text_choice
return TOPIC_REFRESH_UPDATE_PREVIEW
@@ -7,7 +7,7 @@
var/trashcan = 0 //It's always sunny in the wrestling ring.
/datum/species/custom
name = "Custom Species"
name = SPECIES_CUSTOM
name_plural = "Custom"
var/base_species = "Human"