Skip to content
Open
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
9 changes: 5 additions & 4 deletions code/__DEFINES/bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@
// #define LIMB_COLOR_VOIDWALKER_CURSE 50

// // Overlay priorities
// #define BODYPART_OVERLAY_FISH_INFUSION 1
// #define BODYPART_OVERLAY_CARP_INFUSION 2
// #define BODYPART_OVERLAY_CSS_SUICIDE 3
// #define BODYPART_OVERLAY_VOIDWALKER_CURSE 4
#define BODYPART_OVERLAY_FISH_INFUSION 1
#define BODYPART_OVERLAY_CARP_INFUSION 2
#define BODYPART_OVERLAY_CSS_SUICIDE 3
#define BODYPART_OVERLAY_VOIDWALKER_CURSE 4
#define BODYPART_OVERLAY_MESH 5

// Bodypart surgery state
/// An incision has been made into the skin
Expand Down
2 changes: 1 addition & 1 deletion code/datums/bodypart_overlays/bodypart_overlay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@
return list()

/// Additionally color or texture the limb
/datum/bodypart_overlay/proc/modify_bodypart_appearance(datum/appearance)
/datum/bodypart_overlay/proc/modify_bodypart_appearance(image/appearance)
return
2 changes: 1 addition & 1 deletion code/datums/bodypart_overlays/markings_bodypart_overlay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
. += use_gender
. += draw_color

/datum/bodypart_overlay/simple/body_marking/can_draw_on_bodypart(mob/living/carbon/human/human)
/datum/bodypart_overlay/simple/body_marking/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
return icon_state != SPRITE_ACCESSORY_NONE

/datum/bodypart_overlay/simple/body_marking/get_image(layer, obj/item/bodypart/limb)
Expand Down
110 changes: 103 additions & 7 deletions code/datums/bodypart_overlays/texture_bodypart_overlay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
/// icon state for the texture
var/texture_icon_state
/// Cache the icon so we dont have to make a new one each time
var/cached_texture_icon
/// Priority of this texture - all textures with a lower priority will not be rendered
VAR_FINAL/icon/cached_texture_icon

/// Priority of this texture - all textures with a lower priority will outright not be rendered
var/overlay_priority = 0

/datum/bodypart_overlay/texture/New()
. = ..()
cached_texture_icon = icon(texture_icon, texture_icon_state)

/datum/bodypart_overlay/texture/modify_bodypart_appearance(datum/appearance)
/datum/bodypart_overlay/texture/modify_bodypart_appearance(image/appearance)
appearance.add_filter("bodypart_texture_[texture_icon_state]", 1, layering_filter(icon = cached_texture_icon, blend_mode = BLEND_INSET_OVERLAY))

/datum/bodypart_overlay/texture/generate_icon_cache()
Expand All @@ -29,19 +30,114 @@
blocks_emissive = EMISSIVE_BLOCK_NONE
texture_icon_state = "spacey"
texture_icon = 'icons/mob/human/textures.dmi'
// overlay_priority = BODYPART_OVERLAY_VOIDWALKER_CURSE
overlay_priority = BODYPART_OVERLAY_VOIDWALKER_CURSE

/datum/bodypart_overlay/texture/carpskin
texture_icon_state = "carpskin"
texture_icon = 'icons/mob/human/textures.dmi'
// overlay_priority = BODYPART_OVERLAY_CARP_INFUSION
overlay_priority = BODYPART_OVERLAY_CARP_INFUSION

/datum/bodypart_overlay/texture/checkered
texture_icon_state = "checkered"
texture_icon = 'icons/mob/human/textures.dmi'
// overlay_priority = BODYPART_OVERLAY_CSS_SUICIDE
overlay_priority = BODYPART_OVERLAY_CSS_SUICIDE

/datum/bodypart_overlay/texture/fishscale
texture_icon_state = "fishscale"
texture_icon = 'icons/mob/human/textures.dmi'
// overlay_priority = BODYPART_OVERLAY_FISH_INFUSION
overlay_priority = BODYPART_OVERLAY_FISH_INFUSION

/datum/bodypart_overlay/texture/mesh
texture_icon_state = "mesh_mask"
texture_icon = 'maplestation_modules/icons/mob/clothing/tail_suit_mask.dmi'
overlay_priority = BODYPART_OVERLAY_MESH
/// Icon state for displacement map that comes with the texture
var/displacement_icon_state = "mesh_mask_displacement"
/// Icon file for the displacement map that comes with the texture.
var/displacement_icon = 'maplestation_modules/icons/mob/clothing/tail_suit_mask.dmi'
/// Cache the displacement icon so we dont have to make a new one each time
VAR_FINAL/icon/cached_displacement_icon

/// Icon state for the lighting map that comes with the texture.
var/lighting_icon_state = "mesh_mask_lighting"
/// Icon file for the lighting map that comes with the texture.
var/lighting_icon = 'maplestation_modules/icons/mob/clothing/tail_suit_mask.dmi'
/// Cache the lighting icon so we dont have to make a new one each time
VAR_FINAL/icon/cached_lighting_icon

/// Color used for the outline filter
var/outline_color = "#080808"

/datum/bodypart_overlay/texture/mesh/New()
. = ..()
cached_displacement_icon = icon(displacement_icon, displacement_icon_state)
cached_lighting_icon = icon(lighting_icon, lighting_icon_state)

/datum/bodypart_overlay/texture/mesh/modify_bodypart_appearance(image/appearance)
if(!should_modify(appearance))
return

. = ..()
// adds a displacement map so the outline lines up with the bottom of the sprite
appearance.add_filter("displacement", 2, displacement_map_filter(cached_displacement_icon, size = 1))
// adds an outline so the texture doesn't end abruptly
appearance.add_filter("outline", 3, outline_filter(1, outline_color, OUTLINE_SHARP))
// adds a bit of lighting to make the texture look less flat
appearance.add_filter("lighting", 4, layering_filter(cached_lighting_icon, blend_mode = BLEND_MULTIPLY))
// forces white (blends better with the texture)
appearance.color = COLOR_WHITE

/datum/bodypart_overlay/texture/mesh/proc/should_modify(image/appearance)
// only apply to "real planes", ie not emissive or lighting or whatever
var/appearance_plane = PLANE_TO_TRUE(appearance.plane)
if(appearance_plane != FLOAT_PLANE && appearance_plane != GAME_PLANE)
return FALSE
// only apply to other mutant bodyparts. we filter by layer which is absolutely not ideal
var/appearance_layer = abs(appearance.layer)
if(appearance_layer != BODY_ADJ_LAYER && appearance_layer != BODY_FRONT_LAYER && appearance_layer != BODY_BEHIND_LAYER)
return FALSE
return TRUE

/datum/bodypart_overlay/texture/mesh/black
texture_icon_state = "mesh_mask"
outline_color = "#080808"

/datum/bodypart_overlay/texture/mesh/white
texture_icon_state = "mesh_mask_white"
outline_color = "#B2B2B2"

/datum/bodypart_overlay/texture/mesh/biosuit
texture_icon_state = "mesh_mask_biosuit"
outline_color = "#747182"

/datum/bodypart_overlay/texture/mesh/biosuit_dark
texture_icon_state = "mesh_mask_biosuit_dark"
outline_color = "#514F5B"

/datum/bodypart_overlay/texture/mesh/bombsuit
texture_icon_state = "mesh_mask_bombsuit"
outline_color = "#897B51"

/datum/bodypart_overlay/texture/mesh/bombsuit_white
texture_icon_state = "mesh_mask_bombsuit_white"
outline_color = "#A58975"

/datum/bodypart_overlay/texture/mesh/bombsuit_red
texture_icon_state = "mesh_mask_bombsuit_red"
outline_color = "#511D19"

/datum/bodypart_overlay/texture/mesh/firesuit
texture_icon_state = "mesh_mask_firesuit"
outline_color = "#262A33"

/datum/bodypart_overlay/texture/mesh/drake
texture_icon_state = "mesh_mask_drake"
outline_color = "#615C5A"

/datum/bodypart_overlay/texture/mesh/heretic
texture_icon_state = "mesh_mask_heretic"
outline_color = "#270B08"

/datum/bodypart_overlay/texture/mesh/space
texture_icon_state = "mesh_mask_space"
outline_color = "#1F1F1F"
16 changes: 16 additions & 0 deletions code/modules/antagonists/cult/cult_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,21 @@ Striking a noncultist, however, will tear their flesh."}
icon_state = "cult_hoodalt"
inhand_icon_state = null

/obj/item/clothing/head/hooded/cult_hoodie/alt/Initialize(mapload)
. = ..()
AddElement(/datum/element/equipment_bodypart_overlay, BODY_ZONE_HEAD, /datum/bodypart_overlay/texture/mesh/drake)

/obj/item/clothing/suit/hooded/cultrobes/alt
name = "cultist robes"
desc = "An armored set of robes worn by the followers of Nar'Sie."
icon_state = "cultrobesalt"
inhand_icon_state = null
hoodtype = /obj/item/clothing/head/hooded/cult_hoodie/alt

/obj/item/clothing/suit/hooded/cultrobes/alt/Initialize(mapload)
. = ..()
AddElement(/datum/element/equipment_bodypart_overlay, BODY_ZONE_CHEST, /datum/bodypart_overlay/texture/mesh/drake)

/obj/item/clothing/suit/hooded/cultrobes/alt/ghost
item_flags = DROPDEL

Expand Down Expand Up @@ -312,6 +320,10 @@ Striking a noncultist, however, will tear their flesh."}
max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT
resistance_flags = NONE

/obj/item/clothing/suit/hooded/cultrobes/hardened/Initialize(mapload)
. = ..()
AddElement(/datum/element/equipment_bodypart_overlay, BODY_ZONE_CHEST, /datum/bodypart_overlay/texture/mesh/drake)

/datum/armor/cultrobes_hardened
melee = 50
bullet = 40
Expand All @@ -336,6 +348,10 @@ Striking a noncultist, however, will tear their flesh."}
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF
resistance_flags = NONE

/obj/item/clothing/head/hooded/cult_hoodie/hardened/Initialize(mapload)
. = ..()
AddElement(/datum/element/equipment_bodypart_overlay, BODY_ZONE_HEAD, /datum/bodypart_overlay/texture/mesh/drake)

/datum/armor/cult_hoodie_hardened
melee = 50
bullet = 40
Expand Down
5 changes: 5 additions & 0 deletions code/modules/antagonists/heretic/items/heretic_armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/obj/item/clothing/head/hooded/cult_hoodie/eldritch/Initialize(mapload)
. = ..()
AddElement(/datum/element/heretic_focus)
AddElement(/datum/element/equipment_bodypart_overlay, BODY_ZONE_HEAD, /datum/bodypart_overlay/texture/mesh/heretic)

/obj/item/clothing/suit/hooded/cultrobes/eldritch
name = "ominous armor"
Expand All @@ -25,6 +26,10 @@
// Slightly better than normal cult robes
armor_type = /datum/armor/cultrobes_eldritch

/obj/item/clothing/suit/hooded/cultrobes/eldritch/Initialize(mapload)
. = ..()
AddElement(/datum/element/equipment_bodypart_overlay, BODY_ZONE_CHEST, /datum/bodypart_overlay/texture/mesh/heretic)

/datum/armor/cultrobes_eldritch
melee = 50
bullet = 50
Expand Down
4 changes: 4 additions & 0 deletions code/modules/clothing/head/hardhat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@
visor_flags_inv = NONE
visor_state = "weldvisor_atmos"

/obj/item/clothing/head/utility/hardhat/welding/atmos/Initialize(mapload)
. = ..()
AddElement(/datum/element/equipment_bodypart_overlay, BODY_ZONE_HEAD, /datum/bodypart_overlay/texture/mesh/firesuit)

/obj/item/clothing/head/utility/hardhat/welding/atmos/worn_overlays(mutable_appearance/standing, isinhands, icon_file)
. = ..()
if(!isinhands)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/clothing/spacesuits/_spacesuits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
if(fishing_modifier)
AddComponent(/datum/component/adjust_fishing_difficulty, fishing_modifier)
add_stabilizer()
AddElement(/datum/element/equipment_bodypart_overlay, BODY_ZONE_HEAD, /datum/bodypart_overlay/texture/mesh/space)

/obj/item/clothing/head/helmet/space/proc/add_stabilizer(loose_hat = TRUE)
AddComponent(/datum/component/hat_stabilizer, loose_hat = loose_hat)
Expand Down Expand Up @@ -99,6 +100,7 @@

if(fishing_modifier)
AddComponent(/datum/component/adjust_fishing_difficulty, fishing_modifier)
AddElement(/datum/element/equipment_bodypart_overlay, BODY_ZONE_CHEST, /datum/bodypart_overlay/texture/mesh/space)

/// Start Processing on the space suit when it is worn to heat the wearer
/obj/item/clothing/suit/space/equipped(mob/living/user, slot)
Expand Down
10 changes: 9 additions & 1 deletion code/modules/clothing/suits/armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,14 @@
. = ..()
AddComponent(/datum/component/adjust_fishing_difficulty, 5)
init_rustle_component()
init_equipment_overlay()

/obj/item/clothing/suit/armor/riot/proc/init_rustle_component()
AddComponent(/datum/component/item_equipped_movement_rustle)

/obj/item/clothing/suit/armor/riot/proc/init_equipment_overlay()
AddElement(/datum/element/equipment_bodypart_overlay, BODY_ZONE_CHEST, /datum/bodypart_overlay/texture/mesh/black)

/datum/armor/armor_riot
melee = 50
bullet = 10
Expand Down Expand Up @@ -515,7 +519,11 @@
/obj/item/nullrod,
/obj/item/tank/internals/emergency_oxygen,
/obj/item/tank/internals/plasmaman,
)
)

/obj/item/clothing/suit/armor/riot/knight/init_equipment_overlay()
AddElement(/datum/element/equipment_bodypart_overlay, BODY_ZONE_CHEST, /datum/bodypart_overlay/texture/mesh/biosuit_dark)

/obj/item/clothing/suit/armor/riot/knight/init_rustle_component()
AddComponent(/datum/component/item_equipped_movement_rustle, SFX_PLATE_ARMOR_RUSTLE, 8)

Expand Down
7 changes: 7 additions & 0 deletions code/modules/clothing/suits/bio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDEFACE|HIDESNOUT
resistance_flags = ACID_PROOF
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF
var/texture_type = /datum/bodypart_overlay/texture/mesh/biosuit
// Icon_state passed into clothing dirt component
var/dirt_state = "bio_dirt"

Expand All @@ -20,6 +21,7 @@
AddComponent(/datum/component/clothing_dirt, dirt_state)
AddComponent(/datum/component/adjust_fishing_difficulty, 6)
AddComponent(/datum/component/hat_stabilizer, loose_hat = TRUE)
AddElement(/datum/element/equipment_bodypart_overlay, BODY_ZONE_HEAD, texture_type)

/datum/armor/head_bio_hood
bio = 100
Expand All @@ -43,10 +45,12 @@
strip_delay = 70
equip_delay_other = 70
resistance_flags = ACID_PROOF
var/texture_type = /datum/bodypart_overlay/texture/mesh/biosuit

/obj/item/clothing/suit/bio_suit/Initialize(mapload)
. = ..()
AddComponent(/datum/component/adjust_fishing_difficulty, 6)
AddElement(/datum/element/equipment_bodypart_overlay, BODY_ZONE_CHEST, texture_type)

//Standard biosuit, orange stripe
/datum/armor/suit_bio_suit
Expand Down Expand Up @@ -103,9 +107,11 @@
//Janitor's biosuit, grey with purple arms
/obj/item/clothing/head/bio_hood/janitor
icon_state = "bio_janitor"
texture_type = /datum/bodypart_overlay/texture/mesh/biosuit_dark

/obj/item/clothing/suit/bio_suit/janitor
icon_state = "bio_janitor"
texture_type = /datum/bodypart_overlay/texture/mesh/biosuit_dark

/obj/item/clothing/suit/bio_suit/janitor/Initialize(mapload)
. = ..()
Expand Down Expand Up @@ -137,6 +143,7 @@
inhand_icon_state = "bio_suit"
strip_delay = 40
equip_delay_other = 20
texture_type = /datum/bodypart_overlay/texture/mesh/black

/obj/item/clothing/suit/bio_suit/plaguedoctorsuit/Initialize(mapload)
. = ..()
Expand Down
Loading
Loading