Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
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
93 changes: 93 additions & 0 deletions San_Additions/BodyMarkings/body_markings_mod.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
Let's try to put as much as possible as a mod file
*/

// Initialization

var/global/list/body_marking_styles_list = list() //stores /datum/sprite_accessory/marking indexed by name

/hook/global_init/makeDatumRefLists()
..()
var/list/paths = list()
//Body markings - Initialise all /datum/sprite_accessory/marking into an list indexed by marking name
paths = typesof(/datum/sprite_accessory/marking) - /datum/sprite_accessory/marking
for(var/path in paths)
var/datum/sprite_accessory/marking/M = new path()
body_marking_styles_list[M.name] = M

return 1

// DNA

/datum/dna
var/list/body_markings = list()

/datum/dna/ResetUIFrom(var/mob/living/carbon/human/character)
..()
body_markings.Cut()
for(var/obj/item/organ/external/E in character.organs)
if(E.markings.len)
body_markings[E.organ_tag] = E.markings.Copy()
UpdateUI()

/mob/UpdateAppearance(var/list/UI=null)
if(..())
//Body markings
var/mob/living/carbon/human/H = src
for(var/tag in dna.body_markings)
var/obj/item/organ/external/E = H.organs_by_name[tag]
if(E)
var/list/marklist = dna.body_markings[tag]
E.markings = marklist.Copy()

H.force_update_limbs()
H.update_body()
H.update_eyes()
H.update_hair()

return 1
else
return 0

datum/preferences
var/list/body_markings = list() // "name" = "#rgbcolor"

/obj/item/organ/external
var/list/markings = list() // Markings (body_markings) to apply to the icon


/obj/item/organ/external/head/get_icon()
..()
//Body markings, does not include head, duplicated (sadly) above.
for(var/M in markings)
var/datum/sprite_accessory/marking/mark_style = markings[M]["datum"]
var/icon/mark_s = new/icon("icon" = mark_style.icon, "icon_state" = "[mark_style.icon_state]-[organ_tag]")
mark_s.Blend(markings[M]["color"], ICON_ADD)
overlays |= mark_s //So when it's not on your body, it has icons
mob_icon.Blend(mark_s, ICON_OVERLAY) //So when it's on your body, it has icons
icon_cache_key += "[M][markings[M]["color"]]"
return mob_icon

/obj/item/organ/external/get_icon()
..()
update_icon()
//Head markings, duplicated (sadly) below.
for(var/M in markings)
var/datum/sprite_accessory/marking/mark_style = markings[M]["datum"]
var/icon/mark_s = new/icon("icon" = mark_style.icon, "icon_state" = "[mark_style.icon_state]-[organ_tag]")
mark_s.Blend(markings[M]["color"], ICON_ADD)
overlays |= mark_s //So when it's not on your body, it has icons
mob_icon.Blend(mark_s, ICON_OVERLAY) //So when it's on your body, it has icons
icon_cache_key += "[M][markings[M]["color"]]"
return mob_icon

/obj/item/organ/external/update_icon(var/regenerate = 0)
..()
//Body markings, does not include head, duplicated (sadly) above.
for(var/M in markings)
var/datum/sprite_accessory/marking/mark_style = markings[M]["datum"]
var/icon/mark_s = new/icon("icon" = mark_style.icon, "icon_state" = "[mark_style.icon_state]-[organ_tag]")
mark_s.Blend(markings[M]["color"], ICON_ADD)
overlays |= mark_s //So when it's not on your body, it has icons
mob_icon.Blend(mark_s, ICON_OVERLAY) //So when it's on your body, it has icons
icon_cache_key += "[M][markings[M]["color"]]"
253 changes: 253 additions & 0 deletions San_Additions/BodyMarkings/bodymarkings.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@

/*
////////////////////////////
/ =--------------------= /
/ == Body Markings == /
/ =--------------------= /
////////////////////////////
*/
/datum/sprite_accessory
// If only this ckey can get this body marking to show on their list of bodymarkings
// Don't init here
var/list/ckey_allowed

/datum/sprite_accessory/marking
icon = 'bodymarkings.dmi'
do_colouration = 1 //Almost all of them have it, COLOR_ADD

//Empty list is unrestricted. Should only restrict the ones that make NO SENSE on other species,
//like Tajara inner-ear coloring overlay stuff.
species_allowed = list()

var/body_parts = list() //A list of bodyparts this covers, in organ_tag defines
//Reminder: BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_CHEST,BP_GROIN,BP_HEAD


// TATTOOS
// WORN BY HUMANS
tat_heart
name = "Tattoo (Heart, Torso)"
icon_state = "tat_heart"
body_parts = list(BP_CHEST)
species_allowed = list("Human")

tat_heart
name = "Tattoo (Heart, Torso, Centered)"
icon_state = "tat_heart_center"
body_parts = list(BP_CHEST)
species_allowed = list("Human")

tat_hive
name = "Tattoo (Hive, Back)"
icon_state = "tat_hive"
body_parts = list(BP_CHEST)
species_allowed = list("Human")

tat_nightling
name = "Tattoo (Nightling, Back)"
icon_state = "tat_nightling"
body_parts = list(BP_CHEST)
species_allowed = list("Human")

tat_campbell
name = "Tattoo (Campbell, R.Arm)"
icon_state = "tat_campbell"
body_parts = list(BP_R_ARM)
species_allowed = list("Human")

tat_tiger
name = "Tattoo (Tiger Stripes, Body)"
icon_state = "tiger"
body_parts = list(BP_CHEST,BP_GROIN)
species_allowed = list("Human")

tat_tiger_l_arm
name = "Tattoo (Tiger Stripes, left arm)"
icon_state = "tiger"
body_parts = list(BP_L_ARM)
species_allowed = list("Human")

tat_tiger_r_arm
name = "Tattoo (Tiger Stripes, right arm)"
icon_state = "tiger"
body_parts = list(BP_R_ARM)
species_allowed = list("Human")

tat_tiger_l_leg
name = "Tattoo (Tiger Stripes, left leg)"
icon_state = "tiger"
body_parts = list(BP_L_LEG, BP_L_FOOT)
species_allowed = list("Human")

tat_tiger_r_leg
name = "Tattoo (Tiger Stripes, right leg)"
icon_state = "tiger"
body_parts = list(BP_R_LEG, BP_R_FOOT)
species_allowed = list("Human")

tat_tiger_head
name = "Tattoo (Tiger Stripes Head, Minor)"
icon_state = "tigerhead"
body_parts = list(BP_HEAD)
species_allowed = list("Human")

yakuza_tattoo
name = "Tattoo (Yakuza, Chest)"
icon_state = "yakuza"
body_parts = list(BP_CHEST)
species_allowed = list("Human")

bands
name = "Color Bands"
icon_state = "bands"
body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_CHEST,BP_GROIN)
species_allowed = list("Human")

bandsface
name = "Color Bands (Face)"
icon_state = "bandsface"
body_parts = list(BP_HEAD)
species_allowed = list("Human")



//Taj specific stuff
taj_belly
name = "Belly Fur (Taj)"
icon_state = "taj_belly"
body_parts = list(BP_CHEST)
species_allowed = list("Tajara")

taj_bellyfull
name = "Belly Fur Wide (Taj)"
icon_state = "taj_bellyfull"
body_parts = list(BP_CHEST)
species_allowed = list("Tajara")

taj_nose
name = "Nose Color (Taj)"
icon_state = "taj_nose"
body_parts = list(BP_HEAD)
species_allowed = list("Tajara")

taj_crest
name = "Chest Fur Crest (Taj)"
icon_state = "taj_crest"
body_parts = list(BP_CHEST)
species_allowed = list("Tajara")

taj_muzzle
name = "Muzzle Color (Taj)"
icon_state = "taj_muzzle"
body_parts = list(BP_HEAD)
species_allowed = list("Tajara")

taj_face
name = "Cheeks Color (Taj)"
icon_state = "taj_face"
body_parts = list(BP_HEAD)
species_allowed = list("Tajara")

taj_all
name = "All Taj Head (Taj)"
icon_state = "taj_all"
body_parts = list(BP_HEAD)
species_allowed = list("Tajara")

shaggy_mane
name = "Shaggy mane"
icon_state = "shaggy"
body_parts = list(BP_CHEST)
species_allowed = list("Tajara")

saber_teeth
name = "Saber teeth"
icon_state = "saber"
body_parts = list(BP_HEAD)
species_allowed = list("Tajara")

fangs
name = "Fangs"
icon_state = "fangs"
body_parts = list(BP_HEAD)
species_allowed = list("Tajara")

tiger_stripes
name = "Tiger Stripes"
icon_state = "tiger"
body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_CHEST,BP_GROIN)
species_allowed = list("Tajara") //There's a tattoo for non-cats

tigerface
name = "Tiger Stripes (Head, Major)"
icon_state = "tigerface"
body_parts = list(BP_HEAD)
species_allowed = list("Tajara") //There's a tattoo for non-cats

taj_paw_socks
name = "Socks Coloration (Taj)"
icon_state = "taj_pawsocks"
body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND)
species_allowed = list("Tajara")

taj_paw_socks_arms
name = "Socks Coloration (Taj, arms)"
icon_state = "taj_pawsocks"
body_parts = list(BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND)
species_allowed = list("Tajara")

taj_paw_socks_legs
name = "Socks Coloration (Taj, legs)"
icon_state = "taj_pawsocks"
body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG)
species_allowed = list("Tajara")

//Una specific stuff
una_face
name = "Face Color (Unathi)"
icon_state = "una_face"
body_parts = list(BP_HEAD)
species_allowed = list("Unathi")

una_facelow
name = "Face Color Low (Unathi)"
icon_state = "una_facelow"
body_parts = list(BP_HEAD)
species_allowed = list("Unathi")

una_scutes
name = "Scutes (Unathi)"
icon_state = "una_scutes"
body_parts = list(BP_CHEST)
species_allowed = list("Unathi")

backstripe
name = "Back Stripe (Unathi)"
icon_state = "backstripe"
body_parts = list(BP_CHEST)
species_allowed = list("Unathi")

una_paw_socks
name = "Socks Coloration (Una)"
icon_state = "una_pawsocks"
body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND)
species_allowed = list("Unathi")

una_paw_socks_arms
name = "Socks Coloration (Una)"
icon_state = "una_pawsocks"
body_parts = list(BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND)
species_allowed = list("Unathi")

una_paw_socks_legs
name = "Socks Coloration (Una)"
icon_state = "una_pawsocks"
body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG)
species_allowed = list("Unathi")

// Snowflakey stuff
doubleeye
name = "Double eyes"
icon_state = "doubleeye"
body_parts = list(BP_HEAD)
ckey_allowed = list("jglitch")
Binary file added San_Additions/BodyMarkings/bodymarkings.dmi
Binary file not shown.
4 changes: 4 additions & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2433,6 +2433,10 @@
#include "San_Additions\barra_do.dm"
#include "San_Additions\catwalk.dm"
#include "San_Additions\cure_steps.dm"
#include "San_Additions\FrontFlip.dm"
#include "San_Additions\Tajaran_Necesidad_Dormir.dm"
#include "San_Additions\BodyMarkings\body_markings_mod.dm"
#include "San_Additions\BodyMarkings\bodymarkings.dm"
#include "San_Additions\Field of View\FieldOfView.dm"
#include "San_Additions\objectives_dreyfus\debugging.dm"
#include "San_Additions\objectives_dreyfus\objectives.dm"
Expand Down
1 change: 1 addition & 0 deletions code/_helpers/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ var/global/list/string_slot_flags = list(
facial_hair_styles_male_list += H.name
facial_hair_styles_female_list += H.name


//Surgery Steps - Initialize all /datum/surgery_step into a list
paths = typesof(/datum/surgery_step)-/datum/surgery_step
for(var/T in paths)
Expand Down
1 change: 1 addition & 0 deletions code/datums/underwear/underwear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ datum/category_group/underwear/dd_SortValue()
sort_order = 4 // Undershirts currently have the highest sort order because they may cover both underwear and socks.
category_item_type = /datum/category_item/underwear/undershirt


/*******************
* Category entries *
*******************/
Expand Down
1 change: 1 addition & 0 deletions code/game/dna/dna2.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ var/global/list/datum/dna/gene/dna_genes[0]
new_dna.b_type=b_type
new_dna.real_name=real_name
new_dna.species=species
new_dna.body_markings=body_markings.Copy()
for(var/b=1;b<=DNA_SE_LENGTH;b++)
new_dna.SE[b]=SE[b]
if(b<=DNA_UI_LENGTH)
Expand Down
7 changes: 7 additions & 0 deletions code/game/dna/dna2_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@
if((0 < beard) && (beard <= facial_hair_styles_list.len))
H.f_style = facial_hair_styles_list[beard]

//Body markings
for(var/tag in dna.body_markings)
var/obj/item/organ/external/E = H.organs_by_name[tag]
if(E)
var/list/marklist = dna.body_markings[tag]
E.markings = marklist.Copy()

H.force_update_limbs()
H.update_body()
H.update_eyes()
Expand Down
Loading