diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index bd2000595f6..4e95938a2a1 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -67,6 +67,9 @@ var/new_glove_icon_state = "" var/new_glove_item_state = "" var/new_glove_name = "" + var/new_bandana_icon_state = "" + var/new_bandana_item_state = "" + var/new_bandana_name = "" var/new_shoe_icon_state = "" var/new_shoe_name = "" var/new_sheet_icon_state = "" @@ -76,59 +79,57 @@ var/new_desc = "The colors are a bit dodgy." for(var/T in typesof(/obj/item/clothing/under)) var/obj/item/clothing/under/J = new T - //world << "DEBUG: [color] == [J.color]" if(wash_color == J.item_color) new_jumpsuit_icon_state = J.icon_state new_jumpsuit_item_state = J.item_state new_jumpsuit_name = J.name qdel(J) - //world << "DEBUG: YUP! [new_icon_state] and [new_item_state]" break qdel(J) for(var/T in typesof(/obj/item/clothing/gloves/color)) var/obj/item/clothing/gloves/color/G = new T - //world << "DEBUG: [color] == [J.color]" if(wash_color == G.item_color) new_glove_icon_state = G.icon_state new_glove_item_state = G.item_state new_glove_name = G.name qdel(G) - //world << "DEBUG: YUP! [new_icon_state] and [new_item_state]" break qdel(G) for(var/T in typesof(/obj/item/clothing/shoes)) var/obj/item/clothing/shoes/S = new T - //world << "DEBUG: [color] == [J.color]" if(wash_color == S.item_color) new_shoe_icon_state = S.icon_state new_shoe_name = S.name qdel(S) - //world << "DEBUG: YUP! [new_icon_state] and [new_item_state]" break qdel(S) + for(var/T in typesof(/obj/item/clothing/mask/bandana)) + var/obj/item/clothing/mask/bandana/M = new T + if(wash_color == M.item_color) + new_bandana_icon_state = M.icon_state + new_bandana_item_state = M.item_state + new_bandana_name = M.name + qdel(M) + break + qdel(M) for(var/T in typesof(/obj/item/weapon/bedsheet)) var/obj/item/weapon/bedsheet/B = new T - //world << "DEBUG: [color] == [J.color]" if(wash_color == B.item_color) new_sheet_icon_state = B.icon_state new_sheet_name = B.name qdel(B) - //world << "DEBUG: YUP! [new_icon_state] and [new_item_state]" break qdel(B) for(var/T in typesof(/obj/item/clothing/head/soft)) var/obj/item/clothing/head/soft/H = new T - //world << "DEBUG: [color] == [J.color]" if(wash_color == H.item_color) new_softcap_icon_state = H.icon_state new_softcap_name = H.name qdel(H) - //world << "DEBUG: YUP! [new_icon_state] and [new_item_state]" break qdel(H) if(new_jumpsuit_icon_state && new_jumpsuit_item_state && new_jumpsuit_name) for(var/obj/item/clothing/under/J in contents) - //world << "DEBUG: YUP! FOUND IT!" J.item_state = new_jumpsuit_item_state J.icon_state = new_jumpsuit_icon_state J.item_color = wash_color @@ -136,7 +137,6 @@ J.desc = new_desc if(new_glove_icon_state && new_glove_item_state && new_glove_name) for(var/obj/item/clothing/gloves/color/G in contents) - //world << "DEBUG: YUP! FOUND IT!" G.item_state = new_glove_item_state G.icon_state = new_glove_icon_state G.item_color = wash_color @@ -145,7 +145,6 @@ G.desc = new_desc if(new_shoe_icon_state && new_shoe_name) for(var/obj/item/clothing/shoes/S in contents) - //world << "DEBUG: YUP! FOUND IT!" if (S.chained == 1) S.chained = 0 S.slowdown = SHOES_SLOWDOWN @@ -154,16 +153,21 @@ S.item_color = wash_color S.name = new_shoe_name S.desc = new_desc + if(new_bandana_icon_state && new_bandana_name) + for(var/obj/item/clothing/mask/bandana/M in contents) + M.item_state = new_bandana_item_state + M.icon_state = new_bandana_icon_state + M.item_color = wash_color + M.name = new_bandana_name + M.desc = new_desc if(new_sheet_icon_state && new_sheet_name) for(var/obj/item/weapon/bedsheet/B in contents) - //world << "DEBUG: YUP! FOUND IT!" B.icon_state = new_sheet_icon_state B.item_color = wash_color B.name = new_sheet_name B.desc = new_desc if(new_softcap_icon_state && new_softcap_name) for(var/obj/item/clothing/head/soft/H in contents) - //world << "DEBUG: YUP! FOUND IT!" H.icon_state = new_softcap_icon_state H.item_color = wash_color H.name = new_softcap_name @@ -313,4 +317,4 @@ state = 1 - update_icon() \ No newline at end of file + update_icon() diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 0c3c59595b2..8e3f5cf9b3f 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -285,16 +285,32 @@ BLIND // can't see anything //Proc that moves gas/breath masks out of the way /obj/item/clothing/mask/proc/adjustmask(var/mob/user) + var/mob/living/carbon/human/H = usr //Used to check if the mask is on the head, to check if the hands are full, and to turn off internals if they were on when the mask was pushed out of the way. if(!ignore_maskadjust) if(!user.canmove || user.stat || user.restrained()) return if(src.mask_adjusted == 1) - src.icon_state = initial(icon_state) + src.icon_state = copytext(src.icon_state, 1, findtext(src.icon_state, "_up")) //Trims the '_up' off the end of the icon state, thus reverting to the most recent previous state gas_transfer_coefficient = initial(gas_transfer_coefficient) permeability_coefficient = initial(permeability_coefficient) user << "You push \the [src] back into place." src.mask_adjusted = 0 slot_flags = initial(slot_flags) + if(flags_inv != initial(flags_inv)) //If the mask is one that hides the face and can be adjusted yet lost that trait when it was adjusted, make it hide the face again. + flags_inv += HIDEFACE + if(H.head == src) + if(src.flags_inv == HIDEFACE) //Means that only things like bandanas and balaclavas will be affected since they obscure the identity of the wearer. + if(H.l_hand && H.r_hand) //If both hands are occupied, drop the object on the ground. + user.unEquip(src) + else + src.loc = user + H.head = null + if(!(H.l_hand) && H.r_hand) //If only the left hand is free, put the bandana there instead. + user.put_in_l_hand(src) + else if(!(H.r_hand) && H.l_hand) //Otherwise if only the right hand is free, put the bandana there instead. + user.put_in_r_hand(src) + else if(!(H.l_hand && H.r_hand)) //Otherwise if both hands are free, pick the active one to put the bandana into. + user.put_in_active_hand(src) else src.icon_state += "_up" user << "You push \the [src] out of the way." @@ -304,12 +320,28 @@ BLIND // can't see anything if(adjusted_flags) slot_flags = adjusted_flags if(ishuman(user)) - var/mob/living/carbon/human/H = user if(H.internal) if(H.internals) H.internals.icon_state = "internal0" H.internal = null + if(user.wear_mask == src) + if(src.flags_inv == HIDEFACE) //Means that only things like bandanas and balaclavas will be affected since they obscure the identity of the wearer. + if(H.l_hand && H.r_hand) //If both hands are occupied, drop the object on the ground. + user.unEquip(src) + else + src.loc = user + user.wear_mask = null + if(!(H.l_hand) && H.r_hand) //If only the left hand is free, put the bandana there instead. + user.put_in_l_hand(src) + else if(!(H.r_hand) && H.l_hand) //Otherwise if only the right hand is free, put the bandana there instead. + user.put_in_r_hand(src) + else if(!(H.l_hand && H.r_hand)) //Otherwise if both hands are free, pick the active one to put the bandana into. + user.put_in_active_hand(src) + flags_inv -= HIDEFACE /*Done after the above to avoid having to do a check for initial(src.flags_inv == HIDEFACE). + This reveals the user's face since the bandana will now be going on their head.*/ + usr.update_inv_wear_mask() + usr.update_inv_head() //Shoes /obj/item/clothing/shoes diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index e9da678a45b..93e8dc6cd79 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -197,18 +197,38 @@ obj/item/clothing/mask/bandana/red name = "red bandana" icon_state = "bandred" + item_color = "red" + desc = "It's a red bandana." obj/item/clothing/mask/bandana/blue name = "blue bandana" icon_state = "bandblue" + item_color = "blue" + desc = "It's a blue bandana." obj/item/clothing/mask/bandana/gold name = "gold bandana" icon_state = "bandgold" + item_color = "yellow" + desc = "It's a gold bandana." obj/item/clothing/mask/bandana/green name = "green bandana" icon_state = "bandgreen" + item_color = "green" + desc = "It's a green bandana." + +obj/item/clothing/mask/bandana/orange + name = "orange bandana" + icon_state = "bandorange" + item_color = "orange" + desc = "It's an orange bandana." + +obj/item/clothing/mask/bandana/purple + name = "purple bandana" + icon_state = "bandpurple" + item_color = "purple" + desc = "It's a purple bandana." /obj/item/clothing/mask/bandana/botany name = "botany bandana" @@ -222,5 +242,6 @@ obj/item/clothing/mask/bandana/green /obj/item/clothing/mask/bandana/black name = "black bandana" - desc = "It's a black bandana." - icon_state = "bandblack" \ No newline at end of file + icon_state = "bandblack" + item_color = "black" + desc = "It's a black bandana." \ No newline at end of file diff --git a/icons/mob/mask.dmi b/icons/mob/mask.dmi index d839e71c4d7..d6dacdce500 100644 Binary files a/icons/mob/mask.dmi and b/icons/mob/mask.dmi differ diff --git a/icons/mob/species/tajaran/mask.dmi b/icons/mob/species/tajaran/mask.dmi index a54464d1f2d..9c3339e29e0 100644 Binary files a/icons/mob/species/tajaran/mask.dmi and b/icons/mob/species/tajaran/mask.dmi differ diff --git a/icons/mob/species/unathi/mask.dmi b/icons/mob/species/unathi/mask.dmi index e1b2f430e02..a37b45b4e96 100644 Binary files a/icons/mob/species/unathi/mask.dmi and b/icons/mob/species/unathi/mask.dmi differ diff --git a/icons/mob/species/vox/mask.dmi b/icons/mob/species/vox/mask.dmi index fd7fb656620..df31a6851ae 100644 Binary files a/icons/mob/species/vox/mask.dmi and b/icons/mob/species/vox/mask.dmi differ diff --git a/icons/mob/species/vulpkanin/mask.dmi b/icons/mob/species/vulpkanin/mask.dmi index fb17cd483a4..37aedd13592 100644 Binary files a/icons/mob/species/vulpkanin/mask.dmi and b/icons/mob/species/vulpkanin/mask.dmi differ diff --git a/icons/obj/clothing/masks.dmi b/icons/obj/clothing/masks.dmi index 9bd0199de51..1e033f6746d 100644 Binary files a/icons/obj/clothing/masks.dmi and b/icons/obj/clothing/masks.dmi differ