heterochromia

This commit is contained in:
Timothy Teakettle
2020-08-28 18:30:28 +01:00
parent 9799efcef2
commit 1d943a34ef
19 changed files with 209 additions and 107 deletions
+30 -13
View File
@@ -26,8 +26,10 @@
var/sight_flags = 0
var/see_in_dark = 2
var/tint = 0
var/eye_color = "" //set to a hex code to override a mob's eye color
var/old_eye_color = "fff"
var/left_eye_color = "" //set to a hex code to override a mob's eye color
var/right_eye_color = ""
var/old_left_eye_color = "fff"
var/old_right_eye_color = "fff"
var/flash_protect = 0
var/see_invisible = SEE_INVISIBLE_LIVING
var/lighting_alpha
@@ -44,11 +46,19 @@
owner.become_blind(EYE_DAMAGE)
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
old_eye_color = H.eye_color
if(eye_color)
H.eye_color = eye_color
old_left_eye_color = H.left_eye_color
old_right_eye_color = H.right_eye_color
if(left_eye_color)
H.left_eye_color = left_eye_color
else
eye_color = H.eye_color
left_eye_color = H.left_eye_color
if(right_eye_color)
H.right_eye_color = right_eye_color
else
right_eye_color = H.right_eye_color
if(!special)
H.dna?.species?.handle_body(H) //regenerate eyeballs overlays.
M.update_tint()
@@ -64,9 +74,10 @@
C.clear_fullscreen("eye_damage")
if(BLIND_VISION_THREE)
C.cure_blind(EYE_DAMAGE)
if(ishuman(C) && eye_color)
if(ishuman(C) && left_eye_color && right_eye_color)
var/mob/living/carbon/human/H = C
H.eye_color = old_eye_color
H.left_eye_color = old_left_eye_color
H.right_eye_color = old_right_eye_color
if(!special)
H.dna.species.handle_body(H)
if(!special)
@@ -162,14 +173,16 @@
/obj/item/organ/eyes/robotic/xray
name = "\improper X-ray eyes"
desc = "These cybernetic eyes will give you X-ray vision. Blinking is futile."
eye_color = "000"
left_eye_color = "000"
right_eye_color = "000"
see_in_dark = 8
sight_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS
/obj/item/organ/eyes/robotic/thermals
name = "thermal eyes"
desc = "These cybernetic eye implants will give you thermal vision. Vertical slit pupil included."
eye_color = "FC0"
left_eye_color = "FC0"
right_eye_color = "FC0"
sight_flags = SEE_MOBS
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
flash_protect = -1
@@ -178,7 +191,8 @@
/obj/item/organ/eyes/robotic/flashlight
name = "flashlight eyes"
desc = "It's two flashlights rigged together with some wire. Why would you put these in someone's head?"
eye_color ="fee5a3"
left_eye_color ="fee5a3"
right_eye_color ="fee5a3"
icon = 'icons/obj/lighting.dmi'
icon_state = "flashlight_eyes"
flash_protect = 2
@@ -219,7 +233,8 @@
/obj/item/organ/eyes/robotic/glow
name = "High Luminosity Eyes"
desc = "Special glowing eyes, used by snowflakes who want to be special."
eye_color = "000"
left_eye_color = "000"
right_eye_color = "000"
actions_types = list(/datum/action/item_action/organ_action/use, /datum/action/item_action/organ_action/toggle)
var/current_color_string = "#ffffff"
var/active = FALSE
@@ -278,7 +293,9 @@
/obj/item/organ/eyes/robotic/glow/proc/assume_rgb(newcolor)
current_color_string = newcolor
eye_color = RGB2EYECOLORSTRING(current_color_string)
var/current_color = RGB2EYECOLORSTRING(current_color_string)
left_eye_color = current_color
right_eye_color = current_color
sync_light_effects()
cycle_mob_overlay()
if(!QDELETED(owner) && ishuman(owner)) //Other carbon mobs don't have eye color.