Merge pull request #8190 from xxalpha/cyberimplants

Cybernetic Implants
This commit is contained in:
Swag McYolosteinen
2015-03-21 13:19:26 +01:00
14 changed files with 403 additions and 10 deletions
+6
View File
@@ -190,6 +190,12 @@
if(prob(20))
src << "<span class='notice'>Something bright flashes in the corner of your vision!</span>"
/mob/living/carbon/proc/eyecheck()
var/obj/item/cybernetic_implant/eyes/EFP = locate() in src
if(EFP)
return EFP.flash_protect
return 0
/mob/living/carbon/proc/tintcheck()
return 0
@@ -266,7 +266,8 @@
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(istype(H.glasses, /obj/item/clothing/glasses/hud))
var/obj/item/cybernetic_implant/eyes/hud/CIH = locate(/obj/item/cybernetic_implant/eyes/hud) in internal_organs
if(istype(H.glasses, /obj/item/clothing/glasses/hud) || CIH)
var/perpname = get_face_name(get_id_name(""))
if(perpname)
var/datum/data/record/R = find_record("name", perpname, data_core.general)
@@ -274,7 +275,7 @@
msg += "<span class = 'deptradio'>Rank:</span> [R.fields["rank"]]<br>"
msg += "<a href='?src=\ref[src];hud=1;photo_front=1'>\[Front photo\]</a> "
msg += "<a href='?src=\ref[src];hud=1;photo_side=1'>\[Side photo\]</a><br>"
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(CIH,/obj/item/cybernetic_implant/eyes/hud/medical))
if(R)
var/health = R.fields["p_stat"]
msg += "<a href='?src=\ref[src];hud=m;p_stat=1'>\[[health]\]</a>"
@@ -284,7 +285,8 @@
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) || istype(CIH,/obj/item/cybernetic_implant/eyes/hud/security))
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"
@@ -88,6 +88,9 @@
if(istype(src.wear_mask, /obj/item/clothing/mask)) //mask
var/obj/item/clothing/mask/MFP = src.wear_mask
number += MFP.flash_protect
var/obj/item/cybernetic_implant/eyes/EFP = locate() in src
if(EFP)
number += EFP.flash_protect
return number
/mob/living/carbon/human/check_ear_prot()
@@ -510,10 +510,16 @@
H.see_in_dark = 8
if(!H.druggy) H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
else
H.sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
if(!(SEE_TURFS in H.permanent_sight_flags))
H.sight &= ~SEE_TURFS
if(!(SEE_MOBS in H.permanent_sight_flags))
H.sight &= ~SEE_MOBS
if(!(SEE_OBJS in 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
H.see_in_dark = darksight
if(H.seer)
H.see_invisible = SEE_INVISIBLE_OBSERVER
+8 -4
View File
@@ -558,10 +558,14 @@
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else
sight &= ~SEE_TURFS
sight &= ~SEE_MOBS
sight &= ~SEE_OBJS
see_in_dark = 2
if(!(SEE_TURFS in permanent_sight_flags))
sight &= ~SEE_TURFS
if(!(SEE_MOBS in permanent_sight_flags))
sight &= ~SEE_MOBS
if(!(SEE_OBJS in permanent_sight_flags))
sight &= ~SEE_OBJS
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
+4 -1
View File
@@ -148,4 +148,7 @@
var/obj/control_object //Used by admins to possess objects. All mobs should have this var
var/atom/movable/remote_control //Calls relaymove() to whatever it is
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/list/permanent_huds = list()
var/list/permanent_sight_flags = list()