mirror of
https://github.com/Yawn-Wider/YWPolarisVore.git
synced 2026-08-25 22:17:21 +01:00
Adds Linguist and Polyglot traits
This commit is contained in:
@@ -141,6 +141,9 @@
|
||||
var/datum/species/S = character.species
|
||||
var/datum/species/new_S = S.produceCopy(pref.pos_traits + pref.neu_traits + pref.neg_traits, character, pref.custom_base)
|
||||
|
||||
for(var/datum/trait/T in new_S.traits)
|
||||
T.apply_pref(src)
|
||||
|
||||
//Any additional non-trait settings can be applied here
|
||||
new_S.blood_color = pref.blood_color
|
||||
|
||||
@@ -148,8 +151,6 @@
|
||||
//Statistics for this would be nice
|
||||
var/english_traits = english_list(new_S.traits, and_text = ";", comma_text = ";")
|
||||
log_game("TRAITS [pref.client_ckey]/([character]) with: [english_traits]") //Terrible 'fake' key_name()... but they aren't in the same entity yet
|
||||
else
|
||||
|
||||
|
||||
/datum/category_item/player_setup_item/vore/traits/content(var/mob/user)
|
||||
. += "<b>Custom Species Name:</b> "
|
||||
@@ -251,6 +252,8 @@
|
||||
var/choice = tgui_alert(usr, "Remove [initial(trait.name)] and regain [initial(trait.cost)] points?","Remove Trait",list("Remove","Cancel"))
|
||||
if(choice == "Remove")
|
||||
pref.pos_traits -= trait
|
||||
var/datum/trait/instance = all_traits[trait]
|
||||
instance.remove_pref(pref)
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["clicked_neu_trait"])
|
||||
@@ -258,6 +261,8 @@
|
||||
var/choice = tgui_alert(usr, "Remove [initial(trait.name)]?","Remove Trait",list("Remove","Cancel"))
|
||||
if(choice == "Remove")
|
||||
pref.neu_traits -= trait
|
||||
var/datum/trait/instance = all_traits[trait]
|
||||
instance.remove_pref(pref)
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["clicked_neg_trait"])
|
||||
@@ -265,6 +270,8 @@
|
||||
var/choice = tgui_alert(usr, "Remove [initial(trait.name)] and lose [initial(trait.cost)] points?","Remove Trait",list("Remove","Cancel"))
|
||||
if(choice == "Remove")
|
||||
pref.neg_traits -= trait
|
||||
var/datum/trait/instance = all_traits[trait]
|
||||
instance.remove_pref(pref)
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["custom_say"])
|
||||
@@ -417,10 +424,16 @@
|
||||
conflict = instance_test.name
|
||||
break varconflict
|
||||
|
||||
for(var/V in instance.var_changes_pref)
|
||||
if(V in instance_test.var_changes_pref)
|
||||
conflict = instance_test.name
|
||||
break varconflict
|
||||
|
||||
if(conflict)
|
||||
tgui_alert_async(usr, "You cannot take this trait and [conflict] at the same time. Please remove that trait, or pick another trait to add.", "Error")
|
||||
return TOPIC_REFRESH
|
||||
|
||||
instance.apply_pref(pref)
|
||||
mylist += path
|
||||
return TOPIC_REFRESH
|
||||
|
||||
|
||||
Reference in New Issue
Block a user