diff --git a/_maps/RandomZLevels/caves.dmm b/_maps/RandomZLevels/caves.dmm index 07f9df788c2..19b2c6579bf 100644 --- a/_maps/RandomZLevels/caves.dmm +++ b/_maps/RandomZLevels/caves.dmm @@ -2374,7 +2374,7 @@ info = "
CARAVAN SERVICES

Quality service since 2205


SHIPMENT CONTENTS:


4 scattershot rifles
6 grenades
1 laser rifle
1 blowup doll"; name = "Shipment Receipt" }, -/obj/item/organ/cyberimp/eyes/thermals, +/obj/item/organ/eyes/robotic/thermals, /obj/item/weapon/gun/energy/laser/captain/scattershot, /obj/item/slimepotion/fireproof, /turf/open/floor/plating/asteroid/basalt{ diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm index 0c02ab22dad..e2bfe128741 100644 --- a/code/_onclick/hud/alien.dm +++ b/code/_onclick/hud/alien.dm @@ -10,17 +10,6 @@ var/mob/living/carbon/alien/humanoid/hunter/AH = usr AH.toggle_leap() -/obj/screen/alien/nightvision - name = "toggle night-vision" - icon_state = "nightvision1" - screen_loc = ui_alien_nightvision - -/obj/screen/alien/nightvision/Click() - var/mob/living/carbon/alien/A = usr - var/obj/effect/proc_holder/alien/nightvisiontoggle/T = locate() in A.abilities - if(T) - T.fire(A) - /obj/screen/alien/plasma_display icon = 'icons/mob/screen_gen.dmi' icon_state = "power_display2" @@ -105,9 +94,6 @@ healths = new /obj/screen/healths/alien() infodisplay += healths - nightvisionicon = new /obj/screen/alien/nightvision() - infodisplay += nightvisionicon - alien_plasma_display = new /obj/screen/alien/plasma_display() infodisplay += alien_plasma_display diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm index 4c04cc363ac..0879ec8f313 100644 --- a/code/_onclick/hud/alien_larva.dm +++ b/code/_onclick/hud/alien_larva.dm @@ -10,9 +10,6 @@ healths = new /obj/screen/healths/alien() infodisplay += healths - nightvisionicon = new /obj/screen/alien/nightvision() - nightvisionicon.screen_loc = ui_alien_nightvision - infodisplay += nightvisionicon alien_queen_finder = new /obj/screen/alien/alien_queen_finder() infodisplay += alien_queen_finder pull_icon = new /obj/screen/pull() diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm index 1644c4325da..eb1f6626c06 100644 --- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm +++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm @@ -12,54 +12,25 @@ /obj/effect/proc_holder/changeling/augmented_eyesight/sting_action(mob/living/carbon/human/user) if(!istype(user)) return - if(user.getorgan(/obj/item/organ/cyberimp/eyes/thermals/ling)) - user << "Our eyes are protected from flashes." - var/obj/item/organ/cyberimp/eyes/O = new /obj/item/organ/cyberimp/eyes/shield/ling() - O.Insert(user) - + var/obj/item/organ/eyes/E = user.getorganslot("eye_sight") + if(E) + if(E.flash_protect) + E.sight_flags |= SEE_MOBS + E.flash_protect = -1 + user << "We adjust our eyes to sense prey through walls." + else + E.sight_flags -= SEE_MOBS + E.flash_protect = 2 + user << "We adjust our eyes to protect them from bright lights." else - var/obj/item/organ/cyberimp/eyes/O = new /obj/item/organ/cyberimp/eyes/thermals/ling() - O.Insert(user) + user << "We can't adjust our eyes if we don't have any!" + + return 1 /obj/effect/proc_holder/changeling/augmented_eyesight/on_refund(mob/user) - var/obj/item/organ/cyberimp/eyes/O = user.getorganslot("eye_ling") - if(O) - O.Remove(user) - qdel(O) - - -/obj/item/organ/cyberimp/eyes/shield/ling - name = "protective membranes" - desc = "These variable transparency organic membranes will protect you from welders and flashes and heal your eye damage." - icon_state = "ling_eyeshield" - eye_color = null - implant_overlay = null - slot = "eye_ling" - status = ORGAN_ORGANIC - -/obj/item/organ/cyberimp/eyes/shield/ling/on_life() - ..() - if(owner.eye_blind>1 || (owner.eye_blind && owner.stat !=UNCONSCIOUS) || owner.eye_damage || owner.eye_blurry || (owner.disabilities & NEARSIGHT)) - owner.reagents.add_reagent("oculine", 1) - -/obj/item/organ/cyberimp/eyes/shield/ling/prepare_eat() - var/obj/S = ..() - S.reagents.add_reagent("oculine", 15) - return S - - -/obj/item/organ/cyberimp/eyes/thermals/ling - name = "heat receptors" - desc = "These heat receptors dramatically increases eyes light sensing ability." - icon_state = "ling_thermal" - eye_color = null - implant_overlay = null - slot = "eye_ling" - status = ORGAN_ORGANIC - aug_message = "You feel a minute twitch in our eyes, and darkness creeps away." - -/obj/item/organ/cyberimp/eyes/thermals/ling/emp_act(severity) - return + var/obj/item/organ/eyes/E = user.getorganslot("eye_sight") + if(E) + E.sight_flags -= SEE_MOBS \ No newline at end of file diff --git a/code/game/gamemodes/devil/true_devil/_true_devil.dm b/code/game/gamemodes/devil/true_devil/_true_devil.dm index e541d6a0669..1de71b46d3c 100644 --- a/code/game/gamemodes/devil/true_devil/_true_devil.dm +++ b/code/game/gamemodes/devil/true_devil/_true_devil.dm @@ -36,6 +36,7 @@ /mob/living/carbon/true_devil/create_internal_organs() internal_organs += new /obj/item/organ/brain internal_organs += new /obj/item/organ/tongue + internal_organs += new /obj/item/organ/eyes ..() diff --git a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm index adc9627ca8f..265838d15a3 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm @@ -70,7 +70,7 @@ var/icon/eyes if(EYECOLOR in H.dna.species.species_traits) - eyes = icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "[H.dna.species.eyes]") + eyes = icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "eyes") eyes.Blend("#[H.eye_color]", ICON_MULTIPLY) var/datum/sprite_accessory/S diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm index 39fb1b8f2de..671105f5c5e 100644 --- a/code/modules/crafting/recipes.dm +++ b/code/modules/crafting/recipes.dm @@ -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, diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index e1cf5ade791..886d801449e 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -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 diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index 103ace63e79..cb4020c98d7 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -286,26 +286,6 @@ Doesn't work on other aliens/AI.*/ user.visible_message("[user] hurls out the contents of their stomach!") 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." diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 644bb450cbe..fe9f7fa7425 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -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() diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index c112139b0cb..e472ebead4f 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -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() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 0671dd11ff0..0ff51c45cf7 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index c76c03efd53..f63af6f79f9 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/species_types/abductors.dm b/code/modules/mob/living/carbon/human/species_types/abductors.dm index 3ad0a9bf6c4..750c88fd881 100644 --- a/code/modules/mob/living/carbon/human/species_types/abductors.dm +++ b/code/modules/mob/living/carbon/human/species_types/abductors.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index fc3a29b3fb3..b9f46bdf91b 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm index 92eee6125d1..a09d59b2cbc 100644 --- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm @@ -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 << "You adjust your vision to pierce the darkness." - else - H.see_in_dark = 2 - H.see_invisible = SEE_INVISIBLE_LIVING - H << "You adjust your vision to recognize the shadows." - -/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 diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index d0cc88e67fe..1844cc28f05 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -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() diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 3e8d9d633eb..f38ee857059 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -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" diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 818d616bb3d..752bc73919f 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -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 diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm index 877f8b490cf..bd01b14c216 100644 --- a/code/modules/surgery/bodyparts/dismemberment.dm +++ b/code/modules/surgery/bodyparts/dismemberment.dm @@ -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) diff --git a/code/modules/surgery/bodyparts/head.dm b/code/modules/surgery/bodyparts/head.dm index 110314cb8ba..19327936542 100644 --- a/code/modules/surgery/bodyparts/head.dm +++ b/code/modules/surgery/bodyparts/head.dm @@ -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 diff --git a/code/modules/surgery/eye_surgery.dm b/code/modules/surgery/eye_surgery.dm index 5e1ef149876..107dfd692c3 100644 --- a/code/modules/surgery/eye_surgery.dm +++ b/code/modules/surgery/eye_surgery.dm @@ -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.", "You begin to fix [target]'s eyes...") @@ -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("[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.", "You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.") - return 0 \ No newline at end of file + return FALSE \ No newline at end of file diff --git a/code/modules/surgery/organs/augments_eyes.dm b/code/modules/surgery/organs/augments_eyes.dm index 666eeac27a1..7ca10c5c5e3 100644 --- a/code/modules/surgery/organs/augments_eyes.dm +++ b/code/modules/surgery/organs/augments_eyes.dm @@ -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 << "[aug_message]" - 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 << "Static obfuscates your vision!" - 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 diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 2c8f377fee4..51fc8f1ab2a 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -63,7 +63,7 @@ for(var/obj/item/I in stored_items) owner << "Your [owner.get_held_index_name(owner.get_held_index_of_item(I))]'s grip tightens." I.flags |= NODROP - + else release_items() owner << "Your hands relax..." @@ -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 diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 5a509604f6e..7316a188cea 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -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 << "Static obfuscates your vision!" + 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 \ No newline at end of file diff --git a/code/modules/uplink/uplink_item.dm b/code/modules/uplink/uplink_item.dm index 449c217721d..f8ebd39fff1 100644 --- a/code/modules/uplink/uplink_item.dm +++ b/code/modules/uplink/uplink_item.dm @@ -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 diff --git a/icons/mob/human_face.dmi b/icons/mob/human_face.dmi index 2b4f28029a9..e1dbb99158f 100644 Binary files a/icons/mob/human_face.dmi and b/icons/mob/human_face.dmi differ diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index c3716eda376..d1adc291961 100644 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ