mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 13:18:09 +01:00
Reworks Shadekin eyecolors (again)
This commit is contained in:
@@ -260,6 +260,7 @@
|
||||
/mob/living/carbon/human/proc/force_update_organs()
|
||||
for(var/obj/item/organ/O as anything in organs + internal_organs)
|
||||
O.species = species
|
||||
species.post_spawn_special(src)
|
||||
//VOREStation Add End
|
||||
|
||||
// Used below, simple injection modifier.
|
||||
|
||||
@@ -257,4 +257,90 @@
|
||||
e_icon = 4
|
||||
|
||||
H.shadekin_display.icon_state = "shadekin-[l_icon]-[e_icon]"
|
||||
return
|
||||
return
|
||||
|
||||
/datum/species/shadekin/proc/get_shadekin_eyecolor(var/mob/living/carbon/human/H)
|
||||
var/eyecolor_rgb = rgb(H.r_eyes, H.g_eyes, H.b_eyes)
|
||||
|
||||
var/eyecolor_hue = rgb2num(eyecolor_rgb, COLORSPACE_HSV)[1]
|
||||
var/eyecolor_sat = rgb2num(eyecolor_rgb, COLORSPACE_HSV)[2]
|
||||
var/eyecolor_val = rgb2num(eyecolor_rgb, COLORSPACE_HSV)[3]
|
||||
|
||||
//First, clamp the saturation/value to prevent black/grey/white eyes
|
||||
if(eyecolor_sat < 10)
|
||||
eyecolor_sat = 10
|
||||
if(eyecolor_val < 40)
|
||||
eyecolor_val = 40
|
||||
|
||||
eyecolor_rgb = rgb(eyecolor_hue, eyecolor_sat, eyecolor_val, COLORSPACE_HSV)
|
||||
|
||||
H.r_eyes = rgb2num(eyecolor_rgb)[1]
|
||||
H.g_eyes = rgb2num(eyecolor_rgb)[2]
|
||||
H.b_eyes = rgb2num(eyecolor_rgb)[3]
|
||||
|
||||
//Now determine what color we fall into.
|
||||
var/eyecolor_type = BLUE_EYES
|
||||
switch(eyecolor_hue)
|
||||
if(0 to 20)
|
||||
eyecolor_type = RED_EYES
|
||||
if(21 to 50)
|
||||
eyecolor_type = ORANGE_EYES
|
||||
if(51 to 70)
|
||||
eyecolor_type = YELLOW_EYES
|
||||
if(71 to 160)
|
||||
eyecolor_type = GREEN_EYES
|
||||
if(161 to 260)
|
||||
eyecolor_type = BLUE_EYES
|
||||
if(261 to 340)
|
||||
eyecolor_type = PURPLE_EYES
|
||||
if(341 to 360)
|
||||
eyecolor_type = RED_EYES
|
||||
|
||||
return eyecolor_type
|
||||
|
||||
/datum/species/shadekin/post_spawn_special(var/mob/living/carbon/human/H)
|
||||
.=..()
|
||||
|
||||
var/eyecolor_type = get_shadekin_eyecolor(H)
|
||||
|
||||
switch(eyecolor_type)
|
||||
if(BLUE_EYES)
|
||||
total_health = 100
|
||||
energy_light = 0.5
|
||||
energy_dark = 0.5
|
||||
if(RED_EYES)
|
||||
total_health = 200
|
||||
energy_light = -1
|
||||
energy_dark = 0.1
|
||||
if(PURPLE_EYES)
|
||||
total_health = 150
|
||||
energy_light = -0.5
|
||||
energy_dark = 1
|
||||
if(YELLOW_EYES)
|
||||
total_health = 100
|
||||
energy_light = -2
|
||||
energy_dark = 3
|
||||
if(GREEN_EYES)
|
||||
total_health = 100
|
||||
energy_light = 0.125
|
||||
energy_dark = 2
|
||||
if(ORANGE_EYES)
|
||||
total_health = 175
|
||||
energy_light = -0.5
|
||||
energy_dark = 0.25
|
||||
|
||||
H.maxHealth = total_health
|
||||
|
||||
H.health = H.maxHealth
|
||||
|
||||
/datum/species/shadekin/produceCopy(var/list/traits, var/mob/living/carbon/human/H, var/custom_base)
|
||||
|
||||
var/datum/species/shadekin/new_copy = ..()
|
||||
|
||||
new_copy.total_health = total_health
|
||||
|
||||
new_copy.energy_light = energy_light
|
||||
|
||||
new_copy.energy_dark = energy_dark
|
||||
|
||||
return new_copy
|
||||
@@ -547,3 +547,7 @@
|
||||
|
||||
/datum/species/proc/handle_falling(mob/living/carbon/human/H, atom/hit_atom, damage_min, damage_max, silent, planetary)
|
||||
return FALSE
|
||||
|
||||
/datum/species/proc/post_spawn_special(mob/living/carbon/human/H)
|
||||
return
|
||||
|
||||
|
||||
@@ -49,15 +49,15 @@
|
||||
target.bloodstr.add_reagent("numbenzyme",attack_damage)
|
||||
|
||||
/datum/unarmed_attack/claws/shadekin
|
||||
var/energy_gain = 3
|
||||
|
||||
/datum/unarmed_attack/claws/shadekin/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
|
||||
/datum/unarmed_attack/claws/shadekin/apply_effects(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
|
||||
..()
|
||||
user.shadekin_adjust_energy(energy_gain)
|
||||
if(!(target == user))
|
||||
user.shadekin_adjust_energy(attack_damage)
|
||||
|
||||
/datum/unarmed_attack/bite/sharp/shadekin
|
||||
var/energy_gain = 3
|
||||
|
||||
/datum/unarmed_attack/bite/sharp/shadekin/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
|
||||
/datum/unarmed_attack/bite/sharp/shadekin/apply_effects(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
|
||||
..()
|
||||
user.shadekin_adjust_energy(energy_gain)
|
||||
if(!(target == user))
|
||||
user.shadekin_adjust_energy(attack_damage)
|
||||
+8135
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user