mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-26 14:47:50 +01:00
Species whitelist for traits
Tunes up the trait system to have a whitelist AND a blacklist so you can choose whichever makes you have to write the lowest amount of code
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
S["traits_cheating"] >> pref.traits_cheating
|
||||
S["max_traits"] >> pref.max_traits
|
||||
S["trait_points"] >> pref.starting_trait_points
|
||||
|
||||
|
||||
S["custom_say"] >> pref.custom_say
|
||||
S["custom_whisper"] >> pref.custom_whisper
|
||||
S["custom_ask"] >> pref.custom_ask
|
||||
@@ -58,7 +58,7 @@
|
||||
S["traits_cheating"] << pref.traits_cheating
|
||||
S["max_traits"] << pref.max_traits
|
||||
S["trait_points"] << pref.starting_trait_points
|
||||
|
||||
|
||||
S["custom_say"] << pref.custom_say
|
||||
S["custom_whisper"] << pref.custom_whisper
|
||||
S["custom_ask"] << pref.custom_ask
|
||||
@@ -179,7 +179,7 @@
|
||||
. += "<a href='?src=\ref[src];blood_color=1'>Set Color</a>"
|
||||
. += "<a href='?src=\ref[src];blood_reset=1'>R</a><br>"
|
||||
. += "<br>"
|
||||
|
||||
|
||||
. += "<b>Custom Say: </b>"
|
||||
. += "<a href='?src=\ref[src];custom_say=1'>Set Say Verb</a><br>"
|
||||
. += "<b>Custom Whisper: </b>"
|
||||
@@ -345,7 +345,7 @@
|
||||
pref.gross_meatbag = 0 //Just to be sure
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if(pref.species in instance.banned_species)
|
||||
if(pref.species in instance.banned_species || (LAZYLEN(instance.allowed_species) && !(pref.species in instance.allowed_species))) //CHOMPEDIT: Whitelising!
|
||||
alert("The trait you've selected cannot be taken by the species you've chosen!","Error")
|
||||
return TOPIC_REFRESH
|
||||
|
||||
|
||||
Reference in New Issue
Block a user