Skip to content

Commit

Permalink
Human Resprites & Tweaks - Marines looking awesome (#7521)
Browse files Browse the repository at this point in the history
# About the pull request
Fixes, tweaks and resprites the body types and muscularity plus the skin
tones for humans in the game. Female torso's are now a thing as well, as
that is brought back. Underwear and Bra's have also been tweaked to fit
new models.

# Explain why it's good for the game
Visually better and tweaked skin tones to look better plus female torso
added.


# Testing Photographs and Procedure

![oomanExamples2](https://github.com/user-attachments/assets/0ac1ae58-e21c-4cfe-9976-af6ef97bc5ca)



# Changelog
:cl: Nanu, Wei (SleepyNecrons, Esslenek), Spartanbobby, HarryOb
imageadd: Fixes, tweaks and resprites the body types and muscularity
plus the skin tones for humans in the game. Female torso's are now a
thing as well, as that is brought back. You can now be a man and have a
female body, and vice versa. Try not to get catfished Marines. Underwear
and Bra's have also been tweaked to fit new models. Sprites created by
Wei.
/:cl:

---------

Co-authored-by: harryob <[email protected]>
Co-authored-by: Drulikar <[email protected]>
  • Loading branch information
3 people authored Jan 3, 2025
1 parent eaccaf0 commit 36e026f
Show file tree
Hide file tree
Showing 14 changed files with 147 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
/datum/body_picker/ui_data(mob/user)
. = ..()

.["body_presentation"] = get_gender_name(user.client.prefs.get_body_presentation())

.["body_type"] = GLOB.body_type_list[user.client.prefs.body_type].icon_name
.["skin_color"] = GLOB.skin_color_list[user.client.prefs.skin_color].icon_name
.["body_size"] = GLOB.body_size_list[user.client.prefs.body_size].icon_name
Expand Down Expand Up @@ -55,6 +57,17 @@

prefs.skin_color = params["name"]

if("body_presentation")
var/picked = params["picked"]

switch(picked)
if("m")
prefs.body_presentation = MALE
if("f")
prefs.body_presentation = FEMALE
else
return

prefs.ShowChoices(ui.user)
return TRUE

Expand Down
7 changes: 7 additions & 0 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ GLOBAL_LIST_INIT(bgstate_options, list(

var/be_random_body = 0 //whether we have a random appearance every round
var/gender = MALE //gender of character (well duh)
var/body_presentation

var/age = 19 //age of character
var/spawnpoint = "Arrivals Shuttle" //where this character will spawn (0-2).
var/underwear = "Boxers (Camo Conforming)" //underwear type
Expand Down Expand Up @@ -1999,6 +2001,7 @@ GLOBAL_LIST_INIT(bgstate_options, list(
character.skin_color = skin_color
character.body_type = body_type
character.body_size = body_size
character.body_presentation = get_body_presentation()

character.r_eyes = r_eyes
character.g_eyes = g_eyes
Expand Down Expand Up @@ -2080,6 +2083,7 @@ GLOBAL_LIST_INIT(bgstate_options, list(
character.skin_color = skin_color
character.body_type = body_type
character.body_size = body_size
character.body_presentation = get_body_presentation()

character.r_eyes = r_eyes
character.g_eyes = g_eyes
Expand Down Expand Up @@ -2247,6 +2251,9 @@ GLOBAL_LIST_INIT(bgstate_options, list(
picker_ui = SStgui.get_open_ui(user, traits_picker)
picker_ui?.send_update()

/datum/preferences/proc/get_body_presentation()
return body_presentation || gender

#undef MENU_MARINE
#undef MENU_XENOMORPH
#undef MENU_CO
Expand Down
3 changes: 3 additions & 0 deletions code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@
S["skin_color"] >> skin_color
S["body_type"] >> body_type
S["body_size"] >> body_size
S["body_presentation"] >> body_presentation
S["language"] >> language
S["spawnpoint"] >> spawnpoint

Expand Down Expand Up @@ -655,6 +656,7 @@
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
be_random_body = sanitize_integer(be_random_body, 0, 1, initial(be_random_body))
gender = sanitize_gender(gender)
body_presentation = sanitize_gender(body_presentation)
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
skin_color = sanitize_skin_color(skin_color)
body_type = sanitize_body_type(body_type)
Expand Down Expand Up @@ -732,6 +734,7 @@
S["skin_color"] << skin_color
S["body_type"] << body_type
S["body_size"] << body_size
S["body_presentation"] << body_presentation
S["language"] << language
S["hair_red"] << r_hair
S["hair_green"] << g_hair
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/human/human_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
var/skin_color = "Pale 2" // Skin color
var/body_size = "Average" // Body Size
var/body_type = "Lean" // Body Buffness
var/body_presentation

//Skin color
var/r_skin = 0
Expand Down
20 changes: 11 additions & 9 deletions code/modules/mob/living/carbon/human/human_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,27 @@
g = "f"
return g

/proc/get_limb_icon_name(datum/species/S, body_size, body_type, gender, limb_name, skin_color)
/proc/get_limb_icon_name(datum/species/S, body_size, body_type, gender, limb_name, skin_color, body_presentation)
if(!body_presentation)
body_presentation = gender
if(S.flags & HAS_SKIN_COLOR)
if(S.special_body_types)
switch(limb_name)
if("torso")
return "[skin_color]_torso_[body_size]_[body_type]"
return "[skin_color]_torso_[body_size]_[body_type]_[get_gender_name(body_presentation)]"
if("chest")
return "[skin_color]_torso_[body_size]_[body_type]"
return "[skin_color]_torso_[body_size]_[body_type]_[get_gender_name(body_presentation)]"
if("head")
return "[skin_color]_[limb_name]"
if("groin")
return "[skin_color]_[limb_name]_[body_size]"
return "[skin_color]_[limb_name]"

if(!S.special_body_types)
switch(limb_name)
if("torso")
return "[skin_color]_torso_[body_type]_[get_gender_name(gender)]"
return "[skin_color]_torso_[body_type]_[get_gender_name(body_presentation)]"
if("chest")
return "[skin_color]_torso_[body_type]_[get_gender_name(gender)]"
return "[skin_color]_torso_[body_type]_[get_gender_name(body_presentation)]"
if("head")
return "[skin_color]_[limb_name]_[get_gender_name(gender)]"
if("groin")
Expand Down Expand Up @@ -75,10 +77,10 @@
else
switch(limb_name)
if ("torso")
return "[limb_name]_[get_gender_name(gender)]"
return "[limb_name]_[get_gender_name(body_presentation)]"

if ("chest")
return "[limb_name]_[get_gender_name(gender)]"
return "[limb_name]_[get_gender_name(body_presentation)]"

if ("head")
return "[limb_name]_[get_gender_name(gender)]"
Expand Down Expand Up @@ -171,7 +173,7 @@
body_type_icon = body_type

for(var/obj/limb/L as anything in limbs)
L.icon_name = get_limb_icon_name(species, body_size_icon, body_type_icon, gender, L.display_name, skin_color_icon)
L.icon_name = get_limb_icon_name(species, body_size_icon, body_type_icon, gender, L.display_name, skin_color_icon, body_presentation)

/mob/living/carbon/human/can_inject(mob/user, error_msg, target_zone)
if(species?.flags & IS_SYNTHETIC)
Expand Down
53 changes: 37 additions & 16 deletions code/modules/mob/living/carbon/human/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,22 +142,7 @@ There are several things that need to be remembered:
overlays_standing[BODYPARTS_LAYER] = new_limbs
apply_overlay(BODYPARTS_LAYER)

if(species.flags & HAS_UNDERWEAR)
//Underwear
remove_overlay(UNDERSHIRT_LAYER)
remove_overlay(UNDERWEAR_LAYER)

var/datum/sprite_accessory/underwear/underwear_datum = gender == MALE ? GLOB.underwear_m[underwear] : GLOB.underwear_f[underwear]
var/image/underwear_icon = underwear_datum.get_image(gender)
underwear_icon.layer = -UNDERWEAR_LAYER
overlays_standing[UNDERWEAR_LAYER] = underwear_icon
apply_overlay(UNDERWEAR_LAYER)

var/datum/sprite_accessory/underwear/undershirt_datum = gender == MALE ? GLOB.undershirt_m[undershirt] : GLOB.undershirt_f[undershirt]
var/image/undershirt_icon = undershirt_datum.get_image(gender)
undershirt_icon.layer = -UNDERSHIRT_LAYER
overlays_standing[UNDERSHIRT_LAYER] = undershirt_icon
apply_overlay(UNDERSHIRT_LAYER)
update_undergarments()

/// Recalculates and reapplies damage overlays to every limb
/mob/living/carbon/human/proc/update_damage_overlays()
Expand All @@ -174,6 +159,41 @@ There are several things that need to be remembered:

apply_overlay(DAMAGE_LAYER)

/// If this human should have underwear, reapply the overlays
/mob/living/carbon/human/proc/update_undergarments()
if(!(species.flags & HAS_UNDERWEAR))
return

update_underwear()
update_undershirt()

/// Checks if the mob's specific [/datum/sprite_accessory/underwear] should be equipped
/mob/living/carbon/human/proc/update_underwear()
remove_overlay(UNDERWEAR_LAYER)

if(w_uniform)
return

var/datum/sprite_accessory/underwear/underwear_datum = gender == MALE ? GLOB.underwear_m[underwear] : GLOB.underwear_f[underwear]
var/image/underwear_icon = underwear_datum.get_image(gender)
underwear_icon.layer = -UNDERWEAR_LAYER

overlays_standing[UNDERWEAR_LAYER] = underwear_icon
apply_overlay(UNDERWEAR_LAYER)

/// Checks if the mob's specific [/datum/sprite_accessory/undershirt] should be equipped
/mob/living/carbon/human/proc/update_undershirt()
remove_overlay(UNDERSHIRT_LAYER)

var/datum/sprite_accessory/undershirt/undershirt_datum = gender == MALE ? GLOB.undershirt_m[undershirt] : GLOB.undershirt_f[undershirt]
if((w_uniform && !(w_uniform.flags_jumpsuit & UNIFORM_JACKET_REMOVED)) && !undershirt_datum.shown_under_uniform)
return

var/image/undershirt_icon = undershirt_datum.get_image(gender)
undershirt_icon.layer = -UNDERSHIRT_LAYER
overlays_standing[UNDERSHIRT_LAYER] = undershirt_icon
apply_overlay(UNDERSHIRT_LAYER)

/mob/living/carbon/human/proc/remove_underwear() // :flushed: - geeves
remove_overlay(UNDERSHIRT_LAYER)
remove_overlay(UNDERWEAR_LAYER)
Expand Down Expand Up @@ -337,6 +357,7 @@ Applied by gun suicide and high impact bullet executions, removed by rejuvenate,
overlays_standing[UNIFORM_LAYER] = I
apply_overlay(UNIFORM_LAYER)

update_undergarments()
update_inv_wear_id()


Expand Down
10 changes: 5 additions & 5 deletions code/modules/mob/new_player/body.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
var/name
var/icon_name

/datum/body_type/twig
/datum/body_type/nomuscle
name = "No Muscles"
icon_name = "twig"
icon_name = "nomuscle"

/datum/body_type/lean
name = "Lean"
icon_name = "lean"

/datum/body_type/ripped
name = "Ripped"
icon_name = "buff"
icon_name = "ripped"

/datum/body_size
var/name
var/icon_name

/datum/body_size/thin
name = "Thin"
icon_name = "sml"
icon_name = "thin"

/datum/body_size/average
name = "Average"
icon_name = "avg"

/datum/body_size/large
name = "Large"
icon_name = "lrg"
icon_name = "large"
6 changes: 3 additions & 3 deletions code/modules/mob/new_player/skin_color.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
/datum/skin_color/New()
. = ..()

var/icon/icon_to_use = icon(/datum/species::icobase, "[icon_name]_torso_[/datum/body_size/thin::icon_name]_[/datum/body_type/twig::icon_name]")
var/icon/icon_to_use = icon(/datum/species::icobase, "[icon_name]_torso_[/datum/body_size/thin::icon_name]_[/datum/body_type/nomuscle::icon_name]_[get_gender_name(FEMALE)]")
color = icon_to_use.GetPixel(icon_to_use.Width() / 2, icon_to_use.Height() / 2)

/datum/skin_color/cmplayer
name = "Extra Pale"
icon_name = "cmp1"
icon_name = "pale0"

/datum/skin_color/pale1
name = "Pale 1"
Expand Down Expand Up @@ -52,4 +52,4 @@

/datum/skin_color/melanated
name = "Melanated"
icon_name = "mel1"
icon_name = "dark4"
5 changes: 5 additions & 0 deletions code/modules/mob/new_player/sprite_accessories/undershirt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ GLOBAL_LIST_INIT_TYPED(undershirt_f, /datum/sprite_accessory/undershirt, setup_u
icon = 'icons/mob/humans/undershirt.dmi'
var/camo_conforming = FALSE

/// If this undershirt should be displayed while a uniform is worn
var/shown_under_uniform = FALSE

/datum/sprite_accessory/undershirt/proc/get_image(mob_gender)
var/selected_icon_state = icon_state
if(camo_conforming)
Expand Down Expand Up @@ -72,6 +75,8 @@ GLOBAL_LIST_INIT_TYPED(undershirt_f, /datum/sprite_accessory/undershirt, setup_u
icon_state = "t_undershirt"
gender = NEUTER

shown_under_uniform = TRUE

/datum/sprite_accessory/undershirt/undershirt/black
name = "Undershirt (Black)"
icon_state = "b_undershirt"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/organs/limb_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
skin_color_icon = H.skin_color
body_type_icon = H.body_type

icon_state = "[get_limb_icon_name(H.species, body_size_icon, body_type_icon, H.gender, name, skin_color_icon)]"
icon_state = "[get_limb_icon_name(H.species, body_size_icon, body_type_icon, H.gender, name, skin_color_icon, H.body_presentation)]"
setDir(SOUTH)
apply_transform(turn(transform, rand(70,130)))

Expand Down
11 changes: 10 additions & 1 deletion code/modules/organs/limbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,16 @@ This function completely restores a damaged organ to perfect condition.
body_type = owner.body_type

species = owner?.species ? owner.species : GLOB.all_species[SPECIES_HUMAN]
limb_gender = owner?.gender ? owner.gender : FEMALE
limb_gender = get_limb_gender()

/obj/limb/proc/get_limb_gender()
return owner?.gender ? owner.gender : FEMALE

/obj/limb/chest/get_limb_gender()
if(owner && owner.body_presentation)
return owner.body_presentation

return owner?.gender ? owner.gender : FEMALE

/// generates a list of overlays that should be applied to the owner
/obj/limb/proc/get_limb_icon()
Expand Down
2 changes: 1 addition & 1 deletion colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1588,9 +1588,9 @@
#include "code\modules\clans\client.dm"
#include "code\modules\clans\rank.dm"
#include "code\modules\clans\ship.dm"
#include "code\modules\client\body_picker.dm"
#include "code\modules\client\client_defines.dm"
#include "code\modules\client\client_procs.dm"
#include "code\modules\client\color_picker.dm"
#include "code\modules\client\country_flags.dm"
#include "code\modules\client\hair_picker.dm"
#include "code\modules\client\loadout_picker.dm"
Expand Down
Binary file modified icons/mob/humans/species/r_human.dmi
Binary file not shown.
Loading

0 comments on commit 36e026f

Please sign in to comment.