diff options
Diffstat (limited to 'src/player.cpp')
-rw-r--r-- | src/player.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/player.cpp b/src/player.cpp index 8380fdfe..37badcdc 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -160,32 +160,11 @@ void Player::setGender(int gender) void Player::setHairStyle(int style, int color) { style = style < 0 ? mHairStyle : style % NR_HAIR_STYLES; - color = color < 0 ? mHairColor : color % NR_HAIR_COLORS; if (style == mHairStyle && color == mHairColor) return; Being::setHairStyle(style, color); - static char const *const colors[NR_HAIR_COLORS] = - { - "#8c4b41,da9041,ffffff", // light brown - "#06372b,489e25,fdedcc", // green - "#5f0b33,91191c,f9ad81", // dark red - "#602486,934cc3,fdc689", // purple - "#805e74,c6b09b,ffffff", // white - "#8c6625,dab425,ffffff", // yellow - "#1d2d6d,1594a3,fdedcc", // blue - "#831f2d,be4f2d,f8cc8b", // brown - "#432482,584bbc,dae8e5", // light blue - "#460850,611967,e7b4ae", // dark purple - "#8f3e21,bc522b,ff946c", // orange - "#9c6b84,d272a3,ffcae5", // pink - "#1d1d1d,414141,6f6f6f", // charcoal - "#525252,99999b,cacaca", // silver - "#841413,aa2829,ffaeb1", // light red - "#a82513,ffa525,ffffff", // strawberry blond - }; - - setSprite(HAIR_SPRITE, style * -1, colors[color]); + setSprite(HAIR_SPRITE, style * -1, ColorDB::get(color)); setAction(mAction); } |