mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 17:45:02 +01:00
Merge pull request #23671 from KorPhaeron/eyes_as_organs
Eyes As Organs
This commit is contained in:
@@ -329,7 +329,7 @@
|
||||
|
||||
/datum/crafting_recipe/flashlight_eyes
|
||||
name = "Flashlight Eyes"
|
||||
result = /obj/item/organ/cyberimp/eyes/flashlight
|
||||
result = /obj/item/organ/eyes/robotic/flashlight
|
||||
time = 10
|
||||
reqs = list(
|
||||
/obj/item/device/flashlight = 2,
|
||||
|
||||
@@ -41,13 +41,13 @@
|
||||
|
||||
create_internal_organs()
|
||||
|
||||
AddAbility(new/obj/effect/proc_holder/alien/nightvisiontoggle(null))
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/create_internal_organs()
|
||||
internal_organs += new /obj/item/organ/brain/alien
|
||||
internal_organs += new /obj/item/organ/alien/hivenode
|
||||
internal_organs += new /obj/item/organ/tongue/alien
|
||||
internal_organs += new /obj/item/organ/eyes/night_vision/alien
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/assess_threat() // beepsky won't hunt aliums
|
||||
@@ -151,40 +151,5 @@ Des: Removes all infected images from the alien.
|
||||
#undef HEAT_DAMAGE_LEVEL_2
|
||||
#undef HEAT_DAMAGE_LEVEL_3
|
||||
|
||||
|
||||
/mob/living/carbon/alien/update_sight()
|
||||
if(!client)
|
||||
return
|
||||
if(stat == DEAD)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
return
|
||||
|
||||
sight = SEE_MOBS
|
||||
if(nightvision)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else
|
||||
see_in_dark = 4
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if(client.eye != src)
|
||||
var/atom/A = client.eye
|
||||
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
|
||||
return
|
||||
|
||||
for(var/obj/item/organ/cyberimp/eyes/E in internal_organs)
|
||||
sight |= E.sight_flags
|
||||
if(E.dark_view)
|
||||
see_in_dark = max(see_in_dark, E.dark_view)
|
||||
if(E.see_invisible)
|
||||
see_invisible = min(see_invisible, E.see_invisible)
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
/mob/living/carbon/alien/can_hold_items()
|
||||
return has_fine_manipulation
|
||||
|
||||
@@ -286,26 +286,6 @@ Doesn't work on other aliens/AI.*/
|
||||
user.visible_message("<span class='alertealien'>[user] hurls out the contents of their stomach!</span>")
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/alien/nightvisiontoggle
|
||||
name = "Toggle Night Vision"
|
||||
desc = "Toggles Night Vision"
|
||||
plasma_cost = 0
|
||||
has_action = 0 // Has dedicated GUI button already
|
||||
|
||||
/obj/effect/proc_holder/alien/nightvisiontoggle/fire(mob/living/carbon/alien/user)
|
||||
if(!user.nightvision)
|
||||
user.see_in_dark = 8
|
||||
user.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
user.nightvision = 1
|
||||
user.hud_used.nightvisionicon.icon_state = "nightvision1"
|
||||
else if(user.nightvision == 1)
|
||||
user.see_in_dark = 4
|
||||
user.see_invisible = 45
|
||||
user.nightvision = 0
|
||||
user.hud_used.nightvisionicon.icon_state = "nightvision0"
|
||||
|
||||
return 1
|
||||
|
||||
/obj/effect/proc_holder/alien/sneak
|
||||
name = "Sneak"
|
||||
desc = "Blend into the shadows to stalk your prey."
|
||||
|
||||
@@ -529,21 +529,34 @@
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
return
|
||||
|
||||
see_invisible = initial(see_invisible)
|
||||
see_in_dark = initial(see_in_dark)
|
||||
sight = initial(sight)
|
||||
var/obj/item/organ/eyes/E = getorganslot("eye_sight")
|
||||
if(!E)
|
||||
update_tint()
|
||||
else
|
||||
see_invisible = E.see_invisible
|
||||
see_in_dark = E.see_in_dark
|
||||
sight |= E.sight_flags
|
||||
|
||||
if(client.eye != src)
|
||||
var/atom/A = client.eye
|
||||
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
|
||||
return
|
||||
|
||||
for(var/obj/item/organ/cyberimp/eyes/E in internal_organs)
|
||||
sight |= E.sight_flags
|
||||
if(E.dark_view)
|
||||
see_in_dark = max(see_in_dark,E.dark_view)
|
||||
if(E.see_invisible)
|
||||
see_invisible = min(see_invisible, E.see_invisible)
|
||||
if(glasses)
|
||||
var/obj/item/clothing/glasses/G = glasses
|
||||
sight |= G.vision_flags
|
||||
see_in_dark = max(G.darkness_view, see_in_dark)
|
||||
if(G.invis_override)
|
||||
see_invisible = G.invis_override
|
||||
else
|
||||
see_invisible = min(G.invis_view, see_invisible)
|
||||
if(dna)
|
||||
for(var/X in dna.mutations)
|
||||
var/datum/mutation/M = X
|
||||
if(M.name == XRAY)
|
||||
sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
see_in_dark = max(see_in_dark, 8)
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
@@ -568,9 +581,14 @@
|
||||
. += HT.tint
|
||||
if(wear_mask)
|
||||
. += wear_mask.tint
|
||||
for(var/obj/item/organ/cyberimp/eyes/E in internal_organs)
|
||||
|
||||
var/obj/item/organ/eyes/E = getorganslot("eye_sight")
|
||||
if(E)
|
||||
. += E.tint
|
||||
|
||||
else
|
||||
. += INFINITY
|
||||
|
||||
//this handles hud updates
|
||||
/mob/living/carbon/update_damage_hud()
|
||||
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
|
||||
/mob/living/carbon/get_eye_protection()
|
||||
var/number = ..()
|
||||
for(var/obj/item/organ/cyberimp/eyes/EFP in internal_organs)
|
||||
number += EFP.flash_protect
|
||||
|
||||
var/obj/item/organ/eyes/E = getorganslot("eye_sight")
|
||||
if(!E)
|
||||
number = INFINITY //Can't get flashed without eyes
|
||||
else
|
||||
number += E.flash_protect
|
||||
return number
|
||||
|
||||
/mob/living/carbon/get_ear_protection()
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
internal_organs += new /obj/item/organ/lungs()
|
||||
if(!(NOBLOOD in dna.species.species_traits))
|
||||
internal_organs += new /obj/item/organ/heart
|
||||
|
||||
internal_organs += new dna.species.mutanteyes()
|
||||
internal_organs += new /obj/item/organ/brain
|
||||
..()
|
||||
|
||||
@@ -764,17 +766,6 @@
|
||||
if(R)
|
||||
R.fields["name"] = newname
|
||||
|
||||
/mob/living/carbon/human/update_sight()
|
||||
if(!client)
|
||||
return
|
||||
if(stat == DEAD)
|
||||
sight = (SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
return
|
||||
|
||||
dna.species.update_sight(src)
|
||||
|
||||
/mob/living/carbon/human/get_total_tint()
|
||||
. = ..()
|
||||
if(glasses)
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
var/roundstart = 0 // can this mob be chosen at roundstart? (assuming the config option is checked?)
|
||||
var/default_color = "#FFF" // if alien colors are disabled, this is the color that will be used by that race
|
||||
|
||||
var/eyes = "eyes" // which eyes the race uses. at the moment, the only types of eyes are "eyes" (regular eyes) and "jelleyes" (three eyes)
|
||||
var/sexes = 1 // whether or not the race has sexual characteristics. at the moment this is only 0 for skeletons and shadows
|
||||
var/hair_color = null // this allows races to have specific hair colors... if null, it uses the H's hair/facial hair colors. if "mutcolor", it uses the H's mutant_color
|
||||
var/hair_alpha = 255 // the alpha used by the hair. 255 is completely solid, 0 is transparent.
|
||||
@@ -47,9 +46,6 @@
|
||||
var/damage_overlay_type = "human" //what kind of damage overlays (if any) appear on our species when wounded?
|
||||
var/fixed_mut_color = "" //to use MUTCOLOR with a fixed color that's independent of dna.feature["mcolor"]
|
||||
|
||||
var/invis_sight = SEE_INVISIBLE_LIVING
|
||||
var/darksight = 2
|
||||
|
||||
// species flags. these can be found in flags.dm
|
||||
var/list/species_traits = list()
|
||||
|
||||
@@ -65,6 +61,9 @@
|
||||
//Flight and floating
|
||||
var/override_float = 0
|
||||
|
||||
|
||||
//Eyes
|
||||
var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes
|
||||
///////////
|
||||
// PROCS //
|
||||
///////////
|
||||
@@ -242,6 +241,14 @@
|
||||
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart("head")
|
||||
|
||||
|
||||
// eyes
|
||||
var/has_eyes = TRUE
|
||||
|
||||
if(!H.getorgan(/obj/item/organ/eyes) && HD)
|
||||
standing += image("icon"='icons/mob/human_face.dmi', "icon_state" = "eyes_missing", "layer" = -BODY_LAYER)
|
||||
has_eyes = FALSE
|
||||
|
||||
if(!(H.disabilities & HUSK))
|
||||
// lipstick
|
||||
if(H.lip_style && (LIPS in species_traits) && HD)
|
||||
@@ -250,8 +257,8 @@
|
||||
standing += lips
|
||||
|
||||
// eyes
|
||||
if((EYECOLOR in species_traits) && HD)
|
||||
var/image/img_eyes = image("icon" = 'icons/mob/human_face.dmi', "icon_state" = "[eyes]", "layer" = -BODY_LAYER)
|
||||
if((EYECOLOR in species_traits) && HD && has_eyes)
|
||||
var/image/img_eyes = image("icon" = 'icons/mob/human_face.dmi', "icon_state" = "eyes", "layer" = -BODY_LAYER)
|
||||
img_eyes.color = "#" + H.eye_color
|
||||
standing += img_eyes
|
||||
|
||||
@@ -780,42 +787,6 @@
|
||||
else
|
||||
H.throw_alert("nutrition", /obj/screen/alert/starving)
|
||||
|
||||
|
||||
/datum/species/proc/update_sight(mob/living/carbon/human/H)
|
||||
H.sight = initial(H.sight)
|
||||
H.see_in_dark = darksight
|
||||
H.see_invisible = invis_sight
|
||||
|
||||
if(H.client.eye != H)
|
||||
var/atom/A = H.client.eye
|
||||
if(A.update_remote_sight(H)) //returns 1 if we override all other sight updates.
|
||||
return
|
||||
|
||||
for(var/obj/item/organ/cyberimp/eyes/E in H.internal_organs)
|
||||
H.sight |= E.sight_flags
|
||||
if(E.dark_view)
|
||||
H.see_in_dark = E.dark_view
|
||||
if(E.see_invisible)
|
||||
H.see_invisible = min(H.see_invisible, E.see_invisible)
|
||||
|
||||
if(H.glasses)
|
||||
var/obj/item/clothing/glasses/G = H.glasses
|
||||
H.sight |= G.vision_flags
|
||||
H.see_in_dark = max(G.darkness_view, H.see_in_dark)
|
||||
if(G.invis_override)
|
||||
H.see_invisible = G.invis_override
|
||||
else
|
||||
H.see_invisible = min(G.invis_view, H.see_invisible)
|
||||
|
||||
for(var/X in H.dna.mutations)
|
||||
var/datum/mutation/M = X
|
||||
if(M.name == XRAY)
|
||||
H.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
H.see_in_dark = max(H.see_in_dark, 8)
|
||||
|
||||
if(H.see_override) //Override all
|
||||
H.see_invisible = H.see_override
|
||||
|
||||
/datum/species/proc/update_health_hud(mob/living/carbon/human/H)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/datum/species/abductor
|
||||
name = "Abductor"
|
||||
id = "abductor"
|
||||
darksight = 3
|
||||
say_mod = "gibbers"
|
||||
sexes = 0
|
||||
species_traits = list(NOBLOOD,NOBREATH,VIRUSIMMUNE,NOGUNS)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
id = "jelly"
|
||||
default_color = "00FF90"
|
||||
say_mod = "chirps"
|
||||
eyes = "jelleyes"
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,NOBLOOD,VIRUSIMMUNE,TOXINLOVER)
|
||||
meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/slime
|
||||
exotic_blood = "slimejelly"
|
||||
@@ -99,10 +98,8 @@
|
||||
name = "Slimeperson"
|
||||
id = "slime"
|
||||
default_color = "00FFFF"
|
||||
darksight = 3
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,NOBLOOD,VIRUSIMMUNE, TOXINLOVER)
|
||||
say_mod = "says"
|
||||
eyes = "eyes"
|
||||
hair_color = "mutcolor"
|
||||
hair_alpha = 150
|
||||
ignored_by = list(/mob/living/simple_animal/slime)
|
||||
|
||||
@@ -2,42 +2,14 @@
|
||||
// Humans cursed to stay in the darkness, lest their life forces drain. They regain health in shadow and die in light.
|
||||
name = "???"
|
||||
id = "shadow"
|
||||
darksight = 8
|
||||
invis_sight = SEE_INVISIBLE_MINIMUM
|
||||
sexes = 0
|
||||
blacklisted = 1
|
||||
ignored_by = list(/mob/living/simple_animal/hostile/faithless)
|
||||
meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/shadow
|
||||
species_traits = list(NOBREATH,NOBLOOD,RADIMMUNE,VIRUSIMMUNE)
|
||||
dangerous_existence = 1
|
||||
var/datum/action/innate/shadow/darkvision/vision_toggle
|
||||
mutanteyes = /obj/item/organ/eyes/night_vision
|
||||
|
||||
/datum/action/innate/shadow/darkvision //Darkvision toggle so shadowpeople can actually see where darkness is
|
||||
name = "Toggle Darkvision"
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
background_icon_state = "bg_default"
|
||||
button_icon_state = "blind"
|
||||
|
||||
/datum/action/innate/shadow/darkvision/Activate()
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(H.see_in_dark < 8)
|
||||
H.see_in_dark = 8
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
H << "<span class='notice'>You adjust your vision to pierce the darkness.</span>"
|
||||
else
|
||||
H.see_in_dark = 2
|
||||
H.see_invisible = SEE_INVISIBLE_LIVING
|
||||
H << "<span class='notice'>You adjust your vision to recognize the shadows.</span>"
|
||||
|
||||
/datum/species/shadow/on_species_gain(mob/living/carbon/C, datum/species/old_species)
|
||||
. = ..()
|
||||
vision_toggle = new
|
||||
vision_toggle.Grant(C)
|
||||
|
||||
/datum/species/shadow/on_species_loss(mob/living/carbon/C)
|
||||
. = ..()
|
||||
if(vision_toggle)
|
||||
vision_toggle.Remove(C)
|
||||
|
||||
/datum/species/shadow/spec_life(mob/living/carbon/human/H)
|
||||
var/light_amount = 0
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
internal_organs += new /obj/item/organ/heart
|
||||
internal_organs += new /obj/item/organ/brain
|
||||
internal_organs += new /obj/item/organ/tongue
|
||||
internal_organs += new /obj/item/organ/eyes
|
||||
..()
|
||||
|
||||
/mob/living/carbon/monkey/movement_delay()
|
||||
|
||||
@@ -207,16 +207,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/night_vision/cast(list/targets,mob/user = usr)
|
||||
for(var/mob/living/target in targets)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(H.dna.species.invis_sight == SEE_INVISIBLE_LIVING)
|
||||
H.dna.species.invis_sight = SEE_INVISIBLE_NOLIGHTING
|
||||
name = "Toggle Nightvision \[ON]"
|
||||
else
|
||||
H.dna.species.invis_sight = SEE_INVISIBLE_LIVING
|
||||
name = "Toggle Nightvision \[OFF]"
|
||||
|
||||
else
|
||||
if(!iscarbon(target)) //Carbons should be toggling their vision via organ, this spell is used as a power for simple mobs
|
||||
if(target.see_invisible == SEE_INVISIBLE_LIVING)
|
||||
target.see_invisible = SEE_INVISIBLE_NOLIGHTING
|
||||
name = "Toggle Nightvision \[ON]"
|
||||
@@ -224,7 +215,6 @@
|
||||
target.see_invisible = SEE_INVISIBLE_LIVING
|
||||
name = "Toggle Nightvision \[OFF]"
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/statue/sentience_act()
|
||||
faction -= "neutral"
|
||||
|
||||
|
||||
@@ -180,14 +180,14 @@
|
||||
/////////////////////////////////////////
|
||||
|
||||
/datum/design/cyberimp_welding
|
||||
name = "Welding Shield implant"
|
||||
name = "Welding Shield Eyes"
|
||||
desc = "These reactive micro-shields will protect you from welders and flashes without obscuring your vision."
|
||||
id = "ci-welding"
|
||||
req_tech = list("materials" = 4, "biotech" = 4, "engineering" = 5, "plasmatech" = 4)
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
construction_time = 40
|
||||
materials = list(MAT_METAL = 600, MAT_GLASS = 400)
|
||||
build_path = /obj/item/organ/cyberimp/eyes/shield
|
||||
build_path = /obj/item/organ/eyes/robotic/shield
|
||||
category = list("Misc", "Medical Designs")
|
||||
|
||||
/datum/design/cyberimp_breather
|
||||
@@ -235,25 +235,25 @@
|
||||
category = list("Misc", "Medical Designs")
|
||||
|
||||
/datum/design/cyberimp_xray
|
||||
name = "X-Ray implant"
|
||||
name = "X-Ray eyes"
|
||||
desc = "These cybernetic eyes will give you X-ray vision. Blinking is futile."
|
||||
id = "ci-xray"
|
||||
req_tech = list("materials" = 7, "programming" = 5, "biotech" = 7, "magnets" = 5,"plasmatech" = 6)
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
construction_time = 60
|
||||
materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_SILVER = 600, MAT_GOLD = 600, MAT_PLASMA = 1000, MAT_URANIUM = 1000, MAT_DIAMOND = 2000)
|
||||
build_path = /obj/item/organ/cyberimp/eyes/xray
|
||||
build_path = /obj/item/organ/eyes/robotic/xray
|
||||
category = list("Misc", "Medical Designs")
|
||||
|
||||
/datum/design/cyberimp_thermals
|
||||
name = "Thermals implant"
|
||||
name = "Thermal eyes"
|
||||
desc = "These cybernetic eyes will give you Thermal vision. Vertical slit pupil included."
|
||||
id = "ci-thermals"
|
||||
req_tech = list("materials" = 6, "programming" = 4, "biotech" = 7, "magnets" = 5,"plasmatech" = 4)
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
construction_time = 60
|
||||
materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_SILVER = 600, MAT_GOLD = 600, MAT_PLASMA = 1000, MAT_DIAMOND = 2000)
|
||||
build_path = /obj/item/organ/cyberimp/eyes/thermals
|
||||
build_path = /obj/item/organ/eyes/robotic/thermals
|
||||
category = list("Misc", "Medical Designs")
|
||||
|
||||
/datum/design/cyberimp_antidrop
|
||||
|
||||
@@ -145,6 +145,9 @@
|
||||
LB.brainmob.container = LB
|
||||
LB.brainmob.stat = DEAD
|
||||
|
||||
/obj/item/organ/eyes/transfer_to_limb(obj/item/bodypart/head/LB, mob/living/carbon/human/C)
|
||||
LB.eyes = src
|
||||
..()
|
||||
|
||||
/obj/item/bodypart/chest/drop_limb(special)
|
||||
return
|
||||
@@ -289,7 +292,6 @@
|
||||
H.hair_style = hair_style
|
||||
H.facial_hair_color = facial_hair_color
|
||||
H.facial_hair_style = facial_hair_style
|
||||
H.eye_color = eye_color
|
||||
H.lip_style = lip_style
|
||||
H.lip_color = lip_color
|
||||
if(real_name)
|
||||
|
||||
@@ -25,8 +25,9 @@
|
||||
var/facial_hair_color = "000"
|
||||
var/facial_hair_style = "Shaved"
|
||||
//Eye Colouring
|
||||
var/eyes = "eyes"
|
||||
var/eye_color = ""
|
||||
|
||||
var/obj/item/organ/eyes/eyes = null
|
||||
|
||||
var/lip_style = null
|
||||
var/lip_color = "white"
|
||||
|
||||
@@ -61,8 +62,6 @@
|
||||
real_name = "Unknown"
|
||||
hair_style = "Bald"
|
||||
facial_hair_style = "Shaved"
|
||||
eyes = "eyes"
|
||||
eye_color = ""
|
||||
lip_style = null
|
||||
|
||||
else if(!animal_origin)
|
||||
@@ -106,14 +105,6 @@
|
||||
else
|
||||
lip_style = null
|
||||
lip_color = "white"
|
||||
// eyes
|
||||
if(EYECOLOR in S.species_traits)
|
||||
eyes = S.eyes
|
||||
eye_color = H.eye_color
|
||||
else
|
||||
eyes = "eyes"
|
||||
eye_color = ""
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/bodypart/head/update_icon_dropped()
|
||||
@@ -167,9 +158,12 @@
|
||||
standing += lips
|
||||
|
||||
// eyes
|
||||
if(eye_color)
|
||||
var/image/img_eyes = image("icon" = 'icons/mob/human_face.dmi', "icon_state" = "[eyes]", "layer" = -BODY_LAYER, "dir"=SOUTH)
|
||||
img_eyes.color = "#" + eye_color
|
||||
if(!eyes)
|
||||
standing += image("icon"='icons/mob/human_face.dmi', "icon_state" = "eyes_missing", "layer" = -BODY_LAYER, "dir"=SOUTH)
|
||||
|
||||
else if(eyes.eye_color)
|
||||
var/image/img_eyes = image("icon" = 'icons/mob/human_face.dmi', "icon_state" = "eyes", "layer" = -BODY_LAYER, "dir"=SOUTH)
|
||||
img_eyes.color = "#" + eyes.eye_color
|
||||
standing += img_eyes
|
||||
|
||||
return standing
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
implements = list(/obj/item/weapon/hemostat = 100, /obj/item/weapon/screwdriver = 45, /obj/item/weapon/pen = 25)
|
||||
time = 64
|
||||
|
||||
/datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target)
|
||||
var/obj/item/organ/eyes/E = target.getorganslot("eye_sight")
|
||||
if(!E)
|
||||
user << "It's hard to do surgery on someones eyes when they don't have any."
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/fix_eyes/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] begins to fix [target]'s eyes.", "<span class='notice'>You begin to fix [target]'s eyes...</span>")
|
||||
|
||||
@@ -21,7 +27,7 @@
|
||||
target.cure_nearsighted()
|
||||
target.blur_eyes(35) //this will fix itself slowly.
|
||||
target.set_eye_damage(0)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/surgery_step/fix_eyes/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if(target.getorgan(/obj/item/organ/brain))
|
||||
@@ -29,4 +35,4 @@
|
||||
target.adjustBrainLoss(100)
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.</span>", "<span class='warning'>You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/item/organ/cyberimp/eyes
|
||||
name = "cybernetic eyes"
|
||||
/obj/item/organ/cyberimp/eyes/hud
|
||||
name = "cybernetic hud"
|
||||
desc = "artificial photoreceptors with specialized functionality"
|
||||
icon_state = "eye_implant"
|
||||
implant_overlay = "eye_implant_overlay"
|
||||
@@ -7,87 +7,6 @@
|
||||
zone = "eyes"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
var/sight_flags = 0
|
||||
var/dark_view = 0
|
||||
var/tint = 0
|
||||
var/eye_color = "fff"
|
||||
var/old_eye_color = "fff"
|
||||
var/flash_protect = 0
|
||||
var/see_invisible = 0
|
||||
var/aug_message = "Your vision is augmented!"
|
||||
|
||||
|
||||
/obj/item/organ/cyberimp/eyes/Insert(var/mob/living/carbon/M, var/special = 0)
|
||||
..()
|
||||
if(ishuman(owner) && eye_color)
|
||||
var/mob/living/carbon/human/HMN = owner
|
||||
old_eye_color = HMN.eye_color
|
||||
HMN.eye_color = eye_color
|
||||
HMN.regenerate_icons()
|
||||
if(aug_message && !special)
|
||||
owner << "<span class='notice'>[aug_message]</span>"
|
||||
M.update_tint()
|
||||
owner.update_sight()
|
||||
|
||||
/obj/item/organ/cyberimp/eyes/Remove(var/mob/living/carbon/M, var/special = 0)
|
||||
M.sight ^= sight_flags
|
||||
if(ishuman(M) && eye_color)
|
||||
var/mob/living/carbon/human/HMN = owner
|
||||
HMN.eye_color = old_eye_color
|
||||
HMN.regenerate_icons()
|
||||
M.update_tint()
|
||||
..()
|
||||
|
||||
/obj/item/organ/cyberimp/eyes/emp_act(severity)
|
||||
if(!owner)
|
||||
return
|
||||
if(severity > 1)
|
||||
if(prob(10 * severity))
|
||||
return
|
||||
owner << "<span class='warning'>Static obfuscates your vision!</span>"
|
||||
owner.flash_act(visual = 1)
|
||||
|
||||
/obj/item/organ/cyberimp/eyes/xray
|
||||
name = "X-ray implant"
|
||||
desc = "These cybernetic eye implants will give you X-ray vision. Blinking is futile."
|
||||
eye_color = "000"
|
||||
implant_color = "#000000"
|
||||
origin_tech = "materials=4;programming=4;biotech=6;magnets=4"
|
||||
dark_view = 8
|
||||
sight_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS
|
||||
|
||||
/obj/item/organ/cyberimp/eyes/thermals
|
||||
name = "Thermals implant"
|
||||
desc = "These cybernetic eye implants will give you Thermal vision. Vertical slit pupil included."
|
||||
eye_color = "FC0"
|
||||
implant_color = "#FFCC00"
|
||||
origin_tech = "materials=5;programming=4;biotech=4;magnets=4;syndicate=1"
|
||||
sight_flags = SEE_MOBS
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
flash_protect = -1
|
||||
dark_view = 8
|
||||
aug_message = "You see prey everywhere you look..."
|
||||
|
||||
/obj/item/organ/cyberimp/eyes/flashlight
|
||||
name = "flashlight eyes"
|
||||
desc = "It's two flashlights rigged together with some wire. Why would you put these in someones head?"
|
||||
eye_color ="fee5a3"
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "flashlight_eyes"
|
||||
flash_protect = 2
|
||||
tint = INFINITY
|
||||
implant_color = "#FFFF00"
|
||||
aug_message = "You've become a beacon of light, but ironically can see nothing at all."
|
||||
|
||||
/obj/item/organ/cyberimp/eyes/flashlight/Insert(var/mob/living/carbon/M, var/special = 0)
|
||||
..()
|
||||
M.AddLuminosity(15)
|
||||
|
||||
|
||||
/obj/item/organ/cyberimp/eyes/flashlight/Remove(var/mob/living/carbon/M, var/special = 0)
|
||||
M.AddLuminosity(-15)
|
||||
..()
|
||||
|
||||
// HUD implants
|
||||
/obj/item/organ/cyberimp/eyes/hud
|
||||
name = "HUD implant"
|
||||
@@ -112,32 +31,11 @@
|
||||
/obj/item/organ/cyberimp/eyes/hud/medical
|
||||
name = "Medical HUD implant"
|
||||
desc = "These cybernetic eye implants will display a medical HUD over everything you see."
|
||||
eye_color = "0ff"
|
||||
implant_color = "#00FFFF"
|
||||
origin_tech = "materials=4;programming=4;biotech=4"
|
||||
aug_message = "You suddenly see health bars floating above people's heads..."
|
||||
HUD_type = DATA_HUD_MEDICAL_ADVANCED
|
||||
|
||||
/obj/item/organ/cyberimp/eyes/hud/security
|
||||
name = "Security HUD implant"
|
||||
desc = "These cybernetic eye implants will display a security HUD over everything you see."
|
||||
eye_color = "d00"
|
||||
implant_color = "#CC0000"
|
||||
origin_tech = "materials=4;programming=4;biotech=3;combat=3"
|
||||
aug_message = "Job indicator icons pop up in your vision. That is not a certified surgeon..."
|
||||
HUD_type = DATA_HUD_SECURITY_ADVANCED
|
||||
|
||||
|
||||
// Welding shield implant
|
||||
/obj/item/organ/cyberimp/eyes/shield
|
||||
name = "welding shield implant"
|
||||
desc = "These reactive micro-shields will protect you from welders and flashes without obscuring your vision."
|
||||
slot = "eye_shield"
|
||||
origin_tech = "materials=4;biotech=3;engineering=4;plasmatech=3"
|
||||
implant_color = "#101010"
|
||||
flash_protect = 2
|
||||
aug_message = null
|
||||
eye_color = null
|
||||
|
||||
/obj/item/organ/cyberimp/eyes/shield/emp_act(severity)
|
||||
return
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
for(var/obj/item/I in stored_items)
|
||||
owner << "<span class='notice'>Your [owner.get_held_index_name(owner.get_held_index_of_item(I))]'s grip tightens.</span>"
|
||||
I.flags |= NODROP
|
||||
|
||||
|
||||
else
|
||||
release_items()
|
||||
owner << "<span class='notice'>Your hands relax...</span>"
|
||||
@@ -157,8 +157,8 @@
|
||||
/obj/item/weapon/storage/box/cyber_implants/bundle
|
||||
name = "boxed cybernetic implants"
|
||||
var/list/boxed = list(
|
||||
/obj/item/organ/cyberimp/eyes/xray,
|
||||
/obj/item/organ/cyberimp/eyes/thermals,
|
||||
/obj/item/organ/eyes/robotic/xray,
|
||||
/obj/item/organ/eyes/robotic/thermals,
|
||||
/obj/item/organ/cyberimp/brain/anti_stun,
|
||||
/obj/item/organ/cyberimp/chest/reviver)
|
||||
var/amount = 5
|
||||
|
||||
@@ -728,3 +728,139 @@
|
||||
if(!T)
|
||||
T = new()
|
||||
T.Insert(src)
|
||||
|
||||
if(!getorganslot("eye_sight"))
|
||||
var/obj/item/organ/eyes/E
|
||||
|
||||
if(dna && dna.species && dna.species.mutanteyes)
|
||||
E = new dna.species.mutanteyes()
|
||||
|
||||
else
|
||||
E = new()
|
||||
E.Insert(src)
|
||||
|
||||
//Eyes
|
||||
|
||||
/obj/item/organ/eyes
|
||||
name = "eyes"
|
||||
icon_state = "eyeballs"
|
||||
desc = "I see you!"
|
||||
zone = "eyes"
|
||||
slot = "eye_sight"
|
||||
|
||||
var/sight_flags = 0
|
||||
var/see_in_dark = 2
|
||||
var/tint = 0
|
||||
var/eye_color = "fff"
|
||||
var/old_eye_color = "fff"
|
||||
var/flash_protect = 0
|
||||
var/see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
/obj/item/organ/eyes/Insert(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(ishuman(owner) && eye_color)
|
||||
var/mob/living/carbon/human/HMN = owner
|
||||
old_eye_color = HMN.eye_color
|
||||
HMN.eye_color = eye_color
|
||||
HMN.regenerate_icons()
|
||||
M.update_tint()
|
||||
owner.update_sight()
|
||||
|
||||
/obj/item/organ/eyes/Remove(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(ishuman(M) && eye_color)
|
||||
var/mob/living/carbon/human/HMN = M
|
||||
HMN.eye_color = old_eye_color
|
||||
HMN.regenerate_icons()
|
||||
M.update_tint()
|
||||
M.update_sight()
|
||||
|
||||
/obj/item/organ/eyes/night_vision
|
||||
name = "shadow eyes"
|
||||
desc = "A spooky set of eyes that can see in the dark."
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
actions_types = list(/datum/action/item_action/organ_action/use)
|
||||
var/night_vision = TRUE
|
||||
|
||||
/obj/item/organ/eyes/night_vision/ui_action_click()
|
||||
if(night_vision)
|
||||
see_in_dark = 4
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
night_vision = FALSE
|
||||
else
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
night_vision = TRUE
|
||||
|
||||
/obj/item/organ/eyes/night_vision/alien
|
||||
name = "alien eyes"
|
||||
desc = "It turned out they had them after all!"
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
sight_flags = SEE_MOBS
|
||||
|
||||
|
||||
///Robotic
|
||||
|
||||
/obj/item/organ/eyes/robotic
|
||||
name = "robotic eyes"
|
||||
icon_state = "cybernetic_eyeballs"
|
||||
desc = "Your vision is augmented."
|
||||
|
||||
/obj/item/organ/eyes/robotic/emp_act(severity)
|
||||
if(!owner)
|
||||
return
|
||||
if(severity > 1)
|
||||
if(prob(10 * severity))
|
||||
return
|
||||
owner << "<span class='warning'>Static obfuscates your vision!</span>"
|
||||
owner.flash_act(visual = 1)
|
||||
|
||||
/obj/item/organ/eyes/robotic/xray
|
||||
name = "X-ray eyes"
|
||||
desc = "These cybernetic eyes will give you X-ray vision. Blinking is futile."
|
||||
eye_color = "000"
|
||||
see_in_dark = 8
|
||||
sight_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS
|
||||
|
||||
/obj/item/organ/eyes/robotic/thermals
|
||||
name = "Thermals eyes"
|
||||
desc = "These cybernetic eye implants will give you Thermal vision. Vertical slit pupil included."
|
||||
eye_color = "FC0"
|
||||
origin_tech = "materials=5;programming=4;biotech=4;magnets=4;syndicate=1"
|
||||
sight_flags = SEE_MOBS
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
flash_protect = -1
|
||||
see_in_dark = 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 someones head?"
|
||||
eye_color ="fee5a3"
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "flashlight_eyes"
|
||||
flash_protect = 2
|
||||
tint = INFINITY
|
||||
|
||||
/obj/item/organ/eyes/robotic/flashlight/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/organ/eyes/robotic/flashlight/Insert(var/mob/living/carbon/M, var/special = 0)
|
||||
..()
|
||||
M.AddLuminosity(15)
|
||||
|
||||
|
||||
/obj/item/organ/eyes/robotic/flashlight/Remove(var/mob/living/carbon/M, var/special = 0)
|
||||
M.AddLuminosity(-15)
|
||||
..()
|
||||
|
||||
// Welding shield implant
|
||||
/obj/item/organ/eyes/robotic/shield
|
||||
name = "shielded robotic eyes"
|
||||
desc = "These reactive micro-shields will protect you from welders and flashes without obscuring your vision."
|
||||
origin_tech = "materials=4;biotech=3;engineering=4;plasmatech=3"
|
||||
flash_protect = 2
|
||||
|
||||
/obj/item/organ/eyes/robotic/shield/emp_act(severity)
|
||||
return
|
||||
@@ -1131,15 +1131,15 @@ var/list/uplink_items = list() // Global list so we only initialize this once.
|
||||
|
||||
|
||||
/datum/uplink_item/cyber_implants/thermals
|
||||
name = "Thermal Vision Implant"
|
||||
name = "Thermal eyes"
|
||||
desc = "These cybernetic eyes will give you thermal vision. Comes with a free autoimplanter."
|
||||
item = /obj/item/organ/cyberimp/eyes/thermals
|
||||
item = /obj/item/organ/eyes/robotic/thermals
|
||||
cost = 8
|
||||
|
||||
/datum/uplink_item/cyber_implants/xray
|
||||
name = "X-Ray Vision Implant"
|
||||
desc = "These cybernetic eyes will give you X-ray vision. Comes with an autoimplanter."
|
||||
item = /obj/item/organ/cyberimp/eyes/xray
|
||||
item = /obj/item/organ/eyes/robotic/xray
|
||||
cost = 10
|
||||
|
||||
/datum/uplink_item/cyber_implants/antistun
|
||||
|
||||
Reference in New Issue
Block a user