mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 22:17:32 +01:00
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:
@@ -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()
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user