diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm
index 9713aefc1e..700235f00d 100644
--- a/code/modules/client/preference_setup/vore/07_traits.dm
+++ b/code/modules/client/preference_setup/vore/07_traits.dm
@@ -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 @@
. += "Set Color"
. += "R
"
. += "
"
-
+
. += "Custom Say: "
. += "Set Say Verb
"
. += "Custom Whisper: "
@@ -349,6 +349,12 @@
alert("The trait you've selected cannot be taken by the species you've chosen!","Error")
return TOPIC_REFRESH
+ //CHOMPADDITION START Adding whitelist for traits
+ if( LAZYLEN(instance.allowed_species) && !(pref.species in instance.allowed_species)) //Adding white list handling -shark
+ alert("The trait you've selected cannot be taken by the species you've chosen!","Error")
+ return TOPIC_REFRESH
+ //CHOMPADDITION END
+
if(trait_choice in pref.pos_traits + pref.neu_traits + pref.neg_traits)
conflict = instance.name
diff --git a/code/modules/mob/living/carbon/human/species/shadekin/_defines.dm b/code/modules/mob/living/carbon/human/species/shadekin/_defines.dm
index f24544e0b2..ac5ffdb997 100644
--- a/code/modules/mob/living/carbon/human/species/shadekin/_defines.dm
+++ b/code/modules/mob/living/carbon/human/species/shadekin/_defines.dm
@@ -3,4 +3,13 @@
#define SHIFTED_OR_NOT 3
#define AB_PHASE_SHIFTED 0x1
-#define AB_SHADE_REGEN 0x2
\ No newline at end of file
+#define AB_SHADE_REGEN 0x2
+
+//CHOMPADDITION: KIN TYPES
+#define BLUE_EYES 1
+#define RED_EYES 2
+#define PURPLE_EYES 3
+#define YELLOW_EYES 4
+#define GREEN_EYES 5
+#define ORANGE_EYES 6
+//CHOMPADDITION END
diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
index c1c9ad064b..5a3a18a8b7 100644
--- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
+++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
@@ -33,6 +33,27 @@
var/ability_cost = 100
+//CHOMPADDITION Conditional shifting ased on observers and darkness
+ var/darkness = 1
+ var/turf/T = get_turf(src)
+ if(!T)
+ to_chat(src,"You can't use that here!")
+ return FALSE
+
+ var/brightness = T.get_lumcount() //Brightness in 0.0 to 1.0
+ darkness = 1-brightness //Invert
+
+ var/watcher =-1
+ for(var/mob/living/carbon/human/watchers in view_or_range(7,get_turf(src),"range" ))
+ watcher++
+
+ ability_cost = CLAMP(ability_cost/(0.01+darkness*2),50, 80)//This allows for 1 watcher in full light
+ if(watcher>0)
+ ability_cost = ability_cost + ( 15 * watcher )
+ if(!(ability_flags & AB_PHASE_SHIFTED))
+ log_debug("[src] attempted to shift with [watcher] visible Carbons and it cost [ability_cost] in a darkness level of [darkness]")
+//CHOMPADDITION END
+
var/datum/species/shadekin/SK = species
if(!istype(SK))
to_chat(src, "Only a shadekin can use that!")
@@ -40,6 +61,7 @@
else if(stat)
to_chat(src, "Can't use that ability in your state!")
return FALSE
+
else if(shadekin_get_energy() < ability_cost && !(ability_flags & AB_PHASE_SHIFTED))
to_chat(src, "Not enough energy for that ability!")
return FALSE
@@ -48,7 +70,7 @@
shadekin_adjust_energy(-ability_cost)
playsound(src, 'sound/effects/stealthoff.ogg', 75, 1)
- var/turf/T = get_turf(src)
+ //var/turf/T = get_turf(src) //CHOMPREMOVAL: This is done earlier since we need it to get lighting
if(!T.CanPass(src,T) || loc != T)
to_chat(src,"You can't use that here!")
return FALSE
@@ -270,4 +292,4 @@
holder.glow_intensity = initial(holder.glow_intensity)
holder.glow_color = initial(holder.glow_color)
holder.set_light(0)
- my_kin = null
\ No newline at end of file
+ my_kin = null
diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_zz_ch.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_zz_ch.dm
new file mode 100644
index 0000000000..46ac0e9197
--- /dev/null
+++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_zz_ch.dm
@@ -0,0 +1,134 @@
+/datum/species/shadekin
+ siemens_coefficient = 1
+ //SHADEKIN-UNIQUE STUFF GOES HERE
+ shadekin_abilities = list(/datum/power/shadekin/phase_shift,
+ /datum/power/shadekin/regenerate_other,
+ /datum/power/shadekin/create_shade)
+ shadekin_ability_datums = list()
+ var/kin_type
+ var/energy_light = 0.25
+ var/energy_dark = 0.75
+
+/datum/species/shadekin/handle_shade(var/mob/living/carbon/human/H)
+ //Shifted kin don't gain/lose energy (and save time if we're at the cap)
+ var/darkness = 1
+ var/dark_gains = 0
+
+ var/turf/T = get_turf(H)
+ if(!T)
+ dark_gains = 0
+ return
+
+ var/brightness = T.get_lumcount() //Brightness in 0.0 to 1.0
+ darkness = 1-brightness //Invert
+ var/is_dark = (darkness >= 0.5)
+
+ if(H.ability_flags & AB_PHASE_SHIFTED)
+ dark_gains = 0
+ else
+ //Heal (very) slowly in good darkness
+ if(is_dark)
+ H.adjustFireLoss((-0.10)*darkness)
+ H.adjustBruteLoss((-0.10)*darkness)
+ H.adjustToxLoss((-0.10)*darkness)
+ //energy_dark and energy_light are set by the shadekin eye traits.
+ //These are balanced around their playstyles and 2 planned new aggressive abilities
+ dark_gains = energy_dark
+ else
+ dark_gains = energy_light
+
+ set_energy(H, get_energy(H) + dark_gains)
+
+ //Update huds
+ update_shadekin_hud(H)
+
+/datum/trait/kintype
+ allowed_species = list(SPECIES_SHADEKIN)
+ var/color = BLUE_EYES
+ name = "Shadekin Blue Adaptation"
+ desc = "Makes your shadekin adapted as a Blue eyed kin! This gives you decreased energy regeneration in darkness, decreased regeneration in the light amd unchanged health!"
+ cost = 0
+ var_changes = list( "total_health" = 100,
+ "energy_light" = 0.5,
+ "energy_dark" = 0.5,
+ "unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
+ custom_only = FALSE
+
+/datum/trait/kintype/red
+ name = "Shadekin Red Adaptation"
+ color = RED_EYES
+ desc = "Makes your shadekin adapted as a Red eyed kin! This gives you minimal energy regeneration in darkness, moderate regeneration in the light amd increased health!"
+ var_changes = list( "total_health" = 200,
+ "energy_light" = -1,
+ "energy_dark" = 0.1,
+ "unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
+/datum/trait/kintype/purple
+ name = "Shadekin Purple Adaptation"
+ color = PURPLE_EYES
+ desc = "Makes your shadekin adapted as a Purple eyed kin! This gives you moderate energy regeneration in darkness, minor degeneration in the light amd increased health!"
+ var_changes = list( "total_health" = 150,
+ "energy_light" = 1,
+ "energy_dark" = -0.5,
+ "unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
+
+/datum/trait/kintype/yellow
+ name = "Shadekin Yellow Adaptation"
+ color = YELLOW_EYES
+ desc = "Makes your shadekin adapted as a Yellow eyed kin! This gives you the highest energy regeneration in darkness, high degeneration in the light amd unchanged health!"
+ var_changes = list( "total_health" = 100,
+ "energy_light" = 3,
+ "energy_dark" = -2,
+ "unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
+
+/datum/trait/kintype/green
+ name = "Shadekin Green Adaptation"
+ color = GREEN_EYES
+ desc = "Makes your shadekin adapted as a Green eyed kin! This gives you high energy regeneration in darkness, minor regeneration in the light amd unchanged health!"
+ var_changes = list( "total_health" = 100,
+ "energy_light" = 2,
+ "energy_dark" = 0.125,
+ "unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
+
+/datum/trait/kintype/orange
+ name = "Shadekin Orange Adaptation"
+ color = ORANGE_EYES
+ desc = "Makes your shadekin adapted as a Orange eyed kin! This gives you minor energy regeneration in darkness, modeate degeneration in the light amd increased health!"
+ var_changes = list( "total_health" = 175,
+ "energy_light" = 0.25,
+ "energy_dark" = -0.5,
+ "unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
+
+/datum/trait/kintype/apply(var/datum/species/shadekin/S,var/mob/living/carbon/human/H)
+ if(color && istype(S)) //Sanity check to see if they're actually a shadekin, otherwise just don't do anything. They shouldn't be able to spawn with the trait.
+ S.kin_type = color
+ ..(S,H)
+ switch(color)
+ if(BLUE_EYES)
+ H.shapeshifter_set_eye_color("0000FF")
+ if(RED_EYES)
+ H.shapeshifter_set_eye_color("FF0000")
+ if(GREEN_EYES)
+ H.shapeshifter_set_eye_color("00FF00")
+ if(PURPLE_EYES)
+ H.shapeshifter_set_eye_color("FF00FF")
+ if(YELLOW_EYES)
+ H.shapeshifter_set_eye_color("FFFF00")
+ if(ORANGE_EYES)
+ H.shapeshifter_set_eye_color("FFA500")
+
+
+/datum/unarmed_attack/shadekinharmbap
+ attack_name = "syphon strike"
+ attack_verb = list("hit", "clawed", "slashed", "scratched")
+ attack_sound = 'sound/weapons/slice.ogg'
+ miss_sound = 'sound/weapons/slashmiss.ogg'
+ shredding = 0
+
+/datum/unarmed_attack/shadekinharmbap/apply_effects(var/mob/living/carbon/human/shadekin/user,var/mob/living/carbon/human/target,var/armour,var/attack_damage,var/zone)
+ ..()
+ if(user == target) //Prevent self attack to gain energy
+ return
+ var/obj/item/organ/internal/brain/shadekin/shade_organ = user.internal_organs_by_name[O_BRAIN]
+ if(!istype(shade_organ))
+ return
+ shade_organ.dark_energy = CLAMP(shade_organ.dark_energy + attack_damage,0,shade_organ.max_dark_energy) //Convert Damage done to Energy Gained
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/human/species/station/station_ch.dm b/code/modules/mob/living/carbon/human/species/station/station_ch.dm
index 95970a1a64..77e80b2be9 100644
--- a/code/modules/mob/living/carbon/human/species/station/station_ch.dm
+++ b/code/modules/mob/living/carbon/human/species/station/station_ch.dm
@@ -23,7 +23,7 @@
spawn_flags = SPECIES_IS_RESTRICTED
/datum/species/shadekin
- spawn_flags = SPECIES_IS_RESTRICTED
+ //spawn_flags = SPECIES_IS_RESTRICTED
//datum/species/protean
// spawn_flags = SPECIES_IS_RESTRICTED
diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/trait_ch.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/trait_ch.dm
index 662d3ebdc0..fd1f15ccdd 100644
--- a/code/modules/mob/living/carbon/human/species/station/traits_vr/trait_ch.dm
+++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/trait_ch.dm
@@ -1,5 +1,6 @@
/datum/trait
var/special_env = FALSE
+ var/list/allowed_species // A list of species that CAN take this trait, use this if only 1 species can use it. -shark
/datum/trait/proc/handle_environment_special(var/mob/living/carbon/human/H)
return
diff --git a/code/modules/mob/new_player/new_player_vr.dm b/code/modules/mob/new_player/new_player_vr.dm
index a317e9a0d9..2c48e766f5 100644
--- a/code/modules/mob/new_player/new_player_vr.dm
+++ b/code/modules/mob/new_player/new_player_vr.dm
@@ -62,6 +62,18 @@
pass = FALSE
to_chat(src,"Your custom species is not playable. Reconfigure your traits on the VORE tab.")
+ //CHOMP Addition Begin
+ if(client?.prefs?.neu_traits)
+ for(var/T in client.prefs.neu_traits)
+ var/datum/trait/instance = all_traits[T]
+ if(client.prefs.species in instance.banned_species)
+ pass = FALSE
+ to_chat(src,"One of your traits, [instance.name], is not available for your species! Please fix this conflict and then try again.")
+ else if(LAZYLEN(instance.allowed_species) && !(client.prefs.species in instance.allowed_species)) //We use else if here, so as to prevent getting two errors for one trait.
+ pass = FALSE
+ to_chat(src,"One of your traits, [instance.name], is not available for your species! Please fix this conflict and then try again.")
+ //CHOMP Addition End
+
//Final popup notice
if (!pass)
spawn()
diff --git a/vorestation.dme b/vorestation.dme
index 8a617e5f49..2dfd6dad41 100644
--- a/vorestation.dme
+++ b/vorestation.dme
@@ -2793,6 +2793,7 @@
#include "code\modules\mob\living\carbon\human\species\shadekin\shadekin.dm"
#include "code\modules\mob\living\carbon\human\species\shadekin\shadekin_abilities.dm"
#include "code\modules\mob\living\carbon\human\species\shadekin\shadekin_hud.dm"
+#include "code\modules\mob\living\carbon\human\species\shadekin\shadekin_zz_ch.dm"
#include "code\modules\mob\living\carbon\human\species\station\alraune.dm"
#include "code\modules\mob\living\carbon\human\species\station\blank_vr.dm"
#include "code\modules\mob\living\carbon\human\species\station\golem.dm"