mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 04:17:33 +01:00
Prosthetics with lights now glow (#20725)
 All prosthetics with lights now have emissives. Works with both IPCs and non-IPCs with appropriate prosthetics.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user