Added Thermals and emp_act(). Tweaked some related code.

This commit is contained in:
xxalpha
2015-03-08 20:19:02 +00:00
parent b1e340b19b
commit fc81daee07
8 changed files with 49 additions and 19 deletions
+1 -1
View File
@@ -156,7 +156,7 @@
/mob/living/carbon/proc/eyecheck()
return 0
return locate(/obj/item/organ/cybernetic_implant/eyes/thermals,internal_organs) ? -1 : 0
/mob/living/carbon/proc/tintcheck()
return 0
@@ -284,7 +284,7 @@
if(R)
msg += "<a href='?src=\ref[src];hud=m;evaluation=1'>\[Medical evaluation\]</a><br>"
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security))
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || locate(H.internal_organs,/obj/item/organ/cybernetic_implant/eyes/security_hud))
if(!user.stat && user != src) //|| !user.canmove || user.restrained()) Fluff: Sechuds have eye-tracking technology and sets 'arrest' to people that the wearer looks and blinks at.
var/criminal = "None"
@@ -78,7 +78,7 @@
///eyecheck()
///Returns a number between -1 to 2
/mob/living/carbon/human/eyecheck()
var/number = 0
var/number = locate(/obj/item/organ/cybernetic_implant/eyes/thermals,internal_organs) ? -1 : 0
if(istype(src.head, /obj/item/clothing/head)) //are they wearing something on their head
var/obj/item/clothing/head/HFP = src.head //if yes gets the flash protection value from that item
number += HFP.flash_protect
@@ -510,9 +510,14 @@
H.see_in_dark = 8
if(!H.druggy) H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
else
if(!locate(SEE_TURFS|SEE_MOBS|SEE_OBJS,H.permanent_sight_flags))
H.sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
H.see_in_dark = darksight
if(!locate(SEE_TURFS,H.permanent_sight_flags))
H.sight &= ~SEE_TURFS
if(!locate(SEE_MOBS,H.permanent_sight_flags))
H.sight &= ~SEE_MOBS
if(!locate(SEE_OBJS,H.permanent_sight_flags))
H.sight &= ~SEE_OBJS
H.see_in_dark = (H.sight == SEE_TURFS|SEE_MOBS|SEE_OBJS) ? 8 : darksight
var/see_temp = H.see_invisible
H.see_invisible = invis_sight
+5 -2
View File
@@ -561,11 +561,14 @@
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else
if(!locate(SEE_TURFS|SEE_MOBS|SEE_OBJS,permanent_sight_flags))
if(!locate(SEE_TURFS,permanent_sight_flags))
sight &= ~SEE_TURFS
if(!locate(SEE_MOBS,permanent_sight_flags))
sight &= ~SEE_MOBS
if(!locate(SEE_OBJS,permanent_sight_flags))
sight &= ~SEE_OBJS
see_in_dark = 2
see_in_dark = (sight == SEE_TURFS|SEE_MOBS|SEE_OBJS) ? 8 : 2 //Xray flag combo
see_invisible = SEE_INVISIBLE_LIVING
if(see_override)
see_invisible = see_override
@@ -33,7 +33,6 @@
/obj/item/organ/cybernetic_implant/eyes/medical_hud
name = "medical hud implant"
desc = "These cybernetic eyes will display a permanent medical HUD over everything you see. Wiggle eyes to control."
icon_state = "eye_implant"
eye_color = "0ff"
implant_color = "#00FFFF"
@@ -44,13 +43,11 @@
var/datum/atom_hud/H = huds[DATA_HUD_MEDICAL_ADVANCED]
H.add_hud_to(owner)
owner.permanent_huds |= H
update_eye_color()
/obj/item/organ/cybernetic_implant/eyes/security_hud
name = "security hud implant"
desc = "These cybernetic eyes will display a permanent security HUD over everything you see. Wiggle eyes to control."
icon_state = "eye_implant"
eye_color = "d00"
implant_color = "#CC0000"
@@ -61,13 +58,11 @@
var/datum/atom_hud/H = huds[DATA_HUD_SECURITY_ADVANCED]
H.add_hud_to(owner)
owner.permanent_huds |= H
update_eye_color()
/obj/item/organ/cybernetic_implant/eyes/xray
name = "xray implant"
desc = "These cybernetic eyes will enhance your vision with X-Ray. Blinking is futile."
icon_state = "eye_implant"
desc = "These cybernetic eyes will give you X-ray vision. Blinking is futile."
eye_color = "000"
implant_color = "#000000"
@@ -75,8 +70,35 @@
if(!owner)
return
owner.sight |= SEE_MOBS|SEE_OBJS|SEE_TURFS
owner.see_in_dark = 8
owner.permanent_sight_flags |= SEE_MOBS|SEE_OBJS|SEE_TURFS
owner.sight |= SEE_MOBS
owner.sight |= SEE_OBJS
owner.sight |= SEE_TURFS
owner.permanent_sight_flags |= SEE_MOBS
owner.permanent_sight_flags |= SEE_OBJS
owner.permanent_sight_flags |= SEE_TURFS
update_eye_color()
update_eye_color()
/obj/item/organ/cybernetic_implant/eyes/thermals
name = "thermals implant"
desc = "These cybernetic eyes will give you Thermal vision. Vertical slit pupil included."
eye_color = "FC0"
implant_color = "#FFCC00"
/obj/item/organ/cybernetic_implant/eyes/thermals/function()
if(!owner)
return
owner.sight |= SEE_MOBS
owner.permanent_sight_flags |= SEE_MOBS
update_eye_color()
/obj/item/organ/cybernetic_implant/eyes/emp_act(severity)
if(severity > 1)
if(prob(5))
return
var/save_sight = owner.sight
owner.sight &= 0
owner.disabilities |= BLIND
spawn(50)
owner.sight |= save_sight
owner.disabilities &= ~BLIND