Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Den109G committed Apr 20, 2024
1 parent 57093a6 commit 018594d
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 96 deletions.
5 changes: 3 additions & 2 deletions code/__DEFINES/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
149 changes: 59 additions & 90 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/shoes/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 018594d

Please sign in to comment.