diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 52ea8a174f9..a023063ca7f 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -276,3 +276,9 @@ #define HEARING_PROTECTION_MINOR 1 #define HEARING_PROTECTION_MAJOR 2 #define HEARING_PROTECTION_TOTAL 3 + +// Eye protection +#define FLASH_PROTECTION_SENSITIVE -1 +#define FLASH_PROTECTION_NONE 0 +#define FLASH_PROTECTION_FLASH 1 +#define FLASH_PROTECTION_WELDER 2 diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 6ee2ea3674f..ccd0b4c66e5 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -406,7 +406,7 @@ GLOBAL_VAR_INIT(record_id_num, 1001) var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = H.dna.species ? H.dna.species.eyes : "eyes_s") if(!eyes_organ) return - eyes_s.Blend(eyes_organ.eye_colour, ICON_ADD) + eyes_s.Blend(eyes_organ.eye_color, ICON_ADD) face_s.Blend(eyes_s, ICON_OVERLAY) var/datum/sprite_accessory/hair_style = GLOB.hair_styles_full_list[head_organ.h_style] diff --git a/code/datums/outfits/outfit_admin.dm b/code/datums/outfits/outfit_admin.dm index f40d29df78c..22d61c818ec 100644 --- a/code/datums/outfits/outfit_admin.dm +++ b/code/datums/outfits/outfit_admin.dm @@ -239,9 +239,8 @@ /obj/item/implant/dust ) cybernetic_implants = list( - /obj/item/organ/internal/cyberimp/eyes/shield, /obj/item/organ/internal/cyberimp/eyes/hud/security, - /obj/item/organ/internal/cyberimp/eyes/xray, + /obj/item/organ/internal/eyes/cybernetic/xray, /obj/item/organ/internal/cyberimp/brain/anti_stun/hardened, /obj/item/organ/internal/cyberimp/chest/nutriment/plus, /obj/item/organ/internal/cyberimp/arm/combat/centcom diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 1066bf972c1..8175f4353cc 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -1556,43 +1556,32 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) surplus = 0 gamemodes = list(/datum/game_mode/nuclear) -/datum/uplink_item/cyber_implants/spawn_item(turf/loc, obj/item/uplink/U) - if(item) - if(findtext(item, /obj/item/organ/internal/cyberimp)) - U.uses -= max(cost, 0) - U.used_TC += cost - SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(name)]", "[cost]")) //this one and the line before copypasted because snowflaek code - return new /obj/item/storage/box/cyber_implants(loc, item) - else - return ..() - /datum/uplink_item/cyber_implants/thermals name = "Thermal Vision Implant" - desc = "These cybernetic eyes will give you thermal vision. Comes with an automated implanting tool." + desc = "These cybernetic eyes will give you thermal vision. Comes with an autosurgeon." reference = "CIT" - item = /obj/item/organ/internal/cyberimp/eyes/thermals + item = /obj/item/autosurgeon/organ/syndicate/thermal_eyes 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 automated implanting tool." + desc = "These cybernetic eyes will give you X-ray vision. Comes with an autosurgeon." reference = "CIX" - item = /obj/item/organ/internal/cyberimp/eyes/xray + item = /obj/item/autosurgeon/organ/syndicate/xray_eyes cost = 10 /datum/uplink_item/cyber_implants/antistun name = "Hardened CNS Rebooter Implant" - desc = "This implant will help you get back up on your feet faster after being stunned. It is invulnerable to EMPs. \ - Comes with an automated implanting tool." + desc = "This implant will help you get back up on your feet faster after being stunned. It is immune to EMP attacks. Comes with an autosurgeon." reference = "CIAS" - item = /obj/item/organ/internal/cyberimp/brain/anti_stun/hardened + item = /obj/item/autosurgeon/organ/syndicate/anti_stun cost = 12 /datum/uplink_item/cyber_implants/reviver name = "Hardened Reviver Implant" - desc = "This implant will attempt to revive you if you lose consciousness. It is invulnerable to EMPs. Comes with an automated implanting tool." + desc = "This implant will attempt to revive and heal you if you lose consciousness. It is immune to EMP attacks. Comes with an autosurgeon." reference = "CIR" - item = /obj/item/organ/internal/cyberimp/chest/reviver/hardened + item = /obj/item/autosurgeon/organ/syndicate/reviver cost = 8 // POINTLESS BADASSERY @@ -1674,10 +1663,9 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/bundles_TC/cyber_implants name = "Cybernetic Implants Bundle" - desc = "A random selection of cybernetic implants. Guaranteed 5 high quality implants. \ - Comes with an automated implanting tool." + desc = "A random selection of cybernetic implants. Guaranteed 5 high quality implants. Comes with an autosurgeon." reference = "CIB" - item = /obj/item/storage/box/cyber_implants/bundle + item = /obj/item/storage/box/cyber_implants cost = 40 gamemodes = list(/datum/game_mode/nuclear) diff --git a/code/datums/vision_override.dm b/code/datums/vision_override.dm index 86aab6d65ec..e110daafd53 100644 --- a/code/datums/vision_override.dm +++ b/code/datums/vision_override.dm @@ -4,15 +4,7 @@ var/sight_flags = 0 var/see_in_dark = 0 var/lighting_alpha - - var/light_sensitive = 0 /datum/vision_override/nightvision see_in_dark = 8 lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE - -/datum/vision_override/nightvision/thermals - sight_flags = SEE_MOBS - -/datum/vision_override/nightvision/thermals/ling_augmented_eyesight - light_sensitive = 1 diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index ac521fd90d1..9ecad776e3e 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -213,7 +213,7 @@ // This proc gives the DNA info for eye color to the given eyes /datum/dna/proc/write_eyes_attributes(obj/item/organ/internal/eyes/eyes_organ) - eyes_organ.eye_colour = rgb(eyes_organ.dna.GetUIValueRange(DNA_UI_EYES_R, 255), eyes_organ.dna.GetUIValueRange(DNA_UI_EYES_G, 255), eyes_organ.dna.GetUIValueRange(DNA_UI_EYES_B, 255)) + eyes_organ.eye_color = rgb(eyes_organ.dna.GetUIValueRange(DNA_UI_EYES_R, 255), eyes_organ.dna.GetUIValueRange(DNA_UI_EYES_G, 255), eyes_organ.dna.GetUIValueRange(DNA_UI_EYES_B, 255)) /* TRAIT CHANGING PROCS @@ -223,9 +223,9 @@ // In absence of eyes, possibly randomize the eye color DNA? return - SetUIValueRange(DNA_UI_EYES_R, color2R(eyes_organ.eye_colour), 255, 1) - SetUIValueRange(DNA_UI_EYES_G, color2G(eyes_organ.eye_colour), 255, 1) - SetUIValueRange(DNA_UI_EYES_B, color2B(eyes_organ.eye_colour), 255, 1) + SetUIValueRange(DNA_UI_EYES_R, color2R(eyes_organ.eye_color), 255, 1) + SetUIValueRange(DNA_UI_EYES_G, color2G(eyes_organ.eye_color), 255, 1) + SetUIValueRange(DNA_UI_EYES_B, color2B(eyes_organ.eye_color), 255, 1) /datum/dna/proc/head_traits_to_dna(obj/item/organ/external/head/head_organ) if(!head_organ) diff --git a/code/game/dna/mutations/powers.dm b/code/game/dna/mutations/powers.dm index c2590fd227d..98d94299bfc 100644 --- a/code/game/dna/mutations/powers.dm +++ b/code/game/dna/mutations/powers.dm @@ -821,7 +821,7 @@ else M.change_gender(FEMALE) - var/new_eyes = input("Please select eye color.", "Character Generation", eyes_organ.eye_colour) as null|color + var/new_eyes = input("Please select eye color.", "Character Generation", eyes_organ.eye_color) as null|color if(new_eyes) M.change_eye_color(new_eyes) diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm index 3e7d72cfd42..9e0a2279bbd 100644 --- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm +++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm @@ -3,84 +3,54 @@ /datum/action/changeling/augmented_eyesight name = "Augmented Eyesight" - desc = "Creates heat receptors in our eyes and dramatically increases light sensing ability." - helptext = "Grants us thermal vision or flash protection. We will become a lot more vulnerable to flash based devices while thermal vision is active." + desc = "Creates more light sensing rods in our eyes, allowing our vision to penetrate most blocking objects. Protects our vision from flashes while inactive." + helptext = "Grants us x-ray vision or flash protection. We will become a lot more vulnerable to flash-based devices while x-ray vision is active." button_icon_state = "augmented_eyesight" chemical_cost = 0 dna_cost = 2 //Would be 1 without thermal vision active = FALSE /datum/action/changeling/augmented_eyesight/on_purchase(mob/user) //The ability starts inactive, so we should be protected from flashes. + if(!istype(user)) + return ..() - var/obj/item/organ/internal/cyberimp/eyes/O = new /obj/item/organ/internal/cyberimp/eyes/shield/ling() - O.insert(user) - active = FALSE + var/obj/item/organ/internal/eyes/E = user.get_organ_slot("eyes") + if(E) + E.flash_protect = FLASH_PROTECTION_WELDER //Adjust the user's eyes' flash protection + to_chat(user, "We adjust our eyes to protect them from bright lights.") + else + to_chat(user, "We can't adjust our eyes if we don't have any!") /datum/action/changeling/augmented_eyesight/sting_action(mob/living/carbon/user) if(!istype(user)) return - if(!active) - var/obj/item/organ/internal/cyberimp/eyes/O = new /obj/item/organ/internal/cyberimp/eyes/thermals/ling() - O.insert(user) - active = TRUE + ..() + var/obj/item/organ/internal/eyes/E = user.get_organ_slot("eyes") + if(E) + if(!active) + E.vision_flags |= SEE_MOBS | SEE_OBJS | SEE_TURFS //Add sight flags to the user's eyes + E.flash_protect = FLASH_PROTECTION_SENSITIVE //Adjust the user's eyes' flash protection + to_chat(user, "We adjust our eyes to sense prey through walls.") + active = TRUE + else + E.vision_flags ^= SEE_MOBS | SEE_OBJS | SEE_TURFS //Remove sight flags from the user's eyes + E.flash_protect = FLASH_PROTECTION_WELDER //Adjust the user's eyes' flash protection + to_chat(user, "We adjust our eyes to protect them from bright lights.") + active = FALSE + user.update_sight() else - var/obj/item/organ/internal/cyberimp/eyes/O = new /obj/item/organ/internal/cyberimp/eyes/shield/ling() - O.insert(user) - active = FALSE - return 1 + to_chat(user, "We can't adjust our eyes if we don't have any!") + return TRUE -/datum/action/changeling/augmented_eyesight/Remove(mob/user) - var/obj/item/organ/internal/cyberimp/eyes/O = user.get_organ_slot("eye_ling") - if(O) - O.remove(user) - qdel(O) - ..() - -/obj/item/organ/internal/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_colour = "#000000" - implant_overlay = null - slot = "eye_ling" - status = 0 - aug_message = "We feel a minute twitch in our eyes, our eyes feel more durable." - -/obj/item/organ/internal/cyberimp/eyes/shield/ling/on_life() - ..() - var/obj/item/organ/internal/eyes/E = owner.get_int_organ(/obj/item/organ/internal/eyes) - if(owner.eye_blind || owner.eye_blurry || HAS_TRAIT(owner, TRAIT_BLIND) || HAS_TRAIT(owner, TRAIT_NEARSIGHT) || (E && E.damage > 0)) - owner.reagents.add_reagent("oculine", 1) - -/obj/item/organ/internal/cyberimp/eyes/shield/ling/prepare_eat() - var/obj/S = ..() - S.reagents.add_reagent("oculine", 15) - return S - -/obj/item/organ/internal/cyberimp/eyes/thermals/ling - name = "heat receptors" - desc = "These heat receptors dramatically increases eyes light sensing ability." - icon_state = "ling_thermal" - eye_colour = "#000000" - implant_overlay = null - slot = "eye_ling" - status = 0 - aug_message = "We feel a minute twitch in our eyes, and darkness creeps away." - -/obj/item/organ/internal/cyberimp/eyes/thermals/ling/emp_act(severity) - return - -/obj/item/organ/internal/cyberimp/eyes/thermals/ling/insert(mob/living/carbon/M, special = 0) - ..() - if(ishuman(owner)) - var/mob/living/carbon/human/H = owner - H.weakeyes = 1 - if(!H.vision_type) - H.set_sight(/datum/vision_override/nightvision) - -/obj/item/organ/internal/cyberimp/eyes/thermals/ling/remove(mob/living/carbon/M, special = 0) - if(ishuman(owner)) - var/mob/living/carbon/human/H = owner - H.weakeyes = 0 - H.set_sight(null) + +/datum/action/changeling/augmented_eyesight/Remove(mob/user) //Get rid of x-ray vision and flash protection when the user refunds this ability + if(!istype(user)) + return + var/obj/item/organ/internal/eyes/E = user.get_organ_slot("eyes") + if(E) + if(active) + E.vision_flags ^= SEE_MOBS | SEE_OBJS | SEE_TURFS + else + E.flash_protect = FLASH_PROTECTION_NONE + user.update_sight() ..() diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 047bc322ccd..2ed440f366d 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -162,7 +162,7 @@ Made by Xhuis new_thrall_mind.current.create_log(CONVERSION_LOG, "Became a thrall") new_thrall_mind.current.add_language("Shadowling Hivemind") new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/lesser_shadow_walk(null)) - new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_vision/thrall(null)) + new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_vision(null)) to_chat(new_thrall_mind.current, "You see the truth. Reality has been torn away and you realize what a fool you've been.") to_chat(new_thrall_mind.current, "The shadowlings are your masters. Serve them above all else and ensure they complete their goals.") to_chat(new_thrall_mind.current, "You may not harm other thralls or the shadowlings. However, you do not need to obey other thralls.") diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 22faac6a489..5d7f6c269e8 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -146,9 +146,9 @@ /obj/effect/proc_holder/spell/targeted/shadow_vision - name = "Shadowling Darksight" - desc = "Gives you night and thermal vision." - panel = "Shadowling Abilities" + name = "Thrall Darksight" + desc = "Gives you night vision." + panel = "Thrall Abilities" charge_max = 0 range = -1 include_user = 1 @@ -167,11 +167,6 @@ to_chat(H, "You return your vision to normal.") H.set_sight(null) -/obj/effect/proc_holder/spell/targeted/shadow_vision/thrall - desc = "Thrall Darksight" - desc = "Gives you night vision." - panel = "Thrall Abilities" - /obj/effect/proc_holder/spell/aoe_turf/flashfreeze name = "Icy Veins" desc = "Instantly freezes the blood of nearby people, stunning them and causing burn damage." diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm index 1aa8d628560..2b84136fb04 100644 --- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm @@ -99,7 +99,6 @@ GLOBAL_LIST_INIT(possibleShadowlingNames, list("U'ruan", "Y`shej", "Nex", "Hel-u sleep(10) to_chat(H, "Your powers are awoken. You may now live to your fullest extent. Remember your goal. Cooperate with your thralls and allies.") H.ExtinguishMob() - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_vision(null)) H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/click/enthrall(null)) H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/click/glare(null)) H.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/veil(null)) diff --git a/code/game/jobs/job/central.dm b/code/game/jobs/job/central.dm index 8684ca7d1b0..c25dfdd256f 100644 --- a/code/game/jobs/job/central.dm +++ b/code/game/jobs/job/central.dm @@ -93,7 +93,7 @@ /obj/item/implant/dust ) cybernetic_implants = list( - /obj/item/organ/internal/cyberimp/eyes/xray, + /obj/item/organ/internal/eyes/cybernetic/xray, /obj/item/organ/internal/cyberimp/brain/anti_stun/hardened, /obj/item/organ/internal/cyberimp/chest/nutriment/plus, /obj/item/organ/internal/cyberimp/arm/combat/centcom diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 369d43e5d94..b7b35863541 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -66,9 +66,6 @@ if(L.flash_eyes(affect_silicon = 1)) L.Weaken(strength) - if(L.weakeyes) - L.Weaken(strength * 1.5) - L.visible_message("[L] gasps and shields [L.p_their()] eyes!") /obj/machinery/flasher/emp_act(severity) if(stat & (BROKEN|NOPOWER)) diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm index 7e24cfab25c..3ecd0d0fc3c 100644 --- a/code/game/objects/effects/spawners/lootdrop.dm +++ b/code/game/objects/effects/spawners/lootdrop.dm @@ -258,7 +258,7 @@ /obj/item/assembly/signaler/anomaly = 50, // anomaly core /obj/item/mecha_parts/mecha_equipment/weapon/energy/xray = 25, // mecha x-ray laser /obj/item/mecha_parts/mecha_equipment/teleporter/precise = 25, // upgraded mecha teleporter - /obj/item/autoimplanter = 50, + /obj/item/autosurgeon = 50, // Research / Experimentor /obj/item/paper/researchnotes = 150, // papers that give random R&D levels diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 2edd1c01a26..d2cf5a65bd2 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -89,8 +89,6 @@ if(user) add_attack_logs(user, M, "Flashed with [src]") if(targeted) - if(M.weakeyes) - M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash if(M.flash_eyes(1, 1)) M.AdjustConfused(power) terrible_conversion_proc(M, user) @@ -98,9 +96,6 @@ visible_message("[user] blinds [M] with the flash!") to_chat(user, "You blind [M] with the flash!") to_chat(M, "[user] blinds you with the flash!") - if(M.weakeyes) - M.Stun(2) - M.visible_message("[M] gasps and shields [M.p_their()] eyes!", "You gasp and shield your eyes!") else visible_message("[user] fails to blind [M] with the flash!") to_chat(user, "You fail to blind [M] with the flash!") diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index aadd814c0f2..009c7e70b48 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -396,3 +396,11 @@ anchored = TRUE var/range = null resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + +/obj/item/flashlight/eyelight + name = "eyelight" + desc = "This shouldn't exist outside of someone's head, how are you seeing this?" + light_range = 15 + light_power = 1 + flags = CONDUCT | DROPDEL + actions_types = list() diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index fe7d0cb3fe6..d96b2822bc2 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -108,8 +108,6 @@ //20% chance to actually hit the eyes if(prob(effectchance * diode.rating) && C.flash_eyes(severity)) outmsg = "You blind [C] by shining [src] in [C.p_their()] eyes." - if(C.weakeyes) - C.Stun(1) else outmsg = "You fail to blind [C] by shining [src] at [C.p_their()] eyes!" diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index 6606b7cc703..8122814353b 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -50,17 +50,6 @@ // Flash if(flash) - if(M.weakeyes) - M.visible_message("[M] screams and collapses!") - to_chat(M, "AAAAGH!") - M.Weaken(15) //hella stunned - M.Stun(15) - if(ishuman(M)) - M.emote("scream") - var/mob/living/carbon/human/H = M - var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes) - if(E) - E.receive_damage(8, TRUE) if(M.flash_eyes(affect_silicon = TRUE)) M.Stun(stun_amount) M.Weaken(stun_amount) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm index 98d0bce5e5e..cf1ad89b4ed 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm @@ -40,4 +40,4 @@ new /obj/item/clothing/glasses/meson(src) new /obj/item/clothing/head/soft(src) new /obj/item/door_remote/quartermaster(src) - new /obj/item/organ/internal/cyberimp/eyes/meson(src) + new /obj/item/organ/internal/eyes/cybernetic/meson(src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm index f11b301202c..7fa60e02c3c 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm @@ -38,7 +38,7 @@ new /obj/item/door_remote/chief_engineer(src) new /obj/item/rpd(src) new /obj/item/reagent_containers/food/drinks/mug/ce(src) - new /obj/item/organ/internal/cyberimp/eyes/meson(src) + new /obj/item/organ/internal/eyes/cybernetic/meson(src) new /obj/item/clothing/accessory/medal/engineering(src) new /obj/item/holosign_creator/atmos(src) diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm index dcf12d64746..18ef065d62c 100644 --- a/code/modules/crafting/recipes.dm +++ b/code/modules/crafting/recipes.dm @@ -278,6 +278,14 @@ reqs = list(/obj/item/paper = 5) category = CAT_MISC +/datum/crafting_recipe/flashlight_eyes + name = "Flashlight Eyes" + result = /obj/item/organ/internal/eyes/cybernetic/flashlight + time = 10 + reqs = list(/obj/item/flashlight = 2, + /obj/item/restraints/handcuffs/cable = 1) + category = CAT_MISC + /datum/crafting_recipe/sushimat name = "Sushi Mat" result = /obj/item/kitchen/sushimat diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 589ae6c8b6c..bb48bbf9b0d 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -253,14 +253,5 @@ Des: Removes all infected images from the alien. if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. return - for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs) - sight |= E.vision_flags - if(E.see_in_dark) - see_in_dark = max(see_in_dark, E.see_in_dark) - if(E.see_invisible) - see_invisible = min(see_invisible, E.see_invisible) - if(!isnull(E.lighting_alpha)) - lighting_alpha = min(lighting_alpha, E.lighting_alpha) - SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) sync_lighting_plane_alpha() diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index ca7d06292f4..34e819c4bf7 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -343,9 +343,6 @@ if(.) if(visual) return - if(weakeyes) - Stun(2) - var/obj/item/organ/internal/eyes/E = get_int_organ(/obj/item/organ/internal/eyes) if(!E || (E && E.weld_proof)) return @@ -1148,6 +1145,10 @@ so that different stomachs can handle things in different ways VB*/ if(wear_mask) . += wear_mask.tint + var/obj/item/organ/internal/eyes/E = get_organ_slot("eyes") + if(E) + . += E.tint + /mob/living/carbon/human/get_total_tint() . = ..() if(glasses) @@ -1188,15 +1189,6 @@ so that different stomachs can handle things in different ways VB*/ sight = initial(sight) lighting_alpha = initial(lighting_alpha) - for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs) - sight |= E.vision_flags - if(E.see_in_dark) - see_in_dark = max(see_in_dark, E.see_in_dark) - if(E.see_invisible) - see_invisible = min(see_invisible, E.see_invisible) - if(!isnull(E.lighting_alpha)) - lighting_alpha = min(lighting_alpha, E.lighting_alpha) - if(client.eye != src) var/atom/A = client.eye if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. @@ -1209,7 +1201,6 @@ so that different stomachs can handle things in different ways VB*/ if(HAS_TRAIT(src, TRAIT_XRAY_VISION)) sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) see_in_dark = max(see_in_dark, 8) - lighting_alpha = min(lighting_alpha, LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE) SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) sync_lighting_plane_alpha() diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index f0bfdb31b7b..3695ed7d478 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -206,10 +206,10 @@ // Update the main DNA datum, then sync the change across the organs var/obj/item/organ/internal/eyes/eyes_organ = get_int_organ(/obj/item/organ/internal/eyes) if(eyes_organ) - if(colour == eyes_organ.eye_colour) + if(colour == eyes_organ.eye_color) return - eyes_organ.eye_colour = colour + eyes_organ.eye_color = colour dna.eye_color_to_dna(eyes_organ) eyes_organ.set_dna(dna) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 93992336a18..5e25550a94d 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -943,9 +943,9 @@ if(istype(wear_mask, /obj/item/clothing/mask)) //mask var/obj/item/clothing/mask/MFP = wear_mask number += MFP.flash_protect - for(var/obj/item/organ/internal/cyberimp/eyes/EFP in internal_organs) - number += EFP.flash_protect - + var/obj/item/organ/internal/eyes/E = get_organ_slot("eyes") + if(E) + number += E.flash_protect return number /mob/living/carbon/human/check_ear_prot() @@ -1477,12 +1477,9 @@ /mob/living/carbon/human/proc/get_eyecon() var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes) - var/obj/item/organ/internal/cyberimp/eyes/eye_implant = get_int_organ(/obj/item/organ/internal/cyberimp/eyes) if(istype(dna.species) && dna.species.eyes) var/icon/eyes_icon - if(eye_implant) //Eye implants override native DNA eye colo(u)r - eyes_icon = eye_implant.generate_icon() - else if(eyes) + if(eyes) eyes_icon = eyes.generate_icon() else //Error 404: Eyes not found! eyes_icon = new('icons/mob/human_face.dmi', dna.species.eyes) diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index a11a7189e54..39e997fe11b 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -846,7 +846,8 @@ It'll return null if the organ doesn't correspond, so include null checks when u H.sight |= eyes.vision_flags H.see_in_dark = eyes.see_in_dark H.see_invisible = eyes.see_invisible - H.lighting_alpha = eyes.lighting_alpha + if(!isnull(eyes.lighting_alpha)) + H.lighting_alpha = eyes.lighting_alpha else H.see_in_dark = initial(H.see_in_dark) H.see_invisible = initial(H.see_invisible) @@ -866,15 +867,6 @@ It'll return null if the organ doesn't correspond, so include null checks when u H.sight |= SEE_MOBS H.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE - for(var/obj/item/organ/internal/cyberimp/eyes/E in H.internal_organs) - H.sight |= E.vision_flags - if(E.see_in_dark) - H.see_in_dark = max(H.see_in_dark, E.see_in_dark) - if(E.see_invisible) - H.see_invisible = min(H.see_invisible, E.see_invisible) - if(E.lighting_alpha) - H.lighting_alpha = min(H.lighting_alpha, E.lighting_alpha) - // my glasses, I can't see without my glasses if(H.glasses) var/obj/item/clothing/glasses/G = H.glasses @@ -906,9 +898,6 @@ It'll return null if the organ doesn't correspond, so include null checks when u if(!isnull(H.vision_type.lighting_alpha)) H.lighting_alpha = min(H.vision_type.lighting_alpha, H.lighting_alpha) - if(H.vision_type.light_sensitive) - H.weakeyes = TRUE - if(HAS_TRAIT(src, TRAIT_THERMAL_VISION)) H.sight |= (SEE_MOBS) H.lighting_alpha = min(H.lighting_alpha, LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE) diff --git a/code/modules/mob/living/carbon/human/species/drask.dm b/code/modules/mob/living/carbon/human/species/drask.dm index 145e28db401..5eb62de833f 100644 --- a/code/modules/mob/living/carbon/human/species/drask.dm +++ b/code/modules/mob/living/carbon/human/species/drask.dm @@ -63,4 +63,4 @@ /datum/species/drask/get_species_runechat_color(mob/living/carbon/human/H) var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes) - return E.eye_colour + return E.eye_color diff --git a/code/modules/mob/living/carbon/human/species/grey.dm b/code/modules/mob/living/carbon/human/species/grey.dm index f91c4252b48..008fa9b39ac 100644 --- a/code/modules/mob/living/carbon/human/species/grey.dm +++ b/code/modules/mob/living/carbon/human/species/grey.dm @@ -91,4 +91,4 @@ /datum/species/grey/get_species_runechat_color(mob/living/carbon/human/H) var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes) - return E.eye_colour + return E.eye_color diff --git a/code/modules/mob/living/carbon/human/species/kidan.dm b/code/modules/mob/living/carbon/human/species/kidan.dm index 68ccfbb37a4..da887e261b6 100644 --- a/code/modules/mob/living/carbon/human/species/kidan.dm +++ b/code/modules/mob/living/carbon/human/species/kidan.dm @@ -46,4 +46,4 @@ /datum/species/kidan/get_species_runechat_color(mob/living/carbon/human/H) var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes) - return E.eye_colour + return E.eye_color diff --git a/code/modules/mob/living/carbon/human/species/shadow.dm b/code/modules/mob/living/carbon/human/species/shadow.dm index d865a9485f4..e7f5450858d 100644 --- a/code/modules/mob/living/carbon/human/species/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/shadow.dm @@ -12,7 +12,7 @@ flesh_color = "#AAAAAA" has_organ = list( "brain" = /obj/item/organ/internal/brain, - "eyes" = /obj/item/organ/internal/eyes/shadow //8 darksight. + "eyes" = /obj/item/organ/internal/eyes/night_vision/nightmare //8 darksight. ) species_traits = list(NO_BLOOD) @@ -27,36 +27,6 @@ "is twisting their own neck!", "is staring into the closest light source!") - var/grant_vision_toggle = TRUE - var/datum/action/innate/shadow/darkvision/vision_toggle - -/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.vision_type) - H.set_sight(/datum/vision_override/nightvision) - to_chat(H, "You adjust your vision to pierce the darkness.") - else - H.set_sight(null) - to_chat(H, "You adjust your vision to recognize the shadows.") - -/datum/species/shadow/on_species_gain(mob/living/carbon/human/H) - ..() - if(grant_vision_toggle) - vision_toggle = new - vision_toggle.Grant(H) - -/datum/species/shadow/on_species_loss(mob/living/carbon/human/H) - ..() - if(grant_vision_toggle && vision_toggle) - H.vision_type = null - vision_toggle.Remove(H) - /datum/species/shadow/handle_life(mob/living/carbon/human/H) var/light_amount = 0 if(isturf(H.loc)) diff --git a/code/modules/mob/living/carbon/human/species/shadowling.dm b/code/modules/mob/living/carbon/human/species/shadowling.dm index 2c6309dfbcb..6619692cf66 100644 --- a/code/modules/mob/living/carbon/human/species/shadowling.dm +++ b/code/modules/mob/living/carbon/human/species/shadowling.dm @@ -13,15 +13,11 @@ burn_mod = 1.5 //1.5x burn damage, 2x is excessive heatmod = 1.5 - grant_vision_toggle = 0 - has_organ = list( "brain" = /obj/item/organ/internal/brain, - "eyes" = /obj/item/organ/internal/eyes) + "eyes" = /obj/item/organ/internal/eyes/night_vision/nightmare) /datum/species/shadow/ling/handle_life(mob/living/carbon/human/H) - if(!H.weakeyes) - H.weakeyes = 1 //Makes them more vulnerable to flashes and flashbangs var/light_amount = 0 if(isturf(H.loc)) var/turf/T = H.loc @@ -63,8 +59,6 @@ heatmod = 1.1 /datum/species/shadow/ling/lesser/handle_life(mob/living/carbon/human/H) - if(!H.weakeyes) - H.weakeyes = 1 //Makes them more vulnerable to flashes and flashbangs var/light_amount = 0 if(isturf(H.loc)) var/turf/T = H.loc diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 5d9e8af255d..9919778562f 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -1309,7 +1309,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes) if(eyes) - . += "[eyes.eye_colour]" + . += "[eyes.eye_color]" else . += "#000000" diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index e4431c03acb..ff48fe1256b 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -148,7 +148,6 @@ var/area/lastarea = null var/digitalcamo = 0 // Can they be tracked by the AI? - var/weakeyes = 0 //Are they vulnerable to flashes? var/has_unlimited_silicon_privilege = 0 // Can they interact with station electronics diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index ef0c984596a..f91b8f2012b 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -287,7 +287,7 @@ build_type = PROTOLATHE | MECHFAB construction_time = 40 materials = list(MAT_METAL = 600, MAT_GLASS = 400) - build_path = /obj/item/organ/internal/cyberimp/eyes/shield + build_path = /obj/item/organ/internal/eyes/cybernetic/shield category = list("Medical") /datum/design/cyberimp_breather @@ -397,7 +397,7 @@ build_type = PROTOLATHE | MECHFAB construction_time = 50 materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 500, MAT_GOLD = 300) - build_path = /obj/item/organ/internal/cyberimp/eyes/meson + build_path = /obj/item/organ/internal/eyes/cybernetic/meson category = list("Medical") /datum/design/cyberimp_xray @@ -408,7 +408,7 @@ 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 = 1000, MAT_BLUESPACE = 1000) - build_path = /obj/item/organ/internal/cyberimp/eyes/xray + build_path = /obj/item/organ/internal/eyes/cybernetic/xray category = list("Medical") /datum/design/cyberimp_thermals @@ -419,7 +419,7 @@ 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/internal/cyberimp/eyes/thermals + build_path = /obj/item/organ/internal/eyes/cybernetic/thermals category = list("Medical") /datum/design/cyberimp_antidrop diff --git a/code/modules/response_team/ert_outfits.dm b/code/modules/response_team/ert_outfits.dm index 1c093bc3c1d..d5be97a4081 100644 --- a/code/modules/response_team/ert_outfits.dm +++ b/code/modules/response_team/ert_outfits.dm @@ -255,7 +255,7 @@ glasses = /obj/item/clothing/glasses/meson/engine mask = /obj/item/clothing/mask/gas cybernetic_implants = list( - /obj/item/organ/internal/cyberimp/eyes/shield, + /obj/item/organ/internal/eyes/cybernetic/shield, /obj/item/organ/internal/cyberimp/chest/nutriment ) l_pocket = /obj/item/t_scanner @@ -293,7 +293,7 @@ /obj/item/organ/internal/cyberimp/chest/nutriment/plus, /obj/item/organ/internal/cyberimp/eyes/hud/security, /obj/item/organ/internal/cyberimp/brain/anti_stun/hardened, - /obj/item/organ/internal/cyberimp/eyes/shield, + /obj/item/organ/internal/eyes/cybernetic/shield, /obj/item/organ/internal/cyberimp/arm/toolset ) diff --git a/code/modules/surgery/organs/augments_eyes.dm b/code/modules/surgery/organs/augments_eyes.dm index 6dee1763aad..24b567db203 100644 --- a/code/modules/surgery/organs/augments_eyes.dm +++ b/code/modules/surgery/organs/augments_eyes.dm @@ -6,77 +6,12 @@ slot = "eye_sight" parent_organ = "eyes" w_class = WEIGHT_CLASS_TINY - - var/vision_flags = 0 - var/see_in_dark = 0 - var/see_invisible = 0 - var/lighting_alpha - - var/eye_colour = "#000000" // Should never be null - var/old_eye_colour = "#000000" - var/flash_protect = 0 var/aug_message = "Your vision is augmented!" -/obj/item/organ/internal/cyberimp/eyes/insert(var/mob/living/carbon/M, var/special = 0) +/obj/item/organ/internal/cyberimp/eyes/insert(mob/living/carbon/M, special = FALSE) ..() - var/mob/living/carbon/human/H = M - if(istype(H) && eye_colour) - H.update_body() //Apply our eye colour to the target. if(aug_message && !special) to_chat(owner, "[aug_message]") - M.update_sight() - -/obj/item/organ/internal/cyberimp/eyes/remove(var/mob/living/carbon/M, var/special = 0) - . = ..() - M.update_sight() - -/obj/item/organ/internal/cyberimp/eyes/proc/generate_icon(var/mob/living/carbon/human/HA) - var/mob/living/carbon/human/H = HA - if(!istype(H)) - H = owner - var/icon/cybereyes_icon = new /icon('icons/mob/human_face.dmi', H.dna.species.eyes) - cybereyes_icon.Blend(eye_colour, ICON_ADD) // Eye implants override native DNA eye color - - return cybereyes_icon - -/obj/item/organ/internal/cyberimp/eyes/emp_act(severity) - if(!owner || emp_proof) - return - if(severity > 1) - if(prob(10 * severity)) - return - to_chat(owner, "Static obfuscates your vision!") - owner.flash_eyes(visual = 1) - -/obj/item/organ/internal/cyberimp/eyes/meson - name = "Meson scanner implant" - desc = "These cybernetic eyes will allow you to see the structural layout of the station, and, well, everything else." - eye_colour = "#199900" - implant_color = "#AEFF00" - origin_tech = "materials=4;engineering=4;biotech=4;magnets=4" - vision_flags = SEE_TURFS - lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE - aug_message = "Suddenly, you realize how much of a mess the station really is..." - -/obj/item/organ/internal/cyberimp/eyes/xray - name = "X-ray implant" - desc = "These cybernetic eye implants will give you X-ray vision. Blinking is futile." - implant_color = "#000000" - origin_tech = "materials=4;programming=4;biotech=7;magnets=4" - vision_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS - see_in_dark = 8 - lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE - -/obj/item/organ/internal/cyberimp/eyes/thermals - name = "Thermals implant" - desc = "These cybernetic eye implants will give you Thermal vision. Vertical slit pupil included." - eye_colour = "#FFCC00" - implant_color = "#FFCC00" - vision_flags = SEE_MOBS - lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE - flash_protect = -1 - origin_tech = "materials=5;programming=4;biotech=4;magnets=4;syndicate=1" - aug_message = "You see prey everywhere you look..." // HUD implants /obj/item/organ/internal/cyberimp/eyes/hud @@ -104,7 +39,6 @@ /obj/item/organ/internal/cyberimp/eyes/hud/medical name = "Medical HUD implant" desc = "These cybernetic eye implants will display a medical HUD over everything you see." - eye_colour = "#0000D0" implant_color = "#00FFFF" origin_tech = "materials=4;programming=4;biotech=4" aug_message = "You suddenly see health bars floating above people's heads..." @@ -114,7 +48,6 @@ /obj/item/organ/internal/cyberimp/eyes/hud/diagnostic name = "Diagnostic HUD implant" desc = "These cybernetic eye implants will display a diagnostic HUD over everything you see." - eye_colour = "#723E02" implant_color = "#ff9000" origin_tech = "materials=4;engineering=4;biotech=4" aug_message = "You see the diagnostic information of the synthetics around you..." @@ -123,22 +56,8 @@ /obj/item/organ/internal/cyberimp/eyes/hud/security name = "Security HUD implant" desc = "These cybernetic eye implants will display a security HUD over everything you see." - eye_colour = "#D00000" 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 examine_extensions = list(EXAMINE_HUD_SECURITY_READ, EXAMINE_HUD_SECURITY_WRITE) - -// Welding shield implant -/obj/item/organ/internal/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 - // Welding with thermals will still hurt your eyes a bit. - -/obj/item/organ/internal/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 56d82e24833..9c442fb6e28 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -9,9 +9,9 @@ /obj/item/organ/internal/cyberimp/New(var/mob/M = null) . = ..() if(implant_overlay) - var/image/overlay = new /image(icon, implant_overlay) + var/mutable_appearance/overlay = mutable_appearance(icon, implant_overlay) overlay.color = implant_color - overlays |= overlay + add_overlay(overlay) /obj/item/organ/internal/cyberimp/emp_act() return // These shouldn't be hurt by EMPs in the standard way @@ -405,26 +405,18 @@ //BOX O' IMPLANTS /obj/item/storage/box/cyber_implants - name = "boxed cybernetic implant" + name = "boxed cybernetic implants" desc = "A sleek, sturdy box." icon_state = "cyber_implants" - -/obj/item/storage/box/cyber_implants/New(loc, implant) - ..() - new /obj/item/autoimplanter(src) - if(ispath(implant)) - new implant(src) - -/obj/item/storage/box/cyber_implants/bundle - name = "boxed cybernetic implants" - var/list/boxed = list(/obj/item/organ/internal/cyberimp/eyes/xray,/obj/item/organ/internal/cyberimp/eyes/thermals, - /obj/item/organ/internal/cyberimp/brain/anti_stun, /obj/item/organ/internal/cyberimp/chest/reviver/hardened) + var/list/boxed = list( + /obj/item/autosurgeon/organ/syndicate/thermal_eyes, + /obj/item/autosurgeon/organ/syndicate/xray_eyes, + /obj/item/autosurgeon/organ/syndicate/anti_stun, + /obj/item/autosurgeon/organ/syndicate/reviver) var/amount = 5 -/obj/item/storage/box/cyber_implants/bundle/New() - ..() +/obj/item/storage/box/cyber_implants/populate_contents() var/implant - while(amount > 0) + while(length(contents) <= amount) implant = pick(boxed) new implant(src) - amount-- diff --git a/code/modules/surgery/organs/autoimplanter.dm b/code/modules/surgery/organs/autoimplanter.dm deleted file mode 100644 index e3f40bc8b46..00000000000 --- a/code/modules/surgery/organs/autoimplanter.dm +++ /dev/null @@ -1,37 +0,0 @@ -/obj/item/autoimplanter - name = "autoimplanter" - desc = "A device that automatically injects a cyber-implant into the user without the hassle of extensive surgery. It has a slot to insert implants and a screwdriver slot for removing accidentally added implants." - icon = 'icons/obj/device.dmi' - icon_state = "autoimplanter" - item_state = "walkietalkie"//left as this so as to intentionally not have inhands - w_class = WEIGHT_CLASS_SMALL - usesound = 'sound/weapons/circsawhit.ogg' - var/obj/item/organ/internal/cyberimp/storedorgan - -/obj/item/autoimplanter/attack_self(mob/user)//when the object it used... - if(!storedorgan) - to_chat(user, "[src] currently has no implant stored.") - return - storedorgan.insert(user)//insert stored organ into the user - user.visible_message("[user] presses a button on [src], and you hear a short mechanical noise.", "You feel a sharp sting as [src] plunges into your body.") - playsound(get_turf(user), usesound, 50, 1) - storedorgan = null - -/obj/item/autoimplanter/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/organ/internal/cyberimp)) - if(storedorgan) - to_chat(user, "[src] already has an implant stored.") - return - if(!user.drop_item()) - return - I.forceMove(src) - storedorgan = I - to_chat(user, "You insert the [I] into [src].") - else if(istype(I, /obj/item/screwdriver)) - if(!storedorgan) - to_chat(user, "There's no implant in [src] for you to remove.") - else - storedorgan.forceMove(get_turf(user)) - storedorgan = null - to_chat(user, "You remove the [storedorgan] from [src].") - playsound(get_turf(user), I.usesound, 50, 1) diff --git a/code/modules/surgery/organs/autosurgeon.dm b/code/modules/surgery/organs/autosurgeon.dm new file mode 100644 index 00000000000..652bf7058a2 --- /dev/null +++ b/code/modules/surgery/organs/autosurgeon.dm @@ -0,0 +1,103 @@ +#define INFINITE -1 + +/obj/item/autosurgeon + name = "autosurgeon" + desc = "A device that automatically inserts an implant or organ into the user without the hassle of extensive surgery. It has a screwdriver slot for removing accidentally added items." + icon = 'icons/obj/device.dmi' + icon_state = "autoimplanter" + item_state = "" + w_class = WEIGHT_CLASS_SMALL + var/uses = INFINITE + +/obj/item/autosurgeon/attack_self_tk(mob/user) + return //stops TK fuckery + +/obj/item/autosurgeon/organ + name = "implant autosurgeon" + desc = "A device that automatically inserts an implant or organ into the user without the hassle of extensive surgery. It has a slot to insert implants or organs and a screwdriver slot for removing accidentally added items." + var/organ_type = /obj/item/organ/internal + var/starting_organ + var/obj/item/organ/internal/storedorgan + +/obj/item/autosurgeon/organ/syndicate + name = "suspicious implant autosurgeon" + icon_state = "syndicate_autoimplanter" + +/obj/item/autosurgeon/organ/Initialize(mapload) + . = ..() + if(starting_organ) + insert_organ(new starting_organ(src)) + +/obj/item/autosurgeon/organ/proc/insert_organ(obj/item/I) + storedorgan = I + I.forceMove(src) + name = "[initial(name)] ([storedorgan.name])" + +/obj/item/autosurgeon/organ/attack_self(mob/user) //when the object it used... + if(!uses) + to_chat(user, "[src] has already been used. The tools are dull and won't reactivate.") + return + else if(!storedorgan) + to_chat(user, "[src] currently has no implant stored.") + return + storedorgan.insert(user) //insert stored organ into the user + user.visible_message("[user] presses a button on [src], and you hear a short mechanical noise.", "You feel a sharp sting as [src] plunges into your body.") + playsound(get_turf(user), 'sound/weapons/circsawhit.ogg', 50, TRUE) + storedorgan = null + name = initial(name) + if(uses != INFINITE) + uses-- + if(!uses) + desc = "[initial(desc)] Looks like it's been used up." + +/obj/item/autosurgeon/organ/attackby(obj/item/I, mob/user, params) + if(istype(I, organ_type)) + if(storedorgan) + to_chat(user, "[src] already has an implant stored.") + return + else if(!uses) + to_chat(user, "[src] has already been used up.") + return + if(!user.drop_item()) + return + I.forceMove(src) + storedorgan = I + to_chat(user, "You insert [I] into [src].") + else + return ..() + +/obj/item/autosurgeon/organ/screwdriver_act(mob/living/user, obj/item/I) + if(..()) + return TRUE + if(!storedorgan) + to_chat(user, "There's no implant in [src] for you to remove!") + else + storedorgan.forceMove(user.drop_location()) + + to_chat(user, "You remove [storedorgan] from [src].") + I.play_tool_sound(src) + storedorgan = null + if(uses != INFINITE) + uses-- + if(!uses) + desc = "[initial(desc)] Looks like it's been used up." + return TRUE + +/obj/item/autosurgeon/organ/syndicate/laser_arm + desc = "A single use autosurgeon that contains a combat arms-up laser augment. A screwdriver can be used to remove it, but implants can't be placed back in." + uses = 1 + starting_organ = /obj/item/organ/internal/cyberimp/arm/gun/laser + +/obj/item/autosurgeon/organ/syndicate/thermal_eyes + starting_organ = /obj/item/organ/internal/eyes/cybernetic/thermals + +/obj/item/autosurgeon/organ/syndicate/xray_eyes + starting_organ = /obj/item/organ/internal/eyes/cybernetic/xray + +/obj/item/autosurgeon/organ/syndicate/anti_stun + starting_organ = /obj/item/organ/internal/cyberimp/brain/anti_stun/hardened + +/obj/item/autosurgeon/organ/syndicate/reviver + starting_organ = /obj/item/organ/internal/cyberimp/chest/reviver/hardened + +#undef INFINITE diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 085434b25f2..4d1fba70497 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -5,17 +5,19 @@ organ_tag = "eyes" parent_organ = "head" slot = "eyes" - var/eye_colour = "#000000" // Should never be null + var/eye_color = "#000000" // Should never be null var/list/colourmatrix = null var/list/colourblind_matrix = MATRIX_GREYSCALE //Special colourblindness parameters. By default, it's black-and-white. var/list/replace_colours = GREYSCALE_COLOR_REPLACE var/dependent_disabilities = list() //Gets set by eye-dependent disabilities such as colourblindness so the eyes can transfer the disability during transplantation. - var/weld_proof = null //If set, the eyes will not take damage during welding. eg. IPC optical sensors do not take damage when they weld things while all other eyes will. + var/weld_proof = FALSE //If set, the eyes will not take damage during welding. eg. IPC optical sensors do not take damage when they weld things while all other eyes will. var/vision_flags = 0 var/see_in_dark = 2 + var/tint = 0 + var/flash_protect = FLASH_PROTECTION_NONE var/see_invisible = SEE_INVISIBLE_LIVING - var/lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE + var/lighting_alpha /obj/item/organ/internal/eyes/proc/update_colour() dna.write_eyes_attributes(src) @@ -25,7 +27,7 @@ if(!istype(H)) H = owner var/icon/eyes_icon = new /icon('icons/mob/human_face.dmi', H.dna.species.eyes) - eyes_icon.Blend(eye_colour, ICON_ADD) + eyes_icon.Blend(eye_color, ICON_ADD) return eyes_icon @@ -41,9 +43,12 @@ /obj/item/organ/internal/eyes/insert(mob/living/carbon/human/M, special = 0) ..() - if(istype(M) && eye_colour) + if(istype(M) && eye_color) M.update_body() //Apply our eye colour to the target. + M.update_tint() + M.update_sight() + if(!HAS_TRAIT(M, TRAIT_COLORBLIND) && (TRAIT_COLORBLIND in dependent_disabilities)) //If the eyes are colourblind and we're not, carry over the gene. dependent_disabilities -= TRAIT_COLORBLIND M.dna.SetSEState(GLOB.colourblindblock, TRUE) @@ -58,6 +63,8 @@ M.dna.SetSEState(GLOB.colourblindblock, FALSE) singlemutcheck(M, GLOB.colourblindblock, MUTCHK_FORCED) . = ..() + M.update_tint() + M.update_sight() /obj/item/organ/internal/eyes/surgeryize() if(!owner) @@ -67,6 +74,32 @@ owner.SetEyeBlurry(0) owner.SetEyeBlind(0) +/obj/item/organ/internal/eyes/night_vision + name = "shadow eyes" + desc = "A spooky set of eyes that can see in the dark." + see_in_dark = 8 + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE + actions_types = list(/datum/action/item_action/organ_action/use) + +/obj/item/organ/internal/eyes/night_vision/ui_action_click() + vision_flags = initial(vision_flags) + switch(lighting_alpha) + if(LIGHTING_PLANE_ALPHA_VISIBLE) + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE + if(LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE) + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE + if(LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE) + lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE + else + lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE + vision_flags &= ~SEE_BLACKNESS + owner.update_sight() + +/obj/item/organ/internal/eyes/night_vision/nightmare + name = "burning red eyes" + desc = "Even without their shadowy owner, looking at these eyes gives you a sense of dread." + icon_state = "burning_eyes" + /obj/item/organ/internal/eyes/robotize(make_tough) colourmatrix = null ..() //Make sure the organ's got the robotic status indicators before updating the client colour. @@ -79,3 +112,79 @@ desc = "An electronic device designed to mimic the functions of a pair of human eyes. It has no benefits over organic eyes, but is easy to produce." origin_tech = "biotech=4" status = ORGAN_ROBOT + +/obj/item/organ/internal/eyes/cybernetic/emp_act(severity) + if(!owner || emp_proof) + return + if(prob(10 * severity)) + return + to_chat(owner, "Static obfuscates your vision!") + owner.flash_eyes(visual = TRUE) + ..() + +/obj/item/organ/internal/eyes/cybernetic/meson + name = "meson eyes" + desc = "These cybernetic eyes will allow you to see the structural layout of the station, and, well, everything else." + eye_color = "#199900" + vision_flags = SEE_TURFS + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE + origin_tech = "materials=4;engineering=4;biotech=4;magnets=4" + +/obj/item/organ/internal/eyes/cybernetic/xray + name = "\improper X-ray eyes" + desc = "These cybernetic eyes will give you X-ray vision. Blinking is futile." + see_in_dark = 8 + vision_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS + origin_tech = "materials=4;programming=4;biotech=7;magnets=4" + +/obj/item/organ/internal/eyes/cybernetic/thermals + name = "thermal eyes" + desc = "These cybernetic eye implants will give you thermal vision. Vertical slit pupil included." + eye_color = "#FFCC00" + vision_flags = SEE_MOBS + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE + flash_protect = FLASH_PROTECTION_SENSITIVE + see_in_dark = 8 + origin_tech = "materials=5;programming=4;biotech=4;magnets=4;syndicate=1" + +/obj/item/organ/internal/eyes/cybernetic/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" + icon = 'icons/obj/lighting.dmi' + icon_state = "flashlight_eyes" + flash_protect = FLASH_PROTECTION_WELDER + tint = INFINITY + var/obj/item/flashlight/eyelight/eye + +/obj/item/organ/internal/eyes/cybernetic/flashlight/emp_act(severity) + return + +/obj/item/organ/internal/eyes/cybernetic/flashlight/insert(mob/living/carbon/M, special = FALSE) + ..() + if(!eye) + eye = new /obj/item/flashlight/eyelight() + eye.on = TRUE + eye.forceMove(M) + eye.update_brightness(M) + M.become_blind("flashlight_eyes") + + +/obj/item/organ/internal/eyes/cybernetic/flashlight/remove(mob/living/carbon/M, special = FALSE) + if(eye) + eye.on = FALSE + eye.update_brightness(M) + eye.forceMove(src) + M.cure_blind("flashlight_eyes") + . = ..() + +// Welding shield implant +/obj/item/organ/internal/eyes/cybernetic/shield + name = "shielded robotic eyes" + desc = "These reactive micro-shields will protect you from welders and flashes without obscuring your vision." + flash_protect = FLASH_PROTECTION_WELDER + eye_color = "#101010" + origin_tech = "materials=4;biotech=3;engineering=4;plasmatech=3" + +/obj/item/organ/internal/eyes/cybernetic/shield/emp_act(severity) + return diff --git a/code/modules/surgery/organs/subtypes/machine.dm b/code/modules/surgery/organs/subtypes/machine.dm index 415cdb7875d..8a4d63aeaf8 100644 --- a/code/modules/surgery/organs/subtypes/machine.dm +++ b/code/modules/surgery/organs/subtypes/machine.dm @@ -118,7 +118,7 @@ icon_state = "camera" status = ORGAN_ROBOT // dead_icon = "camera_broken" - weld_proof = 1 + weld_proof = TRUE /obj/item/organ/internal/eyes/optical_sensor/remove(var/mob/living/user,special = 0) if(!special) diff --git a/code/modules/surgery/organs/subtypes/shadow.dm b/code/modules/surgery/organs/subtypes/shadow.dm deleted file mode 100644 index d147feb0317..00000000000 --- a/code/modules/surgery/organs/subtypes/shadow.dm +++ /dev/null @@ -1,3 +0,0 @@ -/obj/item/organ/internal/eyes/shadow - name = "dark orbs" - see_in_dark = 8 diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm index b6139792b71..6af513e1d08 100644 --- a/code/modules/tgui/modules/appearance_changer.dm +++ b/code/modules/tgui/modules/appearance_changer.dm @@ -113,7 +113,7 @@ if("eye_color") if(can_change(APPEARANCE_EYE_COLOR)) var/obj/item/organ/internal/eyes/eyes_organ = owner.get_int_organ(/obj/item/organ/internal/eyes) - var/new_eyes = input("Please select eye color.", "Eye Color", eyes_organ.eye_colour) as color|null + var/new_eyes = input("Please select eye color.", "Eye Color", eyes_organ.eye_color) as color|null if(new_eyes && (!..()) && owner.change_eye_color(new_eyes)) update_dna() diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index 11189a5a0ad..ed35f85b21c 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/icons/obj/lighting.dmi b/icons/obj/lighting.dmi index 19b4d85a1d8..60ffb6462f9 100644 Binary files a/icons/obj/lighting.dmi and b/icons/obj/lighting.dmi differ diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index eb3901077b9..7af3800e5d4 100644 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ diff --git a/paradise.dme b/paradise.dme index f787871e9b9..5da5b96cbb8 100644 --- a/paradise.dme +++ b/paradise.dme @@ -2416,7 +2416,7 @@ #include "code\modules\surgery\organs\augments_arms.dm" #include "code\modules\surgery\organs\augments_eyes.dm" #include "code\modules\surgery\organs\augments_internal.dm" -#include "code\modules\surgery\organs\autoimplanter.dm" +#include "code\modules\surgery\organs\autosurgeon.dm" #include "code\modules\surgery\organs\blood.dm" #include "code\modules\surgery\organs\body_egg.dm" #include "code\modules\surgery\organs\ears.dm" @@ -2444,7 +2444,6 @@ #include "code\modules\surgery\organs\subtypes\machine.dm" #include "code\modules\surgery\organs\subtypes\nucleation.dm" #include "code\modules\surgery\organs\subtypes\plasmaman.dm" -#include "code\modules\surgery\organs\subtypes\shadow.dm" #include "code\modules\surgery\organs\subtypes\skrell.dm" #include "code\modules\surgery\organs\subtypes\slime.dm" #include "code\modules\surgery\organs\subtypes\standard.dm"