mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00: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
|
||||
|
||||
@@ -151,8 +154,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> "
|
||||
@@ -258,6 +259,8 @@
|
||||
if(traitpath == /datum/trait/positive/linguist) //CHOMPEdit
|
||||
pref.num_languages = null //CHOMPEdit
|
||||
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"])
|
||||
@@ -265,6 +268,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"])
|
||||
@@ -272,6 +277,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"])
|
||||
@@ -424,11 +431,21 @@
|
||||
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
|
||||
<<<<<<< HEAD
|
||||
if(path==/datum/trait/positive/linguist) //CHOMPEdit
|
||||
pref.num_languages = 12 //CHOMPEdit
|
||||
=======
|
||||
|
||||
instance.apply_pref(pref)
|
||||
>>>>>>> a6f7e932ad... Merge pull request #13178 from Heroman3003/linguist
|
||||
mylist += path
|
||||
return TOPIC_REFRESH
|
||||
|
||||
|
||||
Reference in New Issue
Block a user