mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 17:45:02 +01:00
21b4095dfd
Upstream 04/17/2026 fixes https://github.com/Bubberstation/Bubberstation/issues/5549 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com> Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com> Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com> Co-authored-by: loganuk <fakeemail123@aol.com> Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com> Co-authored-by: Isratosh <Isratosh@hotmail.com> Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com> Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com> Co-authored-by: Alexander V. <volas@ya.ru> Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com> Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com> Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com> Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com> Co-authored-by: Josh <josh.adam.powell@gmail.com> Co-authored-by: Josh Powell <josh.powell@softwire.com> Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com> Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com> Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com> Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
239 lines
9.0 KiB
Plaintext
239 lines
9.0 KiB
Plaintext
/proc/generate_underwear_icon(datum/sprite_accessory/accessory, datum/universal_icon/base_icon, color, icon_offset = 0) //SKYRAT EDIT CHANGE : adds icon_offset - Colorable Undershirt/Socks
|
|
var/datum/universal_icon/final_icon = base_icon.copy()
|
|
|
|
if (!isnull(accessory))
|
|
var/datum/universal_icon/accessory_icon = uni_icon(accessory.icon, accessory.icon_state) // SKYRAT EDIT CHANGE: ORIGINAL - var/icon/accessory_icon = uni_icon('icons/mob/clothing/underwear.dmi', accessory.icon_state)
|
|
if (color && !accessory.use_static)
|
|
accessory_icon.blend_color(color, ICON_MULTIPLY)
|
|
final_icon.blend_icon(accessory_icon, ICON_OVERLAY)
|
|
|
|
final_icon.crop(10, 1+icon_offset, 22, 13+icon_offset) //SKYRAT EDIT CHANGE : adds icon_offset - Colorable Undershirt/Socks
|
|
final_icon.scale(32, 32)
|
|
|
|
return final_icon
|
|
|
|
/// Backpack preference
|
|
/datum/preference/choiced/backpack
|
|
savefile_key = "backpack"
|
|
savefile_identifier = PREFERENCE_CHARACTER
|
|
main_feature_name = "Backpack"
|
|
category = PREFERENCE_CATEGORY_CLOTHING
|
|
should_generate_icons = TRUE
|
|
|
|
/datum/preference/choiced/backpack/init_possible_values()
|
|
return list(
|
|
GBACKPACK,
|
|
GSATCHEL,
|
|
LSATCHEL,
|
|
GDUFFELBAG,
|
|
GMESSENGER,
|
|
DBACKPACK,
|
|
DSATCHEL,
|
|
DDUFFELBAG,
|
|
DMESSENGER,
|
|
//BUBBER EDIT BEGIN
|
|
FBACKPACK,
|
|
FSATCHEL,
|
|
FMESSENGER,
|
|
TPACKWAIST,
|
|
TPACKBELT,
|
|
TPACKCHEST,
|
|
//BUBBER EDIT END
|
|
)
|
|
|
|
/datum/preference/choiced/backpack/create_default_value()
|
|
return DBACKPACK
|
|
|
|
/datum/preference/choiced/backpack/icon_for(value)
|
|
switch (value)
|
|
if (GBACKPACK)
|
|
return /obj/item/storage/backpack
|
|
if (GSATCHEL)
|
|
return /obj/item/storage/backpack/satchel
|
|
if (LSATCHEL)
|
|
return /obj/item/storage/backpack/satchel/leather
|
|
if (GDUFFELBAG)
|
|
return /obj/item/storage/backpack/duffelbag
|
|
if (GMESSENGER)
|
|
return /obj/item/storage/backpack/messenger
|
|
//BUBBER EDIT BEGIN
|
|
if (FBACKPACK)
|
|
return /obj/item/storage/backpack/industrial/frontier_colonist
|
|
if (FSATCHEL)
|
|
return /obj/item/storage/backpack/industrial/frontier_colonist/satchel
|
|
if (FMESSENGER)
|
|
return /obj/item/storage/backpack/industrial/frontier_colonist/messenger
|
|
if (TPACKWAIST)
|
|
return /obj/item/storage/backpack/waist_pack
|
|
if (TPACKBELT)
|
|
return /obj/item/storage/backpack/storage_belt
|
|
if (TPACKCHEST)
|
|
return /obj/item/storage/backpack/chest_pack
|
|
|
|
// In a perfect world, these would be your department's backpack.
|
|
// However, this doesn't factor in assistants, or no high slot, and would
|
|
// also increase the spritesheet size a lot.
|
|
// I play medical doctor, and so medical doctor you get.
|
|
if (DBACKPACK)
|
|
return /obj/item/storage/backpack/medic
|
|
if (DSATCHEL)
|
|
return /obj/item/storage/backpack/satchel/med
|
|
if (DDUFFELBAG)
|
|
return /obj/item/storage/backpack/duffelbag/med
|
|
if (DMESSENGER)
|
|
return /obj/item/storage/backpack/messenger/med
|
|
|
|
/datum/preference/choiced/backpack/apply_to_human(mob/living/carbon/human/target, value)
|
|
target.backpack = value
|
|
|
|
/// Jumpsuit preference
|
|
/datum/preference/choiced/jumpsuit
|
|
savefile_key = "jumpsuit_style"
|
|
savefile_identifier = PREFERENCE_CHARACTER
|
|
priority = PREFERENCE_PRIORITY_BODY_TYPE
|
|
main_feature_name = "Jumpsuit"
|
|
category = PREFERENCE_CATEGORY_CLOTHING
|
|
should_generate_icons = TRUE
|
|
|
|
/datum/preference/choiced/jumpsuit/init_possible_values()
|
|
return list(
|
|
PREF_SUIT,
|
|
PREF_SKIRT,
|
|
)
|
|
|
|
/datum/preference/choiced/jumpsuit/create_default_value()
|
|
return PREF_SUIT
|
|
|
|
/datum/preference/choiced/jumpsuit/icon_for(value)
|
|
switch (value)
|
|
if (PREF_SUIT)
|
|
return /obj/item/clothing/under/color/grey
|
|
if (PREF_SKIRT)
|
|
return /obj/item/clothing/under/color/jumpskirt/grey
|
|
|
|
/datum/preference/choiced/jumpsuit/apply_to_human(mob/living/carbon/human/target, value)
|
|
target.jumpsuit_style = value
|
|
|
|
/// Socks preference
|
|
/datum/preference/choiced/socks
|
|
savefile_key = "socks"
|
|
savefile_identifier = PREFERENCE_CHARACTER
|
|
main_feature_name = "Socks"
|
|
category = PREFERENCE_CATEGORY_CLOTHING
|
|
should_generate_icons = TRUE
|
|
can_randomize = FALSE
|
|
|
|
/datum/preference/choiced/socks/init_possible_values()
|
|
return assoc_to_keys_features(SSaccessories.socks_list)
|
|
|
|
/datum/preference/choiced/socks/create_default_value()
|
|
return /datum/sprite_accessory/clothing/socks/nude::name
|
|
|
|
/datum/preference/choiced/socks/icon_for(value)
|
|
var/static/datum/universal_icon/lower_half
|
|
|
|
if (isnull(lower_half))
|
|
lower_half = uni_icon('icons/blanks/32x32.dmi', "nothing")
|
|
lower_half.blend_icon(uni_icon('icons/mob/human/bodyparts_greyscale.dmi', "human_r_leg"), ICON_OVERLAY)
|
|
lower_half.blend_icon(uni_icon('icons/mob/human/bodyparts_greyscale.dmi', "human_l_leg"), ICON_OVERLAY)
|
|
|
|
return generate_underwear_icon(SSaccessories.socks_list[value], lower_half)
|
|
|
|
/datum/preference/choiced/socks/apply_to_human(mob/living/carbon/human/target, value)
|
|
target.socks = value
|
|
|
|
/// Undershirt preference
|
|
/datum/preference/choiced/undershirt
|
|
savefile_key = "undershirt"
|
|
savefile_identifier = PREFERENCE_CHARACTER
|
|
priority = PREFERENCE_PRIORITY_BODY_TYPE
|
|
main_feature_name = "Undershirt"
|
|
category = PREFERENCE_CATEGORY_CLOTHING
|
|
should_generate_icons = TRUE
|
|
can_randomize = FALSE
|
|
|
|
/datum/preference/choiced/undershirt/init_possible_values()
|
|
return assoc_to_keys_features(SSaccessories.undershirt_list)
|
|
|
|
/datum/preference/choiced/undershirt/create_default_value()
|
|
return /datum/sprite_accessory/clothing/undershirt/nude::name
|
|
|
|
/* // SKYRAT EDIT REMOVAL - sports bra doesn't exist as an undershirt. so just let this default to naked and we'll add underwear elsewhere
|
|
/datum/preference/choiced/undershirt/create_informed_default_value(datum/preferences/preferences)
|
|
switch(preferences.read_preference(/datum/preference/choiced/gender))
|
|
if(MALE)
|
|
return /datum/sprite_accessory/clothing/undershirt/nude::name
|
|
if(FEMALE)
|
|
return /datum/sprite_accessory/clothing/undershirt/sports_bra::name
|
|
|
|
return ..()
|
|
*/ // SKYRAT EDIT REMOVAL END
|
|
|
|
/datum/preference/choiced/undershirt/icon_for(value)
|
|
var/static/datum/universal_icon/body
|
|
if (isnull(body))
|
|
body = uni_icon('icons/mob/human/bodyparts_greyscale.dmi', "human_r_leg")
|
|
body.blend_icon(uni_icon('icons/mob/human/bodyparts_greyscale.dmi', "human_l_leg"), ICON_OVERLAY)
|
|
body.blend_icon(uni_icon('icons/mob/human/bodyparts_greyscale.dmi', "human_r_arm"), ICON_OVERLAY)
|
|
body.blend_icon(uni_icon('icons/mob/human/bodyparts_greyscale.dmi', "human_l_arm"), ICON_OVERLAY)
|
|
body.blend_icon(uni_icon('icons/mob/human/bodyparts_greyscale.dmi', "human_r_hand"), ICON_OVERLAY)
|
|
body.blend_icon(uni_icon('icons/mob/human/bodyparts_greyscale.dmi', "human_l_hand"), ICON_OVERLAY)
|
|
body.blend_icon(uni_icon('icons/mob/human/bodyparts_greyscale.dmi', "human_chest_m"), ICON_OVERLAY)
|
|
|
|
var/datum/universal_icon/icon_with_undershirt = body.copy()
|
|
|
|
if (value != "Nude")
|
|
var/datum/sprite_accessory/accessory = SSaccessories.undershirt_list[value]
|
|
icon_with_undershirt.blend_icon(uni_icon(accessory.icon, accessory.icon_state), ICON_OVERLAY)// SKYRAT EDIT CHANGE: ORIGINAL - icon_with_undershirt.blend_icon(uni_icon('icons/mob/clothing/underwear.dmi', accessory.icon_state), ICON_OVERLAY)
|
|
|
|
icon_with_undershirt.crop(10, 11, 22, 23) // SKYRAT EDIT CHANGE : ORIGINAL - icon_with_undershirt.crop(9, 9, 23, 23)
|
|
icon_with_undershirt.scale(32, 32)
|
|
return icon_with_undershirt
|
|
|
|
/datum/preference/choiced/undershirt/apply_to_human(mob/living/carbon/human/target, value)
|
|
target.undershirt = value
|
|
|
|
/// Underwear preference
|
|
/datum/preference/choiced/underwear
|
|
savefile_key = "underwear"
|
|
savefile_identifier = PREFERENCE_CHARACTER
|
|
main_feature_name = "Underwear"
|
|
category = PREFERENCE_CATEGORY_CLOTHING
|
|
should_generate_icons = TRUE
|
|
can_randomize = FALSE
|
|
|
|
/datum/preference/choiced/underwear/init_possible_values()
|
|
return assoc_to_keys_features(SSaccessories.underwear_list)
|
|
|
|
/datum/preference/choiced/underwear/create_default_value()
|
|
return /datum/sprite_accessory/clothing/underwear/male_hearts::name
|
|
|
|
/datum/preference/choiced/underwear/icon_for(value)
|
|
var/static/datum/universal_icon/lower_half
|
|
|
|
if (isnull(lower_half))
|
|
lower_half = uni_icon('icons/blanks/32x32.dmi', "nothing")
|
|
lower_half.blend_icon(uni_icon('icons/mob/human/bodyparts_greyscale.dmi', "human_chest_m"), ICON_OVERLAY)
|
|
lower_half.blend_icon(uni_icon('icons/mob/human/bodyparts_greyscale.dmi', "human_r_leg"), ICON_OVERLAY)
|
|
lower_half.blend_icon(uni_icon('icons/mob/human/bodyparts_greyscale.dmi', "human_l_leg"), ICON_OVERLAY)
|
|
|
|
return generate_underwear_icon(SSaccessories.underwear_list[value], lower_half, COLOR_ALMOST_BLACK, icon_offset = 5) // SKYRAT EDIT CHANGE : ICON_OFFSET // SKYRAT EDIT CHANGE - ORIGINAL: return generate_underwear_icon(SSaccessories.underwear_list[value], lower_half, COLOR_ALMOST_BLACK)
|
|
|
|
/datum/preference/choiced/underwear/apply_to_human(mob/living/carbon/human/target, value)
|
|
target.underwear = value
|
|
|
|
/datum/preference/choiced/underwear/is_accessible(datum/preferences/preferences)
|
|
if (!..(preferences))
|
|
return FALSE
|
|
|
|
var/species_type = preferences.read_preference(/datum/preference/choiced/species)
|
|
var/datum/species/species = GLOB.species_prototypes[species_type]
|
|
return !(TRAIT_NO_UNDERWEAR in species.inherent_traits)
|
|
|
|
/datum/preference/choiced/underwear/compile_constant_data()
|
|
var/list/data = ..()
|
|
|
|
data[SUPPLEMENTAL_FEATURE_KEY] = "underwear_color"
|
|
|
|
return data
|