mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Initial commit containing all the necessary code files that allow Tajaran, Unathi, and Skrell to change both their hair and body color to match. NO MORE GREEN/GREY!
Conflicts: code/modules/client/preferences.dm code/modules/mob/living/carbon/human/human_defines.dm code/modules/mob/living/carbon/species.dm code/setup.dm
This commit is contained in:
@@ -18,6 +18,11 @@
|
||||
|
||||
var/s_tone = 0 //Skin tone
|
||||
|
||||
//Skin colour
|
||||
var/r_skin = 0
|
||||
var/g_skin = 0
|
||||
var/b_skin = 0
|
||||
|
||||
var/lip_style = null //no lipstick by default- arguably misleading, as it could be used for general makeup
|
||||
|
||||
var/age = 30 //Player's age (pure fluff)
|
||||
|
||||
@@ -295,12 +295,16 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
stand_icon.Blend(temp, ICON_OVERLAY)
|
||||
|
||||
//Skin tone
|
||||
if(!skeleton && !husk && !hulk && (species.flags & HAS_SKIN_TONE))
|
||||
if(!skeleton && !husk && !hulk && (species.bodyflags & HAS_SKIN_TONE))
|
||||
if(s_tone >= 0)
|
||||
stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
else
|
||||
stand_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
|
||||
//Skin color
|
||||
if(!skeleton && !husk && !hulk && (species.flags & HAS_SKIN_COLOR))
|
||||
stand_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
|
||||
if(husk)
|
||||
var/icon/mask = new(stand_icon)
|
||||
var/icon/husk_over = new(race_icon,"overlay_husk")
|
||||
@@ -852,7 +856,11 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
|
||||
if(species.tail && species.bodyflags & HAS_TAIL)
|
||||
if(!wear_suit || !(wear_suit.flags_inv & HIDEJUMPSUIT) && !istype(wear_suit, /obj/item/clothing/suit/space))
|
||||
overlays_standing[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_s")
|
||||
var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_s")
|
||||
tail_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
|
||||
stand_icon.Blend(tail_s, ICON_OVERLAY)
|
||||
overlays_standing[TAIL_LAYER] = image(stand_icon)
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
var/flags = 0 // Various specific features.
|
||||
var/bloodflags=0
|
||||
var/bodyflags=0
|
||||
|
||||
var/flesh_color = "#FFC896" //Pink.
|
||||
var/list/abilities = list() // For species-derived or admin-given powers
|
||||
|
||||
/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs.
|
||||
@@ -104,7 +104,8 @@
|
||||
deform = 'icons/mob/human_races/r_def_human.dmi'
|
||||
primitive = /mob/living/carbon/monkey
|
||||
path = /mob/living/carbon/human/human
|
||||
flags = HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT
|
||||
bodyflags = HAS_SKIN_TONE
|
||||
|
||||
/datum/species/unathi
|
||||
name = "Unathi"
|
||||
@@ -118,7 +119,7 @@
|
||||
darksight = 3
|
||||
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR
|
||||
bodyflags = FEET_CLAWS | HAS_TAIL
|
||||
bodyflags = FEET_CLAWS | HAS_TAIL | HAS_SKIN_COLOR
|
||||
|
||||
cold_level_1 = 280 //Default 260 - Lower is better
|
||||
cold_level_2 = 220 //Default 200
|
||||
@@ -128,6 +129,9 @@
|
||||
heat_level_2 = 480 //Default 400
|
||||
heat_level_3 = 1100 //Default 1000
|
||||
|
||||
flesh_color = "#34AF10"
|
||||
|
||||
|
||||
/datum/species/tajaran
|
||||
name = "Tajaran"
|
||||
icobase = 'icons/mob/human_races/r_tajaran.dmi'
|
||||
@@ -149,7 +153,9 @@
|
||||
primitive = /mob/living/carbon/monkey/tajara
|
||||
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT
|
||||
bodyflags = FEET_PADDED | HAS_TAIL
|
||||
bodyflags = FEET_PADDED | HAS_TAIL | HAS_SKIN_COLOR
|
||||
|
||||
flesh_color = "#AFA59E"
|
||||
|
||||
/datum/species/skrell
|
||||
name = "Skrell"
|
||||
@@ -161,6 +167,9 @@
|
||||
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR
|
||||
bloodflags = BLOOD_GREEN
|
||||
bodyflags = HAS_SKIN_COLOR
|
||||
|
||||
flesh_color = "#8CD7A3"
|
||||
|
||||
/datum/species/vox
|
||||
name = "Vox"
|
||||
@@ -319,5 +328,4 @@
|
||||
|
||||
flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | IS_SYNTHETIC
|
||||
|
||||
// blood_color = "#FFFFFF"
|
||||
// flesh_color = "#AAAAAA"
|
||||
flesh_color = "#AAAAAA"
|
||||
|
||||
@@ -12,6 +12,7 @@ datum/preferences
|
||||
randomize_hair_color("hair")
|
||||
randomize_hair_color("facial")
|
||||
randomize_eyes_color()
|
||||
randomize_skin_color()
|
||||
underwear = rand(1,underwear_m.len)
|
||||
undershirt = rand(1,undershirt_t.len)
|
||||
backbag = 2
|
||||
@@ -128,6 +129,54 @@ datum/preferences
|
||||
g_eyes = green
|
||||
b_eyes = blue
|
||||
|
||||
proc/randomize_skin_color()
|
||||
var/red
|
||||
var/green
|
||||
var/blue
|
||||
|
||||
var/col = pick ("black", "grey", "brown", "chestnut", "blue", "lightblue", "green", "albino")
|
||||
switch(col)
|
||||
if("black")
|
||||
red = 0
|
||||
green = 0
|
||||
blue = 0
|
||||
if("grey")
|
||||
red = rand (100, 200)
|
||||
green = red
|
||||
blue = red
|
||||
if("brown")
|
||||
red = 102
|
||||
green = 51
|
||||
blue = 0
|
||||
if("chestnut")
|
||||
red = 153
|
||||
green = 102
|
||||
blue = 0
|
||||
if("blue")
|
||||
red = 51
|
||||
green = 102
|
||||
blue = 204
|
||||
if("lightblue")
|
||||
red = 102
|
||||
green = 204
|
||||
blue = 255
|
||||
if("green")
|
||||
red = 0
|
||||
green = 102
|
||||
blue = 0
|
||||
if("albino")
|
||||
red = rand (200, 255)
|
||||
green = rand (0, 150)
|
||||
blue = rand (0, 150)
|
||||
|
||||
red = max(min(red + rand (-25, 25), 255), 0)
|
||||
green = max(min(green + rand (-25, 25), 255), 0)
|
||||
blue = max(min(blue + rand (-25, 25), 255), 0)
|
||||
|
||||
r_skin = red
|
||||
g_skin = green
|
||||
b_skin = blue
|
||||
|
||||
|
||||
proc/update_preview_icon(var/for_observer=0) //seriously. This is horrendous.
|
||||
del(preview_icon_front)
|
||||
@@ -166,6 +215,10 @@ datum/preferences
|
||||
|
||||
preview_icon.Blend(temp, ICON_OVERLAY)
|
||||
|
||||
// Skin color
|
||||
if(current_species && (current_species.bodyflags & HAS_SKIN_COLOR))
|
||||
preview_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
|
||||
// Skin tone
|
||||
if(current_species && (current_species.flags & HAS_SKIN_TONE))
|
||||
if (s_tone >= 0)
|
||||
|
||||
Reference in New Issue
Block a user