Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synth Eye Emissives #19197

Merged
merged 2 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 42 additions & 40 deletions code/__DEFINES/icon_layering.dm
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
// Human Overlays Indexes //
// Layer 1 intentionally left empty.
#define FIRE_LAYER_LOWER 2
#define MUTATIONS_LAYER 3
#define SURGERY_LAYER 4
#define UNDERWEAR_LAYER 5
#define TAIL_SOUTH_LAYER 6
#define TAIL_SOUTH_ACC_LAYER 7
#define SHOES_LAYER_ALT 8
#define WRISTS_LAYER_UNDER 9
#define UNIFORM_LAYER 10
#define MOB_DAMAGE_LAYER 11
#define ID_LAYER 12
#define BANDAGE_LAYER 13
#define SHOES_LAYER 14
#define GLOVES_LAYER 15
#define BELT_LAYER 16
#define WRISTS_LAYER_UNIFORM 17
#define SUIT_LAYER 18
#define ID_LAYER_ALT 19
#define TAIL_NORTH_LAYER 20
#define TAIL_NORTH_ACC_LAYER 21
#define HAIR_LAYER_ALT 22
#define GLASSES_LAYER 23
#define BELT_LAYER_ALT 24
#define SUIT_STORE_LAYER 25
#define BACK_LAYER 26
#define HAIR_LAYER 27
#define GLASSES_LAYER_ALT 28
#define L_EAR_LAYER 29
#define R_EAR_LAYER 30
#define FACEMASK_LAYER 31
#define HEAD_LAYER 32
#define GLASSES_LAYER_OVER 33
#define COLLAR_LAYER 34
#define WRISTS_LAYER_OVER 35
#define HANDCUFF_LAYER 36
#define LEGCUFF_LAYER 37
#define L_HAND_LAYER 38
#define R_HAND_LAYER 39
#define FIRE_LAYER_UPPER 40
#define TOTAL_LAYERS 40
#define FIRE_LAYER_LOWER 2
#define MUTATIONS_LAYER 3
#define SURGERY_LAYER 4
#define UNDERWEAR_LAYER 5
#define TAIL_SOUTH_LAYER 6
#define TAIL_SOUTH_ACC_LAYER 7
#define SHOES_LAYER_ALT 8
#define WRISTS_LAYER_UNDER 9
#define UNIFORM_LAYER 10
#define MOB_DAMAGE_LAYER 11
#define ID_LAYER 12
#define BANDAGE_LAYER 13
#define SHOES_LAYER 14
#define GLOVES_LAYER 15
#define BELT_LAYER 16
#define WRISTS_LAYER_UNIFORM 17
#define SUIT_LAYER 18
#define ID_LAYER_ALT 19
#define TAIL_NORTH_LAYER 20
#define TAIL_NORTH_ACC_LAYER 21
#define HAIR_LAYER_ALT 22
#define HAIR_LAYER_ALT_EMISSIVE 23
#define GLASSES_LAYER 24
#define BELT_LAYER_ALT 25
#define SUIT_STORE_LAYER 26
#define BACK_LAYER 27
#define HAIR_LAYER 28
#define HAIR_LAYER_EMISSIVE 29
#define GLASSES_LAYER_ALT 30
#define L_EAR_LAYER 31
#define R_EAR_LAYER 32
#define FACEMASK_LAYER 33
#define HEAD_LAYER 34
#define GLASSES_LAYER_OVER 35
#define COLLAR_LAYER 36
#define WRISTS_LAYER_OVER 37
#define HANDCUFF_LAYER 38
#define LEGCUFF_LAYER 39
#define L_HAND_LAYER 40
#define R_HAND_LAYER 41
#define FIRE_LAYER_UPPER 42
#define TOTAL_LAYERS 42
////////////////////////////
4 changes: 3 additions & 1 deletion code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
//HIDING MOB
#define HIDING_MOB_LAYER 2.15
#define SHALLOW_FLUID_LAYER 2.16
#define MOB_SHADOW_LAYER 2.17
// OBJ
#define BELOW_DOOR_LAYER 2.18
#define OPEN_DOOR_LAYER 2.19
Expand All @@ -81,6 +80,9 @@
#define STRUCTURE_LAYER 2.24
//OBJ_LAYER 3
#define ABOVE_OBJ_LAYER 3.01
#define MOB_SHADOW_LAYER 3.011
#define MOB_EMISSIVE_LAYER 3.012
#define MOB_SHADOW_UPPER_LAYER 3.013
#define UNDERDOOR 3.015 //Just barely under a closed door. TODO: Obsolete?
#define CLOSED_DOOR_LAYER 3.02
#define ABOVE_DOOR_LAYER 3.03
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@
#define PROSTHETIC_TESLA_BODY "Industrial Tesla Powered Prosthetics"
#define PROSTHETIC_VAURCA "Vaurca Robotic Limb"
#define PROSTHETIC_UNBRANDED "Unbranded"
#define PROSTHETIC_UNBRANDED_EMISSIVE "Unbranded Emissive"
#define PROSTHETIC_HOPLAN "Hoplan Head"
#define PROSTHETIC_RAXUS "Raxus Head"
#define PROSTHETIC_INDRICUS "Indricus Head"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
default_genders = list(MALE, FEMALE)
selectable_pronouns = list(MALE, FEMALE, PLURAL, NEUTER)

alterable_internal_organs = list(BP_EYES)

burn_mod = 1.2
grab_mod = 1

Expand Down
8 changes: 8 additions & 0 deletions code/modules/mob/living/carbon/human/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ There are several things that need to be remembered:
//Reset our hair
overlays_raw[HAIR_LAYER] = null
overlays_raw[HAIR_LAYER_ALT] = null
overlays_raw[HAIR_LAYER_EMISSIVE] = null
overlays_raw[HAIR_LAYER_ALT_EMISSIVE] = null

var/obj/item/organ/external/head/head_organ = get_organ(BP_HEAD)
if(!head_organ || head_organ.is_stump() )
Expand Down Expand Up @@ -510,6 +512,12 @@ There are several things that need to be remembered:
var/hair_layer = species.use_alt_hair_layer ? HAIR_LAYER_ALT : HAIR_LAYER
overlays_raw[hair_layer] = hair_icon

if(has_visible_hair)
var/datum/sprite_accessory/hair_style = GLOB.hair_styles_list[h_style]
if(hair_style)
var/hair_emissive_layer = species.use_alt_hair_layer ? HAIR_LAYER_ALT_EMISSIVE : HAIR_LAYER_EMISSIVE
overlays_raw[hair_emissive_layer] = emissive_blocker(hair_icon, hair_style.icon_state, MOB_SHADOW_UPPER_LAYER)

if(update_icons)
update_icon()

Expand Down
17 changes: 14 additions & 3 deletions code/modules/organs/organ_icon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,25 @@

/obj/item/organ/external/head/get_additional_images(var/mob/living/carbon/human/H)
..()

if(!H.mind)
return mob_overlays

var/list/bonus_overlays = list()

var/obj/item/organ/internal/eyes/eyes = H.get_eyes()
if(eyes && BP_IS_ROBOTIC(eyes))
var/datum/robolimb/robolimb_data = GLOB.all_robolimbs[eyes.model]
if(robolimb_data.emissive)
var/mutable_appearance/return_image = emissive_appearance(H.species.eyes_icons, H.species.eyes, MOB_EMISSIVE_LAYER)
bonus_overlays += return_image

var/datum/vampire/vampire = H.mind.antag_datums[MODE_VAMPIRE]
if(vampire && (vampire.status & VAMP_FRENZIED))
var/mutable_appearance/return_image = emissive_appearance(H.species.eyes_icons, H, "[H.species.eyes]_frenzy")
mob_overlays += return_image
var/mutable_appearance/return_image = emissive_appearance(H.species.eyes_icons, "[H.species.eyes]_frenzy")
bonus_overlays += return_image

return mob_overlays
return mob_overlays + bonus_overlays

/obj/item/organ/external/proc/apply_markings(restrict_to_robotic = FALSE)
if (!cached_markings)
Expand Down
9 changes: 9 additions & 0 deletions code/modules/organs/robolimbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb)
)
/// If this prosthetic type is paintable.
var/paintable = 0
/// If this prosthetic glows in the dark
var/emissive = FALSE
/// Which IPC species this prosthetic type will create.
var/linked_frame = SPECIES_IPC_UNBRANDED
/// How resistant this prosthetic type is to brute damage.
Expand Down Expand Up @@ -81,6 +83,13 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb)
/datum/robolimb/proc/malfunctioning_check()
return FALSE

/datum/robolimb/emissive
company = PROSTHETIC_UNBRANDED_EMISSIVE
emissive = TRUE

allowed_internal_organs = list(BP_EYES)
allowed_external_organs = list()

/datum/robolimb/bishop
company = PROSTHETIC_BC
desc = "This limb is coated in a brilliant silver illuminated from the inside with blue status lights."
Expand Down
1 change: 1 addition & 0 deletions code/modules/organs/subtypes/machine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
icon_state = "camera"
dead_icon = "camera_broken"
robotic_sprite = FALSE
possible_modifications = list("Mechanical")

/obj/item/organ/internal/eyes/optical_sensor/Initialize()
robotize()
Expand Down
6 changes: 6 additions & 0 deletions html/changelogs/geeves-synth_eye_emissives.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
author: Geeves

delete-after: True

changes:
- rscadd: "Synthetic eyes can now glow in the dark. In character creation, when selecting the brand of the eyes, select Unbranded Emissive."
Loading