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

IPC resprite #13754

Merged
merged 2 commits into from
Feb 1, 2025
Merged
Changes from 1 commit
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
Next Next commit
IPC resprite
volas committed Jan 29, 2025
commit e201f641c10b367f970a36945e7b1f29e4ecb54f
4 changes: 4 additions & 0 deletions code/modules/mob/living/carbon/species.dm
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@

var/icobase = 'icons/mob/human_races/r_human.dmi' // Normal icon set.
var/deform = 'icons/mob/human_races/r_def_human.dmi' // Mutated icon set.
var/alpha_color_mask = FALSE

var/damage_mask = TRUE
var/eyes_icon = 'icons/mob/human_face.dmi'
var/eyes = "eyes" // Icon for eyes.
@@ -1076,6 +1078,8 @@
name = IPC
icobase = 'icons/mob/human_races/r_machine.dmi'
deform = 'icons/mob/human_races/r_machine.dmi'
alpha_color_mask = TRUE

language = LANGUAGE_TRINARY
unarmed_type = /datum/unarmed_attack/punch
race_verbs = list(
45 changes: 27 additions & 18 deletions code/modules/organs/organ_external.dm
Original file line number Diff line number Diff line change
@@ -569,42 +569,51 @@ Note that amputating the affected organ does in fact remove the infection from t
return

update_sprite()
var/mutable_appearance/MA = mutable_appearance(icon, icon_state, -icon_layer)
MA.color = color
var/mutable_appearance/base_appearance = mutable_appearance(icon, icon_state, -icon_layer)
. = list(base_appearance)

return MA
if(species && species.alpha_color_mask)
var/mutable_appearance/color_appearance = mutable_appearance(icon, "alpha_[icon_state]", -icon_layer)
color_appearance.color = color
. += color_appearance
Comment on lines +575 to +578
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

заметка на будущее - если у каких-то рас будет маска только на одну часть тела, то мы можем alpha_color_mask из бинарного значения превратить в список частей тела, для которых требуется маска.

else
base_appearance.color = color

/obj/item/organ/external/head/get_icon(icon_layer)
if (!owner)
return

update_sprite()
var/mutable_appearance/MA = mutable_appearance(icon, icon_state, -icon_layer)
MA.color = color
. = list(MA)
var/mutable_appearance/base_appearance = mutable_appearance(icon, icon_state, -icon_layer)
. = list(base_appearance)

if(species && species.alpha_color_mask)
var/mutable_appearance/color_appearance = mutable_appearance(icon, "alpha_[icon_state]", -icon_layer)
color_appearance.color = color
. += color_appearance
else
base_appearance.color = color

//Eyes
if(species && species.eyes)
var/eyes_layer = -icon_layer
var/mutable_appearance/img_eyes_s = mutable_appearance(species.eyes_icon, species.eyes, eyes_layer)
var/mutable_appearance/eyes_appearance = mutable_appearance(species.eyes_icon, species.eyes, -icon_layer)
if(species.eyes_glowing)
img_eyes_s.plane = LIGHTING_LAMPS_PLANE
img_eyes_s.layer = ABOVE_LIGHTING_LAYER
eyes_appearance.plane = LIGHTING_LAMPS_PLANE
eyes_appearance.layer = ABOVE_LIGHTING_LAYER

if(HULK in owner.mutations)
img_eyes_s.color = "#ff0000"
eyes_appearance.color = "#ff0000"
else if(species.name == SHADOWLING || iszombie(owner))
img_eyes_s.color = null
eyes_appearance.color = null
else
img_eyes_s.color = rgb(owner.r_eyes, owner.g_eyes, owner.b_eyes)
eyes_appearance.color = rgb(owner.r_eyes, owner.g_eyes, owner.b_eyes)

. += img_eyes_s
. += eyes_appearance

//Mouth (lipstick!)
if(owner.lip_style && owner.species.flags[HAS_LIPS]) // skeletons are allowed to wear lipstick no matter what you think, agouri.
var/mutable_appearance/lips = mutable_appearance('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s", -icon_layer)
lips.color = owner.lip_color
. += lips
var/mutable_appearance/lips_appearance = mutable_appearance('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s", -icon_layer)
lips_appearance.color = owner.lip_color
. += lips_appearance

// Runs once when attached
/obj/item/organ/external/proc/check_rejection()
Binary file modified icons/mob/human_face.dmi
Binary file not shown.
Binary file modified icons/mob/human_races/r_machine.dmi
Binary file not shown.