diff --git a/game/base-clothing/wardrobes.twee b/game/base-clothing/wardrobes.twee index 8b427a202b6c2612ccf1174c5d39836759181349..53335c022d859d8d7062890844c998a619022e1d 100644 --- a/game/base-clothing/wardrobes.twee +++ b/game/base-clothing/wardrobes.twee @@ -574,7 +574,7 @@ Type: <label>Everyday <<radiobutton "$outfit_type" 0 checked>></label> | <label> <<widget "toggleHood">> /* If hood is up, put it down and free up the head slot*/ - <<if $worn.upper.hoodposition is "up">> + <<if $worn.upper.hoodposition is "up" and $worn.head.hood is 1 and $worn.upper.outfitPrimary.head is $worn.head.name>> <<run delete $worn.upper.outfitPrimary.head>> <<set $worn.upper.hoodposition to "down">> <<if _args[0] is "shop" and $tryOn.ownedStored.head.name isnot $worn.head.name and !($tryOn.ownedStored.head.outfitSecondary and $tryOn.ownedStored.head.outfitSecondary[1] isnot "broken")>> @@ -589,36 +589,47 @@ Type: <label>Everyday <<radiobutton "$outfit_type" 0 checked>></label> | <label> <</if>> /* If hood is down, put it back up and remove anything on the head if necessary */ - <<else>> + <<elseif $worn.upper.hoodposition is "down">> <<if !$worn.head.cursed>> /* No cursed head items yet, but if one is made, should probably have some popup saying this was prevented */ - <<if _args[0] is "shop">> /*If in a shop, make sure the head item is accounted for first*/ - <<if $tryOn.tryingOn.head isnot null>> - <<shopbuyv2 "head" "return" null>>/*return if trying on*/ + <<if $worn.head.outfitSecondary and $worn.head.outfitSecondary[1] isnot "broken">> + <<if $worn.head.hood is 1 and $worn.head.outfitSecondary[1] is $worn.upper.name and + $worn.head.colour is $worn.upper.colour and $worn.head.accessory_colour is $worn.upper.accessory_colour and + $worn.head.colourCustom is $worn.upper.colourCustom and $worn.head.accessory_colourCustom is $worn.upper.accessory_colourCustom>> + <<set $worn.upper.outfitPrimary.head to clone(setup.clothes.upper[$worn.upper.index].outfitPrimary.head)>> + <<set $worn.upper.hoodposition to "up">> <</if>> - <<if $tryOn.tryingOn.upper is null and $worn.head.name isnot "naked">> - <<generalUndress $wardrobe_location "head">>/*send back to wardrobe if already owned*/ + <<else>> + <<if _args[0] is "shop">> /*If in a shop, make sure the head item is accounted for first*/ + <<if $tryOn.tryingOn.head isnot null>> + <<shopbuyv2 "head" "return" null>>/*return if trying on*/ + <</if>> + <<if $tryOn.tryingOn.upper is null and $worn.head.name isnot "naked">> + <<generalUndress $wardrobe_location "head">>/*send back to wardrobe if already owned*/ + <</if>> + <<elseif $worn.head.name isnot "naked">> + <<generalUndress $wardrobe_location "head">> + <</if>> + <<set $worn.upper.outfitPrimary.head to clone(setup.clothes.upper[$worn.upper.index].outfitPrimary.head)>> + <<set $worn.upper.hoodposition to "up">> + /* re-create the hood using colors from the hoodie */ + <<set $_hoodIndex to setup.clothes.head.findIndex(x => x.name === $worn.upper.outfitPrimary.head)>> + <<set $worn.head to clone(setup.clothes.head[$_hoodIndex])>> + <<set $worn.head.colour to $worn.upper.colour>> + <<if $worn.head.colour is "custom">> + <<set $worn.head.colourCustom to $worn.upper.colourCustom>> + <</if>> + <<set $worn.head.accessory_colour to $worn.upper.accessory_colour>> + <<if $worn.head.accessory_colour is "custom">> + <<set $worn.head.accessory_colourCustom to $worn.upper.accessory_colourCustom>> + <</if>> + + <<if _args[0] is "shop" and $tryOn.tryingOn.upper is null>> + <<updateOwned "upper">> <</if>> - <<elseif $worn.head.name isnot "naked">> - <<generalUndress $wardrobe_location "head">> - <</if>> - <<set $worn.upper.outfitPrimary.head to clone(setup.clothes.upper[$worn.upper.index].outfitPrimary.head)>> - <<set $worn.upper.hoodposition to "up">> - /* re-create the hood using colors from the hoodie */ - <<set $_hoodIndex to setup.clothes.head.findIndex(x => x.name === $worn.upper.outfitPrimary.head)>> - <<set $worn.head to clone(setup.clothes.head[$_hoodIndex])>> - <<set $worn.head.colour to $worn.upper.colour>> - <<if $worn.head.colour is "custom">> - <<set $worn.head.colourCustom to $worn.upper.colourCustom>> - <</if>> - <<set $worn.head.accessory_colour to $worn.upper.accessory_colour>> - <<if $worn.head.accessory_colour is "custom">> - <<set $worn.head.accessory_colourCustom to $worn.upper.accessory_colourCustom>> - <</if>> - - <<if _args[0] is "shop" and $tryOn.tryingOn.upper is null>> - <<updateOwned "upper">> <</if>> <</if>> + <<elseif $worn.upper.hoodposition is undefined and setup.clothes.upper[$worn.upper.index].hoodposition isnot undefined>> + <<set $worn.upper.hoodposition to "up">> <</if>> <</widget>> diff --git a/game/base-clothing/widgets.twee b/game/base-clothing/widgets.twee index 9c0726a08ee95566e07d24cc09a4b20f74e6ffe5..6d624fa84d04f24637345dab164847a76ff8b023 100644 --- a/game/base-clothing/widgets.twee +++ b/game/base-clothing/widgets.twee @@ -605,6 +605,8 @@ <<set $_cost to Math.trunc(getClothingCost($_item, $_slot) * 1.5)>> <<set _hoodDown to $_item.hoodposition is "down">> + <<if $_item.colourCustom isnot undefined>><<set _colourCustom to $_item.colourCustom>><</if>> + <<if $_item.accessory_colourCustom isnot undefined>><<set _accessory_colourCustom to $_item.accessory_colourCustom>><</if>> <<if $_item.outfitSecondary isnot undefined and $_item.outfitSecondary[1] is "broken">> <<elseif $money gte $_cost>> diff --git a/game/overworld-town/loc-adultshop/widgets.twee b/game/overworld-town/loc-adultshop/widgets.twee index 1feb503f9de4e36d9fa94c41e72bf0c8aa0d0338..0db994b7f3554ac7c8569f25e5d0198fcce83ac4 100644 --- a/game/overworld-town/loc-adultshop/widgets.twee +++ b/game/overworld-town/loc-adultshop/widgets.twee @@ -662,7 +662,7 @@ <</if>> <<rngWraith 1>> - <<if _wraithEvent is true and $awareness gt 300>> + <<if _wraithEvent is true and $awareness gt 300 and $swarmdisable is "f">> <<addinlineevent "wraithdildoswarm" 2>> As you're stocking a shelf with dildos, the toys start shaking. A breathless voice whispers in your ear. <br><br>