From 018594d8d0752ad5c21c710832a5a72a5810f207 Mon Sep 17 00:00:00 2001 From: Den109G <87372121+Den109G@users.noreply.github.com> Date: Sun, 21 Apr 2024 01:47:58 +0600 Subject: [PATCH] rebase --- code/__DEFINES/clothing.dm | 5 +- code/__HELPERS/unsorted.dm | 149 +++++++----------- code/game/objects/items.dm | 2 +- code/modules/clothing/clothing.dm | 2 +- code/modules/clothing/shoes/miscellaneous.dm | 2 +- .../mob/living/carbon/human/update_icons.dm | 2 +- 6 files changed, 66 insertions(+), 96 deletions(-) diff --git a/code/__DEFINES/clothing.dm b/code/__DEFINES/clothing.dm index abfa90b6b46..d511926aa0d 100644 --- a/code/__DEFINES/clothing.dm +++ b/code/__DEFINES/clothing.dm @@ -18,6 +18,7 @@ // ITEM INVENTORY SLOT BITMASKS +// Update "ITEM_SLOT_X_STRING" below, if you change slots here /// Left hand slot #define ITEM_SLOT_HAND_LEFT (1<<0) /// Right hand slot @@ -161,11 +162,11 @@ #define ITEM_SLOT_EYES_STRING "glasses" #define ITEM_SLOT_MASK_STRING "mask" #define ITEM_SLOT_HEAD_STRING "head" -#define ITEM_SLOT_HANDCUFFED_STRING "handcuff" -#define ITEM_SLOT_SHOES_STRING "shoes" +#define ITEM_SLOT_FEET_STRING "shoes" #define ITEM_SLOT_ID_STRING "wear_id" #define ITEM_SLOT_NECK_STRING "neck" #define ITEM_SLOT_SUITSTORE_STRING "suit_store" +#define ITEM_SLOT_HANDCUFFED_STRING "handcuff" #define ITEM_SLOT_LEGCUFFED_STRING "legcuffs" #define ITEM_SLOT_ACCESSORY_STRING "accessory" #define ITEM_SLOT_COLLAR_STRING "collar" diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 708c7ad765a..9ba45c08f75 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -2072,107 +2072,76 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) else return NORTH -/proc/slot_bitfield_to_slot(input_slot_flags) //Doesn't work with ears or pockets - switch(input_slot_flags) - if(SLOT_FLAG_OCLOTHING) - return SLOT_HUD_OUTER_SUIT - if(SLOT_FLAG_ICLOTHING) - return SLOT_HUD_JUMPSUIT - if(SLOT_FLAG_GLOVES) - return SLOT_HUD_GLOVES - if(SLOT_FLAG_EYES) - return SLOT_HUD_GLASSES - if(SLOT_FLAG_MASK) - return SLOT_HUD_WEAR_MASK - if(SLOT_FLAG_HEAD) - return SLOT_HUD_HEAD - if(SLOT_FLAG_FEET) - return SLOT_HUD_SHOES - if(SLOT_FLAG_ID) - return SLOT_HUD_WEAR_ID - if(SLOT_FLAG_BELT) - return SLOT_HUD_BELT - if(SLOT_FLAG_BACK) - return SLOT_HUD_BACK - if(SLOT_FLAG_PDA) - return SLOT_HUD_WEAR_PDA - if(SLOT_FLAG_TIE) - return SLOT_HUD_TIE - -/proc/slot_string_to_slot(input_slot_string) //Doesn't work with right/left hands (diffrent var is used), l_/r_ stores and PDA (they dont have icons) - switch(input_slot_string) +/proc/slot_string_to_slot_bitfield(input_string) //Doesn't work with right/left hands (diffrent var is used), l_/r_ stores and PDA (they dont have icons) + switch(input_string) + if(ITEM_SLOT_EAR_LEFT_STRING) + return ITEM_SLOT_EAR_LEFT + if(ITEM_SLOT_EAR_RIGHT_STRING) + return ITEM_SLOT_EAR_RIGHT + if(ITEM_SLOT_BELT_STRING) + return ITEM_SLOT_BELT if(ITEM_SLOT_BACK_STRING) - return SLOT_HUD_BACK + return ITEM_SLOT_BACK + if(ITEM_SLOT_CLOTH_OUTER_STRING) + return ITEM_SLOT_CLOTH_OUTER + if(ITEM_SLOT_CLOTH_INNER_STRING) + return ITEM_SLOT_CLOTH_INNER + if(ITEM_SLOT_EYES_STRING) + return ITEM_SLOT_EYES if(ITEM_SLOT_MASK_STRING) - return SLOT_HUD_WEAR_MASK - if(ITEM_SLOT_HANDCUFFED_STRING) - return SLOT_HUD_HANDCUFFED - if(ITEM_SLOT_BELT_STRING) - return SLOT_HUD_BELT + return ITEM_SLOT_MASK + if(ITEM_SLOT_HEAD_STRING) + return ITEM_SLOT_HEAD + if(ITEM_SLOT_FEET_STRING) + return ITEM_SLOT_FEET if(ITEM_SLOT_ID_STRING) - return SLOT_HUD_WEAR_ID - if(ITEM_SLOT_EAR_LEFT_STRING) - return SLOT_HUD_LEFT_EAR - if(ITEM_SLOT_EYES_STRING) - return SLOT_HUD_GLASSES + return ITEM_SLOT_ID + if(ITEM_SLOT_NECK_STRING) + return ITEM_SLOT_NECK if(ITEM_SLOT_GLOVES_STRING) - return SLOT_HUD_GLOVES - if(ITEM_SLOT_HEAD_STRING) - return SLOT_HUD_HEAD - if(ITEM_SLOT_SHOES_STRING) - return SLOT_HUD_SHOES - if(ITEM_SLOT_CLOTH_OUTER_STRING) - return SLOT_HUD_OUTER_SUIT - if(ITEM_SLOT_CLOTH_INNER_STRING) - return SLOT_HUD_JUMPSUIT + return ITEM_SLOT_GLOVES if(ITEM_SLOT_SUITSTORE_STRING) - return SLOT_HUD_SUIT_STORE + return ITEM_SLOT_SUITSTORE + if(ITEM_SLOT_HANDCUFFED_STRING) + return ITEM_SLOT_HANDCUFFED if(ITEM_SLOT_LEGCUFFED_STRING) - return SLOT_HUD_LEGCUFFED - if(ITEM_SLOT_EAR_RIGHT_STRING) - return SLOT_HUD_RIGHT_EAR + return ITEM_SLOT_LEGCUFFED if(ITEM_SLOT_ACCESSORY_STRING) - return SLOT_HUD_TIE - if(ITEM_SLOT_COLLAR_STRING) - return SLOT_HUD_COLLAR - if(ITEM_SLOT_NECK_STRING) - return SLOT_HUD_NECK + return ITEM_SLOT_ACCESSORY -/proc/slot_to_slot_string(input_slot) //Doesn't work with right/left hands (diffrent var is used), l_/r_ stores and PDA (they dont render) - switch(input_slot) - if(SLOT_HUD_BACK) - return ITEM_SLOT_BACK_STRING - if(SLOT_HUD_WEAR_MASK) - return ITEM_SLOT_MASK_STRING - if(SLOT_HUD_HANDCUFFED) - return ITEM_SLOT_HANDCUFFED_STRING - if(SLOT_HUD_BELT) - return ITEM_SLOT_BELT_STRING - if(SLOT_HUD_WEAR_ID) - return ITEM_SLOT_ID_STRING - if(SLOT_HUD_LEFT_EAR) +/proc/slot_bitfield_to_slot_string(input_bitfield) //Doesn't work with right/left hands (diffrent var is used), l_/r_ stores and PDA (they dont render) + switch(input_bitfield) + if(ITEM_SLOT_EAR_LEFT) return ITEM_SLOT_EAR_LEFT_STRING - if(SLOT_HUD_GLASSES) - return ITEM_SLOT_EYES_STRING - if(SLOT_HUD_GLOVES) - return ITEM_SLOT_GLOVES_STRING - if(SLOT_HUD_HEAD) - return ITEM_SLOT_HEAD_STRING - if(SLOT_HUD_SHOES) - return ITEM_SLOT_SHOES_STRING - if(SLOT_HUD_OUTER_SUIT) + if(ITEM_SLOT_EAR_RIGHT) + return ITEM_SLOT_EAR_RIGHT_STRING + if(ITEM_SLOT_BELT) + return ITEM_SLOT_BELT_STRING + if(ITEM_SLOT_BACK) + return ITEM_SLOT_BACK_STRING + if(ITEM_SLOT_CLOTH_OUTER) return ITEM_SLOT_CLOTH_OUTER_STRING - if(SLOT_HUD_JUMPSUIT) + if(ITEM_SLOT_CLOTH_INNER) return ITEM_SLOT_CLOTH_INNER_STRING - if(SLOT_HUD_SUIT_STORE) + if(ITEM_SLOT_GLOVES) + return ITEM_SLOT_GLOVES_STRING + if(ITEM_SLOT_EYES) + return ITEM_SLOT_EYES_STRING + if(ITEM_SLOT_MASK) + return ITEM_SLOT_MASK_STRING + if(ITEM_SLOT_HEAD) + return ITEM_SLOT_HEAD_STRING + if(ITEM_SLOT_FEET) + return ITEM_SLOT_FEET_STRING + if(ITEM_SLOT_ID) + return ITEM_SLOT_ID_STRING + if(ITEM_SLOT_NECK) + return ITEM_SLOT_NECK_STRING + if(ITEM_SLOT_SUITSTORE) return ITEM_SLOT_SUITSTORE_STRING - if(SLOT_HUD_LEGCUFFED) + if(ITEM_SLOT_HANDCUFFED) + return ITEM_SLOT_HANDCUFFED_STRING + if(ITEM_SLOT_LEGCUFFED) return ITEM_SLOT_LEGCUFFED_STRING - if(SLOT_HUD_RIGHT_EAR) - return ITEM_SLOT_EAR_RIGHT_STRING - if(SLOT_HUD_TIE) + if(ITEM_SLOT_ACCESSORY) return ITEM_SLOT_ACCESSORY_STRING - if(SLOT_HUD_COLLAR) - return ITEM_SLOT_COLLAR_STRING - if(SLOT_HUD_NECK) - return ITEM_SLOT_NECK_STRING diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 40080bd5821..2f0b5834e5c 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -145,7 +145,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/g ITEM_SLOT_EYES_STRING = DEFAULT_ICON_GLASSES, ITEM_SLOT_GLOVES_STRING = DEFAULT_ICON_GLOVES, ITEM_SLOT_HEAD_STRING = DEFAULT_ICON_HEAD, - ITEM_SLOT_SHOES_STRING = DEFAULT_ICON_SHOES, + ITEM_SLOT_FEET_STRING = DEFAULT_ICON_SHOES, ITEM_SLOT_CLOTH_OUTER_STRING = DEFAULT_ICON_OUTER_SUIT, ITEM_SLOT_CLOTH_INNER_STRING = DEFAULT_ICON_JUMPSUIT, ITEM_SLOT_SUITSTORE_STRING = DEFAULT_ICON_SUITSTORE, diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 3d28818a6e0..792319ce330 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -1007,7 +1007,7 @@ BLIND // can't see anything if(!usr.incapacitated()) if(copytext(item_color,-2) != "_d") basecolor = item_color - if((basecolor + "_d_s") in icon_states(onmob_sheets[SLOT_HUD_JUMPSUIT])) + if((basecolor + "_d_s") in icon_states(onmob_sheets[ITEM_SLOT_CLOTH_INNER])) item_color = item_color == "[basecolor]" ? "[basecolor]_d" : "[basecolor]" usr.update_inv_w_uniform() else diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index d6e7158e5f4..11afaa44af3 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -321,7 +321,7 @@ icon_state = "cursedclown" item_state = "cclown_shoes" onmob_sheets = list( - ITEM_SLOT_SHOES_STRING = 'icons/goonstation/mob/clothing/feet.dmi' + ITEM_SLOT_FEET_STRING = 'icons/goonstation/mob/clothing/feet.dmi' ) lefthand_file = 'icons/goonstation/mob/inhands/clothing_lefthand.dmi' righthand_file = 'icons/goonstation/mob/inhands/clothing_righthand.dmi' diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 1b2f184eabf..3fec7c06bae 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -802,7 +802,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) else if(shoes.sprite_sheets && shoes.sprite_sheets[dna.species.name]) standing = mutable_appearance(shoes.sprite_sheets[dna.species.name], "[shoes.icon_state]", layer = -SHOES_LAYER) else - standing = mutable_appearance(shoes.onmob_sheets[ITEM_SLOT_SHOES_STRING], "[shoes.icon_state]", layer = -SHOES_LAYER) + standing = mutable_appearance(shoes.onmob_sheets[ITEM_SLOT_FEET_STRING], "[shoes.icon_state]", layer = -SHOES_LAYER) if(shoes.blood_DNA)