Skip to content

Commit

Permalink
Merge pull request TauCetiStation#3021 from ZVee/ltfixes
Browse files Browse the repository at this point in the history
Исправление на некорректный цвет глаз ксеносов, поинт то верба и сохранение выбранного скалирования.
  • Loading branch information
volas authored Jan 28, 2019
2 parents 8dc7ee6 + 0f9adeb commit 1d7c619
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 44 deletions.
7 changes: 6 additions & 1 deletion code/__DEFINES/colors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,9 @@

#define LIGHT_COLOR_FIRE "#FAA019" // Warm orange color, leaning strongly towards yellow. rgb(250, 160, 25)
#define LIGHT_COLOR_FLARE "#F93C2F" // Bright, non-saturated red. Leaning slightly towards pink for visibility. rgb(250, 100, 75)
#define LIGHT_COLOR_GHOST_CANDLE "#a2fad1" // Used by ghost candles. rgb(162, 250, 209)
#define LIGHT_COLOR_GHOST_CANDLE "#a2fad1" // Used by ghost candles. rgb(162, 250, 209)

//Human organ color mods
#define HULK_SKIN_TONE rgb(48, 224, 40) // human
#define HULK_SKIN_COLOR RGB_CONTRAST(35, 121, 11) // xenos
#define NECROSIS_COLOR_MOD list(0.33,0.33,0.33, 0.59,0.59,0.59, 0.11,0.11,0.11)
26 changes: 0 additions & 26 deletions code/modules/mob/living/carbon/human/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,6 @@ Please contact me on #coderbus IRC. ~Carn x
#define TOTAL_LIMB_LAYERS 7
//////////////////////////////////

//Human organ color mods//////////
#define HULK_SKIN_TONE rgb(48, 224, 40) // human
#define HULK_SKIN_COLOR RGB_CONTRAST(35, 121, 11) // xenos
#define NECROSIS_COLOR_MOD list(0.33,0.33,0.33, 0.59,0.59,0.59, 0.11,0.11,0.11)

/mob/living/carbon/human
var/list/overlays_standing[TOTAL_LAYERS]
var/list/overlays_damage[TOTAL_LIMB_LAYERS]
Expand Down Expand Up @@ -189,10 +184,7 @@ Please contact me on #coderbus IRC. ~Carn x
remove_overlay(BODY_LAYER)
var/list/standing = list()

var/husk = (HUSK in mutations)
var/fat = (FAT in mutations) ? "fat" : null
var/hulk = (HULK in mutations)

var/g = (gender == FEMALE ? "f" : "m")

var/mutable_appearance/base_icon = mutable_appearance(null, null, -BODY_LAYER)
Expand All @@ -213,20 +205,6 @@ Please contact me on #coderbus IRC. ~Carn x
else
temp = BP.get_icon(race_icon, deform_icon)

if(!husk)
if(BP.status & ORGAN_DEAD)
temp.color = NECROSIS_COLOR_MOD
else if (species.flags[HAS_SKIN_COLOR])
if(!hulk)
temp.color = RGB_CONTRAST(r_skin, g_skin, b_skin)
else
temp.color = HULK_SKIN_COLOR
else if(species.flags[HAS_SKIN_TONE])
if(!hulk)
temp.color = RGB_CONTRAST(s_tone, s_tone, s_tone)
else
temp.color = HULK_SKIN_TONE

base_icon.overlays += temp

standing += base_icon
Expand Down Expand Up @@ -965,7 +943,3 @@ Please contact me on #coderbus IRC. ~Carn x
#undef TARGETED_LAYER
#undef FIRE_LAYER
#undef TOTAL_LAYERS

#undef HULK_SKIN_TONE
#undef HULK_SKIN_COLOR
#undef NECROSIS_COLOR_MOD
1 change: 1 addition & 0 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@
var/obj/P = new /obj/effect/decal/point(tile)
P.pixel_x = A.pixel_x
P.pixel_y = A.pixel_y
P.plane = GAME_PLANE

QDEL_IN(P, 20)

Expand Down
41 changes: 28 additions & 13 deletions code/modules/organs/organ_external.dm
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,21 @@ Note that amputating the affected organ does in fact remove the infection from t
return 1
return 0

/obj/item/organ/external/proc/apply_body_color(mutable_appearance/MA)
if(status & ORGAN_DEAD)
MA.color = NECROSIS_COLOR_MOD
else if (owner.species.flags[HAS_SKIN_COLOR])
if(!(HULK in owner.mutations))
MA.color = RGB_CONTRAST(owner.r_skin, owner.g_skin, owner.b_skin)
else
MA.color = HULK_SKIN_COLOR
else if(owner.species.flags[HAS_SKIN_TONE])
if(!(HULK in owner.mutations))
MA.color = RGB_CONTRAST(owner.s_tone, owner.s_tone, owner.s_tone)
else
MA.color = HULK_SKIN_TONE
return MA

/obj/item/organ/external/get_icon(icon/race_icon, icon/deform_icon, gender = "", fat = "")
if (!owner)
return
Expand All @@ -931,15 +946,15 @@ Note that amputating the affected organ does in fact remove the infection from t
gender = ""

if (status & ORGAN_ROBOT && !owner.species.flags[IS_SYNTHETIC])
return mutable_appearance('icons/mob/human_races/robotic.dmi', "[body_zone][gender ? "_[gender]" : ""]")

if ((HUSK in owner.mutations) && !owner.species.flags[IS_SYNTHETIC])
. = mutable_appearance('icons/mob/human_races/robotic.dmi', "[body_zone][gender ? "_[gender]" : ""]")
else if ((HUSK in owner.mutations) && !owner.species.flags[IS_SYNTHETIC])
return mutable_appearance('icons/mob/human_races/husk.dmi', "[body_zone]")
else if (status & ORGAN_MUTATED)
. = mutable_appearance(deform_icon, "[body_zone][gender ? "_[gender]" : ""][fat ? "_[fat]" : ""]")
else
. = mutable_appearance(race_icon, "[body_zone][gender ? "_[gender]" : ""][fat ? "_[fat]" : ""]")

if (status & ORGAN_MUTATED)
return mutable_appearance(deform_icon, "[body_zone][gender ? "_[gender]" : ""][fat ? "_[fat]" : ""]")

return mutable_appearance(race_icon, "[body_zone][gender ? "_[gender]" : ""][fat ? "_[fat]" : ""]")
apply_body_color(.)

/obj/item/organ/external/head/get_icon(icon/race_icon, icon/deform_icon, gender = "")
if (!owner)
Expand All @@ -951,12 +966,12 @@ Note that amputating the affected organ does in fact remove the infection from t
if (!owner.species.has_gendered_icons)
gender = ""

. = list()

if(status & ORGAN_MUTATED)
. = mutable_appearance(deform_icon, "[body_zone][gender ? "_[gender]" : ""]")
. += apply_body_color(mutable_appearance(deform_icon, "[body_zone][gender ? "_[gender]" : ""]"))
else
. = mutable_appearance(race_icon, "[body_zone][gender ? "_[gender]" : ""]")

var/mutable_appearance/MA = .
. += apply_body_color(mutable_appearance(race_icon, "[body_zone][gender ? "_[gender]" : ""]"))

//Eyes
if(owner.species.eyes)
Expand All @@ -965,13 +980,13 @@ Note that amputating the affected organ does in fact remove the infection from t
img_eyes_s.color = rgb(owner.r_eyes, owner.g_eyes, owner.b_eyes)
else
img_eyes_s.color = "#ff0000"
MA.overlays += img_eyes_s
. += img_eyes_s

//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")
lips.color = owner.lip_color
MA.overlays += lips
. += lips



Expand Down
34 changes: 30 additions & 4 deletions interface/skin.dmf
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,24 @@ menu "menu"
group = "size"
is-disabled = false
saved-params = "is-checked"
elem "icon128"
name = "&128x128 (4x)"
command = ".winset \"mapwindow.map.icon-size=128\""
category = "&Icons"
is-checked = false
can-check = true
group = "size"
is-disabled = false
saved-params = "is-checked"
elem "icon96"
name = "&96x96 (3x)"
command = ".winset \"mapwindow.map.icon-size=96\""
category = "&Icons"
is-checked = false
can-check = true
group = "size"
is-disabled = false
saved-params = "is-checked"
elem "icon64"
name = "&64x64 (2x)"
command = ".winset \"mapwindow.map.icon-size=64\""
Expand All @@ -512,6 +530,15 @@ menu "menu"
group = "size"
is-disabled = false
saved-params = "is-checked"
elem "icon48"
name = "&48x48 (1.5x)"
command = ".winset \"mapwindow.map.icon-size=48\""
category = "&Icons"
is-checked = false
can-check = true
group = "size"
is-disabled = false
saved-params = "is-checked"
elem "icon32"
name = "&32x32 (1x)"
command = ".winset \"mapwindow.map.icon-size=32\""
Expand Down Expand Up @@ -552,7 +579,7 @@ menu "menu"
name = "&Nearest Neighbor"
command = ".winset \"mapwindow.map.zoom-mode=distort\""
category = "&Scaling Mode"
is-checked = true
is-checked = false
can-check = true
group = "scaling"
is-disabled = false
Expand All @@ -561,7 +588,7 @@ menu "menu"
name = "&Point Sampling"
command = ".winset \"mapwindow.map.zoom-mode=normal\""
category = "&Scaling Mode"
is-checked = false
is-checked = true
can-check = true
group = "scaling"
is-disabled = false
Expand Down Expand Up @@ -1231,7 +1258,7 @@ window "mapwindow"
border = none
drop-zone = true
right-click = false
saved-params = "icon-size"
saved-params = "icon-size;zoom-mode"
on-size = ""
icon-size = 0
text-mode = false
Expand All @@ -1240,7 +1267,6 @@ window "mapwindow"
on-show = ".winset\"mainwindow.mainvsplit.left=mapwindow\""
on-hide = ".winset\"mainwindow.mainvsplit.left=\""
style = ""
zoom-mode = distort

window "outputwindow"
elem "outputwindow"
Expand Down

0 comments on commit 1d7c619

Please sign in to comment.