mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-15 09:02:32 +01:00
Switch to defines for custom species stuff
This commit is contained in:
@@ -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,23 +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" || pref.species == "Xenochimera")
|
||||
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 == "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)
|
||||
@@ -157,7 +149,7 @@
|
||||
|
||||
else if(href_list["custom_base"])
|
||||
var/text_choice = input("Pick an icon set for your species:","Icon Base") in custom_species_bases
|
||||
if(text_choice in playable_species)
|
||||
if(text_choice in custom_species_bases)
|
||||
pref.custom_base = text_choice
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
|
||||
Reference in New Issue
Block a user