diff --git a/code/modules/organs/internal/_internal.dm b/code/modules/organs/internal/_internal.dm index b6f29f66e61..7e8197ae3d6 100644 --- a/code/modules/organs/internal/_internal.dm +++ b/code/modules/organs/internal/_internal.dm @@ -7,7 +7,12 @@ var/unknown_pain_location = TRUE // if TRUE, pain messages will point to the parent organ, otherwise it will print the organ name var/toxin_type = "undefined" var/relative_size = 25 //Used for size calcs + /// The icon state to overlay on the mob var/on_mob_icon + /// If the icon state has an active overlay + var/active_overlay = FALSE + /// If the icon state has an active emissive overlay + var/active_emissive = FALSE var/list/possible_modifications = list("Normal","Assisted","Mechanical") //this is used in the character setup min_broken_damage = 10 //Internal organs are frail, man. diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index d1eacca3092..28a3a2beb3d 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -186,6 +186,13 @@ var/nymph_child + ///Whether the limb has an emissive icon state associated with it + var/is_emissive = FALSE + ///Whether the limb has an active overlay icon state associated with it + var/is_overlay = FALSE + ///Whether the limb is a tesla limb (required for special handling) + var/is_tesla = FALSE + /obj/item/organ/external/proc/invalidate_marking_cache() cached_markings = null @@ -320,6 +327,9 @@ robotize(robotize_type) drop_sound = 'sound/items/drop/prosthetic.ogg' pickup_sound = 'sound/items/pickup/prosthetic.ogg' + else + //HACK: Make sure non-emissive organs, if swapped to, are not treated as emissive. Robotized organs have their own handling, but we still need to cover the case where it is somehow swapped to an organic limb + is_emissive = initial(is_emissive) . = ..(mapload, FALSE) if(isnull(pain_disability_threshold)) @@ -702,6 +712,8 @@ This function completely restores a damaged organ to perfect condition. /obj/item/organ/external/proc/need_process() if((status & ORGAN_ASSISTED) && surge_damage) return TRUE + if(is_tesla && owner) + return TRUE if(BP_IS_ROBOTIC(src)) return FALSE if(get_pain()) @@ -721,6 +733,17 @@ This function completely restores a damaged organ to perfect condition. /obj/item/organ/external/process() if(owner) + //Specialized handling for tesla limbs. Checks if the limb currently has an associated tesla spine. Else, will disable the emissive and active overlays + if(is_tesla) + var/obj/item/organ/internal/augment/tesla/T = owner.internal_organs_by_name[BP_AUG_TESLA] + if(T && !T.is_broken()) + is_emissive = initial(is_emissive) + is_overlay = initial(is_overlay) + else + is_emissive = FALSE + is_overlay = FALSE + return + // Process wounds, doing healing etc. Only do this every few ticks to save processing power if(owner.life_tick % wound_update_accuracy == 0) update_wounds() @@ -1260,6 +1283,18 @@ Note that amputating the affected organ does in fact remove the infection from t desc = "[R.desc]" if(R.paintable || !isnull(override_robotize_painted)) painted = !isnull(override_robotize_painted) ? override_robotize_painted : TRUE + if(R.emissive) + is_emissive = TRUE + else + is_emissive = FALSE + if(R.overlay) + is_overlay = TRUE + else + is_overlay = FALSE + if(R.is_tesla) + is_tesla = TRUE + else + is_tesla = FALSE brute_mod = R.brute_mod burn_mod = R.burn_mod robotize_type = company diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index c97e1c50542..f79699eac7c 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -161,6 +161,24 @@ AddOverlays(organ_icon) mob_icon.Blend(organ_icon, ICON_OVERLAY) + if(O.blocks_emissive != EMISSIVE_BLOCK_NONE) { + var/mutable_appearance/organ_em_block = emissive_blocker(internal_organ_icon, O.item_state || O.icon_state, MOB_SHADOW_LAYER) + organ_em_block.dir = dir + mob_overlays += list(organ_em_block) + } + + if(O.active_overlay && !O.is_broken()) { + var/mutable_appearance/active_overlay = overlay_image(internal_organ_icon, "[O.item_state || O.icon_state]_overlay") + active_overlay.dir = dir + mob_overlays += list(active_overlay) + } + + if(O.active_emissive && !O.is_broken()) { + var/mutable_appearance/organ_em = emissive_appearance(internal_organ_icon, "[O.item_state || O.icon_state]_e", MOB_EMISSIVE_LAYER) + organ_em.dir = dir + mob_overlays += list(organ_em) + } + /obj/item/organ/external/var/icon_cache_key /obj/item/organ/external/proc/get_icon(var/skeletal) @@ -171,11 +189,24 @@ var/chosen_icon var/chosen_icon_state + mob_overlays = list() + if(force_icon) chosen_icon = force_icon chosen_icon_state = "[icon_name][gendered_icon ? "_[gender]" : ""]" mob_icon = new /icon(force_icon, chosen_icon_state) - AddOverlays(emissive_blocker(chosen_icon, chosen_icon_state)) + if(blocks_emissive != EMISSIVE_BLOCK_NONE) + var/mutable_appearance/limb_em_block = emissive_blocker(chosen_icon, chosen_icon_state, MOB_SHADOW_LAYER) + limb_em_block.dir = dir + mob_overlays += list(limb_em_block) + if(is_emissive && !is_broken()) + var/mutable_appearance/limb_em = emissive_appearance(chosen_icon, "[chosen_icon_state]_e", MOB_EMISSIVE_LAYER) + limb_em.dir = dir + mob_overlays += list(limb_em) + if(is_overlay && !is_broken()) + var/mutable_appearance/limb_overlay = overlay_image(chosen_icon, "[chosen_icon_state]_overlay") + limb_overlay.dir = dir + mob_overlays += list(limb_overlay) if((painted && skin_color) || robotize_type == PROSTHETIC_SYNTHSKIN) mob_icon.Blend(skin_color, ICON_ADD) if(!isnull(s_tone)) @@ -190,9 +221,15 @@ chosen_icon = 'icons/mob/human_races/human/r_human.dmi' chosen_icon_state = "[icon_name][gendered_icon ? "_[gender]" : ""]" mob_icon = new /icon(chosen_icon, chosen_icon_state) - var/mutable_appearance/limb_em_block = emissive_blocker(chosen_icon, chosen_icon_state, MOB_SHADOW_LAYER) - limb_em_block.dir = dir - mob_overlays += list(limb_em_block) + if(blocks_emissive != EMISSIVE_BLOCK_NONE) + var/mutable_appearance/limb_em_block = emissive_blocker(chosen_icon, chosen_icon_state, MOB_SHADOW_LAYER) + limb_em_block.dir = dir + mob_overlays += list(limb_em_block) + + if(is_emissive && !is_broken()) + var/mutable_appearance/limb_em = emissive_appearance(chosen_icon, "[chosen_icon_state]_e", MOB_EMISSIVE_LAYER) + limb_em.dir = dir + mob_overlays += list(limb_em) else chosen_icon_state = "[icon_name][gendered_icon ? "_[gender]" : ""]" if(!gendered_icon) @@ -238,9 +275,15 @@ apply_markings() get_internal_organs_overlay() - var/mutable_appearance/limb_em_block = emissive_blocker(chosen_icon, chosen_icon_state, MOB_SHADOW_LAYER) - limb_em_block.dir = dir - mob_overlays += list(limb_em_block) + if(blocks_emissive != EMISSIVE_BLOCK_NONE) + var/mutable_appearance/limb_em_block = emissive_blocker(chosen_icon, chosen_icon_state, MOB_SHADOW_LAYER) + limb_em_block.dir = dir + mob_overlays += list(limb_em_block) + + if(is_emissive && !is_broken()) + var/mutable_appearance/limb_em = emissive_appearance(chosen_icon, "[chosen_icon_state]_e", MOB_EMISSIVE_LAYER) + limb_em.dir = dir + mob_overlays += list(limb_em) if(body_hair) var/list/limb_icon_cache = SSicon_cache.limb_icons_cache diff --git a/code/modules/organs/robolimbs.dm b/code/modules/organs/robolimbs.dm index 3e05b8f2211..45fa9ad00d6 100644 --- a/code/modules/organs/robolimbs.dm +++ b/code/modules/organs/robolimbs.dm @@ -48,6 +48,10 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) var/paintable = 0 /// If this prosthetic glows in the dark var/emissive = FALSE + /// If this prosthetic has an active overlay + var/overlay = FALSE + /// If this prosthetic is a tesla limb (required for some special handling) + var/is_tesla = FALSE /// Which IPC species this prosthetic type will create. var/linked_frame = SPECIES_IPC_UNBRANDED /// How resistant this prosthetic type is to brute damage. @@ -98,6 +102,7 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) linked_frame = SPECIES_IPC_BISHOP fabricator_available = TRUE allows_internal = FALSE + emissive = TRUE /datum/robolimb/hesphaistos company = PROSTHETIC_HI @@ -106,6 +111,7 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) linked_frame = SPECIES_IPC_G2 fabricator_available = TRUE allows_internal = FALSE + emissive = TRUE /datum/robolimb/zenghu company = PROSTHETIC_ZH @@ -114,6 +120,7 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) linked_frame = SPECIES_IPC_ZENGHU fabricator_available = TRUE allows_internal = FALSE + emissive = TRUE /datum/robolimb/xion company = PROSTHETIC_XMG @@ -122,6 +129,7 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) linked_frame = SPECIES_IPC_XION fabricator_available = TRUE allows_internal = FALSE + emissive = TRUE /datum/robolimb/ipc company = PROSTHETIC_IPC @@ -141,6 +149,7 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) linked_frame = SPECIES_IPC_G1 fabricator_available = TRUE allows_internal = FALSE + emissive = TRUE /datum/robolimb/terminator company = PROSTHETIC_HK @@ -175,6 +184,9 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) species_can_use = list(SPECIES_TAJARA, SPECIES_TAJARA_ZHAN, SPECIES_TAJARA_MSAI) internal_organ_suffix = "tesla" allowed_internal_organs = list(BP_HEART, BP_EYES, BP_LUNGS, BP_LIVER, BP_KIDNEYS, BP_STOMACH, BP_APPENDIX) + overlay = TRUE + emissive = TRUE + is_tesla = TRUE /datum/robolimb/tesla/malfunctioning_check(var/mob/living/carbon/human/H) var/obj/item/organ/internal/augment/tesla/T = H.internal_organs_by_name[BP_AUG_TESLA] @@ -221,6 +233,7 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) linked_frame = SPECIES_IPC icon = 'icons/mob/human_races/ipc/indricus.dmi' allowed_external_organs = list(BP_HEAD) + emissive = TRUE /datum/robolimb/raxus company = PROSTHETIC_RAXUS @@ -231,6 +244,7 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) linked_frame = SPECIES_IPC icon = 'icons/mob/human_races/ipc/raxus.dmi' allowed_external_organs = list(BP_HEAD) + emissive = TRUE /datum/robolimb/selen company = PROSTHETIC_SELEN diff --git a/code/modules/organs/subtypes/augment/augments/tesla.dm b/code/modules/organs/subtypes/augment/augments/tesla.dm index 338e8965a45..751377c43f8 100644 --- a/code/modules/organs/subtypes/augment/augments/tesla.dm +++ b/code/modules/organs/subtypes/augment/augments/tesla.dm @@ -1,8 +1,11 @@ /obj/item/organ/internal/augment/tesla name = "tesla spine" + icon = 'icons/mob/human_races/augments_external.dmi' icon_state = "tesla_spine" organ_tag = BP_AUG_TESLA on_mob_icon = 'icons/mob/human_races/augments_external.dmi' + active_overlay = TRUE + active_emissive = TRUE species_restricted = list(SPECIES_TAJARA, SPECIES_TAJARA_ZHAN, SPECIES_TAJARA_MSAI) var/max_charges = 1 var/actual_charges = 0 diff --git a/code/modules/organs/subtypes/industrial.dm b/code/modules/organs/subtypes/industrial.dm index 4e7a868a981..55cc3ff5902 100644 --- a/code/modules/organs/subtypes/industrial.dm +++ b/code/modules/organs/subtypes/industrial.dm @@ -1,28 +1,36 @@ // Heads /obj/item/organ/external/head/ipc/industrial/hephaestus robotize_type = PROSTHETIC_HI + is_emissive = TRUE /obj/item/organ/external/head/ipc/industrial/xion robotize_type = PROSTHETIC_XMG + is_emissive = TRUE /obj/item/organ/external/head/ipc/industrial/zenghu robotize_type = PROSTHETIC_ZH + is_emissive = TRUE /obj/item/organ/external/head/ipc/industrial/bishop robotize_type = PROSTHETIC_BC + is_emissive = TRUE // Chest /obj/item/organ/external/chest/ipc/industrial/hephaestus robotize_type = PROSTHETIC_HI + is_emissive = TRUE /obj/item/organ/external/chest/ipc/industrial/xion robotize_type = PROSTHETIC_XMG + is_emissive = TRUE /obj/item/organ/external/chest/ipc/industrial/zenghu robotize_type = PROSTHETIC_ZH + is_emissive = TRUE /obj/item/organ/external/chest/ipc/industrial/bishop robotize_type = PROSTHETIC_BC + is_emissive = TRUE // Groin /obj/item/organ/external/groin/ipc/industrial/hephaestus @@ -40,25 +48,32 @@ // Left Arm /obj/item/organ/external/arm/ipc/industrial/hephaestus robotize_type = PROSTHETIC_HI + is_emissive = TRUE /obj/item/organ/external/arm/ipc/industrial/xion robotize_type = PROSTHETIC_XMG + is_emissive = TRUE /obj/item/organ/external/arm/ipc/industrial/zenghu robotize_type = PROSTHETIC_ZH + is_emissive = TRUE /obj/item/organ/external/arm/ipc/industrial/bishop robotize_type = PROSTHETIC_BC + is_emissive = TRUE // Right Arm /obj/item/organ/external/arm/right/ipc/industrial/hephaestus robotize_type = PROSTHETIC_HI + is_emissive = TRUE /obj/item/organ/external/arm/right/ipc/industrial/xion robotize_type = PROSTHETIC_XMG + is_emissive = TRUE /obj/item/organ/external/arm/right/ipc/industrial/zenghu robotize_type = PROSTHETIC_ZH + is_emissive = TRUE /obj/item/organ/external/arm/right/ipc/industrial/bishop robotize_type = PROSTHETIC_BC @@ -66,28 +81,36 @@ // Left Leg /obj/item/organ/external/leg/ipc/industrial/hephaestus robotize_type = PROSTHETIC_HI + is_emissive = TRUE /obj/item/organ/external/leg/ipc/industrial/xion robotize_type = PROSTHETIC_XMG + is_emissive = TRUE /obj/item/organ/external/leg/ipc/industrial/zenghu robotize_type = PROSTHETIC_ZH + is_emissive = TRUE /obj/item/organ/external/leg/ipc/industrial/bishop robotize_type = PROSTHETIC_BC + is_emissive = TRUE // Right Leg /obj/item/organ/external/leg/right/ipc/industrial/hephaestus robotize_type = PROSTHETIC_HI + is_emissive = TRUE /obj/item/organ/external/leg/right/ipc/industrial/xion robotize_type = PROSTHETIC_XMG + is_emissive = TRUE /obj/item/organ/external/leg/right/ipc/industrial/zenghu robotize_type = PROSTHETIC_ZH + is_emissive = TRUE /obj/item/organ/external/leg/right/ipc/industrial/bishop robotize_type = PROSTHETIC_BC + is_emissive = TRUE // Left foot /obj/item/organ/external/foot/ipc/industrial/hephaestus @@ -101,6 +124,7 @@ /obj/item/organ/external/foot/ipc/industrial/bishop robotize_type = PROSTHETIC_BC + is_emissive = TRUE // Right foot /obj/item/organ/external/foot/right/ipc/industrial/hephaestus @@ -114,7 +138,9 @@ /obj/item/organ/external/foot/right/ipc/industrial/bishop robotize_type = PROSTHETIC_BC + is_emissive = TRUE +// Left hand /obj/item/organ/external/hand/ipc/industrial/hephaestus robotize_type = PROSTHETIC_HI @@ -123,6 +149,7 @@ /obj/item/organ/external/hand/ipc/industrial/zenghu robotize_type = PROSTHETIC_ZH + is_emissive = TRUE /obj/item/organ/external/hand/ipc/industrial/bishop robotize_type = PROSTHETIC_BC @@ -136,6 +163,7 @@ /obj/item/organ/external/hand/right/ipc/industrial/zenghu robotize_type = PROSTHETIC_ZH + is_emissive = TRUE /obj/item/organ/external/hand/right/ipc/industrial/bishop robotize_type = PROSTHETIC_BC diff --git a/code/modules/organs/subtypes/machine.dm b/code/modules/organs/subtypes/machine.dm index ecc47c31dfd..656ad345330 100644 --- a/code/modules/organs/subtypes/machine.dm +++ b/code/modules/organs/subtypes/machine.dm @@ -497,11 +497,13 @@ can_intake_reagents = 0 encased = "support frame" robotize_type = PROSTHETIC_IND + is_emissive = TRUE /obj/item/organ/external/chest/ipc/industrial dislocated = -1 encased = "support frame" robotize_type = PROSTHETIC_IND + is_emissive = TRUE /obj/item/organ/external/groin/ipc/industrial dislocated = -1 diff --git a/html/changelogs/GeneralCamo - Prosthetic Glow.yml b/html/changelogs/GeneralCamo - Prosthetic Glow.yml new file mode 100644 index 00000000000..4d9ce123c4c --- /dev/null +++ b/html/changelogs/GeneralCamo - Prosthetic Glow.yml @@ -0,0 +1,58 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: GeneralCamo + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Prosthetics with lights now have emissives." diff --git a/icons/mob/human_races/augments_external.dmi b/icons/mob/human_races/augments_external.dmi index d0eeca03862..6b6dbd4b87c 100644 Binary files a/icons/mob/human_races/augments_external.dmi and b/icons/mob/human_races/augments_external.dmi differ diff --git a/icons/mob/human_races/ipc/indricus.dmi b/icons/mob/human_races/ipc/indricus.dmi index 592dabeee05..da04ff8804b 100644 Binary files a/icons/mob/human_races/ipc/indricus.dmi and b/icons/mob/human_races/ipc/indricus.dmi differ diff --git a/icons/mob/human_races/ipc/r_ind_bishop.dmi b/icons/mob/human_races/ipc/r_ind_bishop.dmi index 9bb3417971e..85fd1a3e5b9 100644 Binary files a/icons/mob/human_races/ipc/r_ind_bishop.dmi and b/icons/mob/human_races/ipc/r_ind_bishop.dmi differ diff --git a/icons/mob/human_races/ipc/r_ind_hephaestus.dmi b/icons/mob/human_races/ipc/r_ind_hephaestus.dmi index 4c7e77672c0..18f4c8aa14b 100644 Binary files a/icons/mob/human_races/ipc/r_ind_hephaestus.dmi and b/icons/mob/human_races/ipc/r_ind_hephaestus.dmi differ diff --git a/icons/mob/human_races/ipc/r_ind_xion.dmi b/icons/mob/human_races/ipc/r_ind_xion.dmi index 8ee461e607e..bd85bcd3917 100644 Binary files a/icons/mob/human_races/ipc/r_ind_xion.dmi and b/icons/mob/human_races/ipc/r_ind_xion.dmi differ diff --git a/icons/mob/human_races/ipc/r_ind_zenghu.dmi b/icons/mob/human_races/ipc/r_ind_zenghu.dmi index 706eee9c199..e6cf0141fb1 100644 Binary files a/icons/mob/human_races/ipc/r_ind_zenghu.dmi and b/icons/mob/human_races/ipc/r_ind_zenghu.dmi differ diff --git a/icons/mob/human_races/ipc/r_industrial.dmi b/icons/mob/human_races/ipc/r_industrial.dmi index d07da57b3bd..b872521cc37 100644 Binary files a/icons/mob/human_races/ipc/r_industrial.dmi and b/icons/mob/human_races/ipc/r_industrial.dmi differ diff --git a/icons/mob/human_races/ipc/raxus.dmi b/icons/mob/human_races/ipc/raxus.dmi index c22fc54ce4c..e6a6fca6259 100644 Binary files a/icons/mob/human_races/ipc/raxus.dmi and b/icons/mob/human_races/ipc/raxus.dmi differ diff --git a/icons/mob/human_races/tajara/tesla_limbs.dmi b/icons/mob/human_races/tajara/tesla_limbs.dmi index 6b2452750bc..8b500148cb7 100644 Binary files a/icons/mob/human_races/tajara/tesla_limbs.dmi and b/icons/mob/human_races/tajara/tesla_limbs.dmi differ