Converts Eye Augments to Cybernetic Eyes (#15519)

* Converts Eye Augments to Cybernetic Eyes

* literally not used

* it helps when you properly include all the code

* flashlight eyes

* tweaks

* conflict resolution

* can't have two eyes

* order of operations matters here

* autosurgeon
This commit is contained in:
Fox McCloud
2021-03-03 20:21:30 +00:00
committed by GitHub
parent dcace52184
commit 75935ff876
47 changed files with 339 additions and 382 deletions
+6
View File
@@ -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
+1 -1
View File
@@ -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]
+1 -2
View File
@@ -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
+10 -22
View File
@@ -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)
-8
View File
@@ -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
+4 -4
View File
@@ -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)
+1 -1
View File
@@ -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)
@@ -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, "<span class='notice'>We adjust our eyes to protect them from bright lights.</span>")
else
to_chat(user, "<span class='warning'>We can't adjust our eyes if we don't have any!</span>")
/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, "<span class='notice'>We adjust our eyes to sense prey through walls.</span>")
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, "<span class='notice'>We adjust our eyes to protect them from bright lights.</span>")
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, "<span class='warning'>We can't adjust our eyes if we don't have any!</span>")
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()
..()
+1 -1
View File
@@ -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, "<span class='shadowling'><b>You see the truth. Reality has been torn away and you realize what a fool you've been.</b></span>")
to_chat(new_thrall_mind.current, "<span class='shadowling'><b>The shadowlings are your masters.</b> Serve them above all else and ensure they complete their goals.</span>")
to_chat(new_thrall_mind.current, "<span class='shadowling'>You may not harm other thralls or the shadowlings. However, you do not need to obey other thralls.</span>")
@@ -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, "<span class='notice'>You return your vision to normal.</span>")
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."
@@ -99,7 +99,6 @@ GLOBAL_LIST_INIT(possibleShadowlingNames, list("U'ruan", "Y`shej", "Nex", "Hel-u
sleep(10)
to_chat(H, "<span class='shadowling'><b><i>Your powers are awoken. You may now live to your fullest extent. Remember your goal. Cooperate with your thralls and allies.</b></i></span>")
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))
+1 -1
View File
@@ -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
-3
View File
@@ -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("<span class='disarm'><b>[L]</b> gasps and shields [L.p_their()] eyes!</span>")
/obj/machinery/flasher/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
@@ -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
-5
View File
@@ -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("<span class='disarm'>[user] blinds [M] with the flash!</span>")
to_chat(user, "<span class='danger'>You blind [M] with the flash!</span>")
to_chat(M, "<span class='userdanger'>[user] blinds you with the flash!</span>")
if(M.weakeyes)
M.Stun(2)
M.visible_message("<span class='disarm'>[M] gasps and shields [M.p_their()] eyes!</span>", "<span class='userdanger'>You gasp and shield your eyes!</span>")
else
visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
to_chat(user, "<span class='warning'>You fail to blind [M] with the flash!</span>")
@@ -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()
@@ -108,8 +108,6 @@
//20% chance to actually hit the eyes
if(prob(effectchance * diode.rating) && C.flash_eyes(severity))
outmsg = "<span class='notice'>You blind [C] by shining [src] in [C.p_their()] eyes.</span>"
if(C.weakeyes)
C.Stun(1)
else
outmsg = "<span class='warning'>You fail to blind [C] by shining [src] at [C.p_their()] eyes!</span>"
@@ -50,17 +50,6 @@
// Flash
if(flash)
if(M.weakeyes)
M.visible_message("<span class='disarm'><b>[M]</b> screams and collapses!</span>")
to_chat(M, "<span class='userdanger'><font size=3>AAAAGH!</font></span>")
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)
@@ -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)
@@ -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)
+8
View File
@@ -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
@@ -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()
+4 -13
View File
@@ -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()
@@ -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)
@@ -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)
@@ -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)
@@ -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
@@ -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
@@ -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
@@ -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, "<span class='notice'>You adjust your vision to pierce the darkness.</span>")
else
H.set_sight(null)
to_chat(H, "<span class='notice'>You adjust your vision to recognize the shadows.</span>")
/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))
@@ -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
@@ -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"
-1
View File
@@ -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
@@ -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
+2 -2
View File
@@ -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
)
+1 -82
View File
@@ -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, "<span class='notice'>[aug_message]</span>")
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, "<span class='warning'>Static obfuscates your vision!</span>")
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
@@ -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--
@@ -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, "<span class='notice'>[src] currently has no implant stored.</span>")
return
storedorgan.insert(user)//insert stored organ into the user
user.visible_message("<span class='notice'>[user] presses a button on [src], and you hear a short mechanical noise.</span>", "<span class='notice'>You feel a sharp sting as [src] plunges into your body.</span>")
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, "<span class='notice'>[src] already has an implant stored.</span>")
return
if(!user.drop_item())
return
I.forceMove(src)
storedorgan = I
to_chat(user, "<span class='notice'>You insert the [I] into [src].</span>")
else if(istype(I, /obj/item/screwdriver))
if(!storedorgan)
to_chat(user, "<span class='notice'>There's no implant in [src] for you to remove.</span>")
else
storedorgan.forceMove(get_turf(user))
storedorgan = null
to_chat(user, "<span class='notice'>You remove the [storedorgan] from [src].</span>")
playsound(get_turf(user), I.usesound, 50, 1)
+103
View File
@@ -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, "<span class='alert'>[src] has already been used. The tools are dull and won't reactivate.</span>")
return
else if(!storedorgan)
to_chat(user, "<span class='alert'>[src] currently has no implant stored.</span>")
return
storedorgan.insert(user) //insert stored organ into the user
user.visible_message("<span class='notice'>[user] presses a button on [src], and you hear a short mechanical noise.</span>", "<span class='notice'>You feel a sharp sting as [src] plunges into your body.</span>")
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, "<span class='alert'>[src] already has an implant stored.</span>")
return
else if(!uses)
to_chat(user, "<span class='alert'>[src] has already been used up.</span>")
return
if(!user.drop_item())
return
I.forceMove(src)
storedorgan = I
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
else
return ..()
/obj/item/autosurgeon/organ/screwdriver_act(mob/living/user, obj/item/I)
if(..())
return TRUE
if(!storedorgan)
to_chat(user, "<span class='warning'>There's no implant in [src] for you to remove!</span>")
else
storedorgan.forceMove(user.drop_location())
to_chat(user, "<span class='notice'>You remove [storedorgan] from [src].</span>")
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
+114 -5
View File
@@ -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, "<span class='warning'>Static obfuscates your vision!</span>")
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
@@ -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)
@@ -1,3 +0,0 @@
/obj/item/organ/internal/eyes/shadow
name = "dark orbs"
see_in_dark = 8
@@ -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()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 40 KiB

+1 -2
View File
@@ -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"