mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
[MIRROR] Cybernetic Moth Eyes : Cybermoff 2077 [MDB IGNORE] (#23140)
* Cybernetic Moth Eyes : Cybermoff 2077 * Update _eyes.dm * Modular adjustments, and cleans up some skyrat edits while we're here * Adds the moth cybereyes as augment options * Revert "Adds the moth cybereyes as augment options" This reverts commit 7c91d01ed0c14d4a3ec435b2fc878267a7b8618b. * Update organs.dm * Update internal_HA.dmi --------- Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
co-authored by
jimmyl
Bloop
parent
267c47a37a
commit
1aa547866c
@@ -139,7 +139,6 @@
|
||||
if(overlay_ignore_lighting && !(obscured & ITEM_SLOT_EYES))
|
||||
eye_overlays += emissive_appearance(eye_left.icon, eye_left.icon_state, parent, -eyes_layer, alpha = eye_left.alpha) //SKYRAT EDIT CHANGE - TODO fix upstream
|
||||
eye_overlays += emissive_appearance(eye_right.icon, eye_right.icon_state, parent, -eyes_layer, alpha = eye_right.alpha) //SKYRAT EDIT CHANGE - TODO fix upstream
|
||||
|
||||
var/obj/item/bodypart/head/my_head = parent.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(my_head)
|
||||
if(my_head.head_flags & HEAD_EYECOLOR)
|
||||
@@ -417,12 +416,8 @@
|
||||
actions_types = list(/datum/action/item_action/organ_action/use, /datum/action/item_action/organ_action/toggle)
|
||||
var/max_light_beam_distance = 5
|
||||
var/obj/item/flashlight/eyelight/glow/eye
|
||||
/// The overlay that is used when both eyes are set to match the light color
|
||||
var/mutable_appearance/eyes_overlay
|
||||
/// The overlay that is used when custom color selection is enabled, for the left eye
|
||||
var/mutable_appearance/eyes_overlay_left
|
||||
/// The overlay that is used when custom color selection is enabled, for the right eye
|
||||
var/mutable_appearance/eyes_overlay_right
|
||||
/// base icon state for eye overlays
|
||||
var/base_eye_state = "eyes_glow_gs"
|
||||
/// Whether or not to match the eye color to the light or use a custom selection
|
||||
var/eye_color_mode = MATCH_LIGHT_COLOR
|
||||
/// The selected color for the light beam itself
|
||||
@@ -460,9 +455,6 @@
|
||||
|
||||
/obj/item/organ/internal/eyes/robotic/glow/on_remove(mob/living/carbon/eye_owner)
|
||||
deactivate(eye_owner, close_ui = TRUE)
|
||||
QDEL_NULL(eyes_overlay)
|
||||
QDEL_NULL(eyes_overlay_left)
|
||||
QDEL_NULL(eyes_overlay_right)
|
||||
eye.forceMove(src)
|
||||
return ..()
|
||||
|
||||
@@ -549,14 +541,14 @@
|
||||
eye.on = TRUE
|
||||
if(eye.light_range) // at range 0 we are just going to make the eyes glow emissively, no light overlay
|
||||
eye.set_light_on(TRUE)
|
||||
update_mob_eyes_overlay()
|
||||
update_mob_eye_color()
|
||||
|
||||
/**
|
||||
* Deactivates the light
|
||||
*
|
||||
* Turns off the attached flashlight object, closes UIs, updates the mob overlay to be removed.
|
||||
* Arguments:
|
||||
* * mob/living/carbon/eye_owner - the mob who the eyes belong to, for passing to update_mob_eyes_overlay
|
||||
* * mob/living/carbon/eye_owner - the mob who the eyes belong to
|
||||
* * close_ui - whether or not to close the ui
|
||||
*/
|
||||
/obj/item/organ/internal/eyes/robotic/glow/proc/deactivate(mob/living/carbon/eye_owner = owner, close_ui = FALSE)
|
||||
@@ -564,7 +556,7 @@
|
||||
SStgui.close_uis(src)
|
||||
eye.on = FALSE
|
||||
eye.set_light_on(FALSE)
|
||||
update_mob_eyes_overlay(eye_owner)
|
||||
update_mob_eye_color(eye_owner)
|
||||
|
||||
/**
|
||||
* Randomizes the light color
|
||||
@@ -656,44 +648,19 @@
|
||||
|
||||
if(QDELETED(eye_owner) || !ishuman(eye_owner)) //Other carbon mobs don't have eye color.
|
||||
return
|
||||
|
||||
eye_owner.dna.species.handle_body(eye_owner)
|
||||
update_mob_eyes_overlay()
|
||||
|
||||
/**
|
||||
* Updates the emissive mob eye overlay
|
||||
*
|
||||
* When the light is on, the overlay(s) are added. When it is disabled, they are cut.
|
||||
* Adds one or two overlays depending on what the eye_color_mode toggle is set to.
|
||||
* Arguments:
|
||||
* * mob/living/carbon/eye_owner - the mob to add the overlay to
|
||||
*/
|
||||
/obj/item/organ/internal/eyes/robotic/glow/proc/update_mob_eyes_overlay(mob/living/carbon/eye_owner = owner)
|
||||
if(QDELETED(eye_owner))
|
||||
return
|
||||
|
||||
if(!ishuman(eye_owner))
|
||||
return
|
||||
|
||||
eye_owner.cut_overlay(eyes_overlay)
|
||||
eye_owner.cut_overlay(eyes_overlay_left)
|
||||
eye_owner.cut_overlay(eyes_overlay_right)
|
||||
|
||||
|
||||
if(!eye.on)
|
||||
return
|
||||
eye_icon_state = initial(eye_icon_state)
|
||||
overlay_ignore_lighting = FALSE
|
||||
else
|
||||
overlay_ignore_lighting = TRUE
|
||||
eye_icon_state = base_eye_state
|
||||
|
||||
switch(eye_color_mode)
|
||||
if(MATCH_LIGHT_COLOR)
|
||||
eyes_overlay = emissive_appearance('icons/mob/human/human_face.dmi', "eyes_glow_gs", eye_owner, layer = -BODY_LAYER, alpha = owner.alpha)
|
||||
eyes_overlay.color = current_color_string
|
||||
eye_owner.add_overlay(eyes_overlay)
|
||||
if(USE_CUSTOM_COLOR)
|
||||
eyes_overlay_left = emissive_appearance('icons/mob/human/human_face.dmi', "eyes_glow_gs_left", eye_owner, layer = -BODY_LAYER, alpha = owner.alpha)
|
||||
eyes_overlay_right = emissive_appearance('icons/mob/human/human_face.dmi', "eyes_glow_gs_right", eye_owner, layer = -BODY_LAYER, alpha = owner.alpha)
|
||||
eyes_overlay_left.color = eye_color_left
|
||||
eyes_overlay_right.color = eye_color_right
|
||||
eye_owner.add_overlay(eyes_overlay_left)
|
||||
eye_owner.add_overlay(eyes_overlay_right)
|
||||
var/obj/item/bodypart/head/head = eye_owner.get_bodypart(BODY_ZONE_HEAD) //if we have eyes we definently have a head anyway
|
||||
var/previous_flags = head.head_flags
|
||||
head.head_flags = previous_flags | HEAD_EYECOLOR
|
||||
eye_owner.dna.species.handle_body(eye_owner)
|
||||
head.head_flags = previous_flags
|
||||
|
||||
#undef MATCH_LIGHT_COLOR
|
||||
#undef USE_CUSTOM_COLOR
|
||||
@@ -708,6 +675,44 @@
|
||||
icon_state = "eyeballs-moth"
|
||||
flash_protect = FLASH_PROTECTION_SENSITIVE
|
||||
|
||||
/obj/item/organ/internal/eyes/robotic/moth
|
||||
name = "robotic moth eyes"
|
||||
eye_icon_state = "motheyes"
|
||||
icon_state = "eyeballs-cybermoth"
|
||||
desc = "Your vision is augmented. Much like actual moth eyes, very sensitive to bright lights."
|
||||
flash_protect = FLASH_PROTECTION_SENSITIVE
|
||||
|
||||
/obj/item/organ/internal/eyes/robotic/basic/moth
|
||||
name = "basic robotic moth eyes"
|
||||
eye_icon_state = "motheyes"
|
||||
icon_state = "eyeballs-cybermoth"
|
||||
flash_protect = FLASH_PROTECTION_SENSITIVE
|
||||
|
||||
/obj/item/organ/internal/eyes/robotic/xray/moth
|
||||
name = "robotic eyes"
|
||||
eye_icon_state = "motheyes"
|
||||
icon_state = "eyeballs-cybermoth"
|
||||
desc = "These cybernetic imitation moth eyes will give you X-ray vision. Blinking is futile. Much like actual moth eyes, very sensitive to bright lights."
|
||||
flash_protect = FLASH_PROTECTION_SENSITIVE
|
||||
|
||||
/obj/item/organ/internal/eyes/robotic/shield/moth
|
||||
name = "shielded robotic moth eyes"
|
||||
eye_icon_state = "motheyes"
|
||||
icon_state = "eyeballs-cybermoth"
|
||||
|
||||
/obj/item/organ/internal/eyes/robotic/glow/moth
|
||||
name = "High Luminosity Moth Eyes"
|
||||
eye_icon_state = "motheyes"
|
||||
base_eye_state = "eyes_mothglow"
|
||||
icon_state = "eyeballs-cybermoth"
|
||||
desc = "Special glowing eyes, to be one with the lamp. Much like actual moth eyes, very sensitive to bright lights."
|
||||
flash_protect = FLASH_PROTECTION_SENSITIVE
|
||||
|
||||
/obj/item/organ/internal/eyes/robotic/thermals/moth //we inherit flash weakness from thermals
|
||||
name = "thermal moth eyes"
|
||||
eye_icon_state = "motheyes"
|
||||
icon_state = "eyeballs-cybermoth"
|
||||
|
||||
/obj/item/organ/internal/eyes/snail
|
||||
name = "snail eyes"
|
||||
desc = "These eyes seem to have a large range, but might be cumbersome with glasses."
|
||||
|
||||
Reference in New Issue
Block a user