From 459753f26394903b2a947897de1d43b25dfb01e6 Mon Sep 17 00:00:00 2001 From: Sommar <19043-Sommar@users.noreply.gitgud.io> Date: Thu, 25 Mar 2021 04:38:08 +0200 Subject: [PATCH] Add more price sliders and move them to own section --- game/02-CSS/base.css | 28 +++++++++- game/03-JavaScript/base-clothing.js | 17 ++++++ .../04-Variables/variables-versionUpdate.twee | 5 ++ game/base-clothing/wardrobes.twee | 8 +-- game/base-clothing/widgets.twee | 16 +++--- game/base-system/settings.twee | 56 +++++++++++++++++-- game/overworld-town/loc-shop/clothing-v2.twee | 26 ++++----- game/overworld-town/loc-shop/cosmetics.twee | 8 +-- game/overworld-town/loc-shop/tailor.twee | 6 +- game/overworld-town/loc-shop/tryOn.twee | 6 +- game/overworld-town/loc-shop/widgets.twee | 6 +- 11 files changed, 137 insertions(+), 45 deletions(-) diff --git a/game/02-CSS/base.css b/game/02-CSS/base.css index a77bf5fb4c..1c222810cb 100644 --- a/game/02-CSS/base.css +++ b/game/02-CSS/base.css @@ -57,7 +57,8 @@ mouse.tooltip:hover span { .widerButton button { max-width: 280px; - } + margin-bottom: 4px; +} .fixedClose { position: -webkit-sticky; @@ -3794,4 +3795,29 @@ label { 100% { opacity: 1; } +} + +.clothes-price-container .numberslider-group { + display: flex; + flex-direction: column; + border: 1px solid #444; + border-left: none; + border-right: none; + margin-top: 4px; + padding: 0.5em 0; +} + +.clothes-price-container .numberslider-inline { + display: flex; + flex-direction: column; + min-width: 50%; + margin-bottom: 0.5em; +} + +.clothes-price-container .numberslider-inline > span { + font-size: 0.9em; +} + +.clothes-price-container .numberslider-inline > .macro-numberslider { + display: flex; } \ No newline at end of file diff --git a/game/03-JavaScript/base-clothing.js b/game/03-JavaScript/base-clothing.js index 249628b3af..68ed67261d 100644 --- a/game/03-JavaScript/base-clothing.js +++ b/game/03-JavaScript/base-clothing.js @@ -58,3 +58,20 @@ function debugColourContainerClasses(color) { ' ' + 'feet_acc-' + (color.feet[1] || '').replace(/ /g, '-') } window.debugColourContainerClasses = debugColourContainerClasses; // export function + +window.getClothingCost = function (item) { + let v = State.variables; + let cost = item.cost * v.clothesPrice; + + if (setup.clothes.under_lower.findIndex(x => x.name == item.name) >= 0 || setup.clothes.under_upper.findIndex(x => x.name == item.name) >= 0) + cost *= v.clothesPriceUnderwear; + else if (item.type.includes('school')) + cost *= v.clothesPriceSchool; + + // the lewder item is, the more affected by the multiplier it is + let lewdness = Math.clamp((item.reveal - 400) / 500, 0, 1); + let lewdCoef = 1 + (v.clothesPriceLewd - 1) * lewdness; + cost *= lewdCoef; + + return Math.round(cost); +} \ No newline at end of file diff --git a/game/04-Variables/variables-versionUpdate.twee b/game/04-Variables/variables-versionUpdate.twee index d82aa70bd2..0807c0d58e 100644 --- a/game/04-Variables/variables-versionUpdate.twee +++ b/game/04-Variables/variables-versionUpdate.twee @@ -2081,5 +2081,10 @@ <<if $clothesPrice is undefined>> <<set $clothesPrice to 1>> <</if>> +<<if $clothesPriceUnderwear is undefined>> + <<set $clothesPriceUnderwear to 1>> + <<set $clothesPriceSchool to 1>> + <<set $clothesPriceLewd to 1>> +<</if>> <</nobr>><</widget>> diff --git a/game/base-clothing/wardrobes.twee b/game/base-clothing/wardrobes.twee index 607673ef3a..14941a384e 100644 --- a/game/base-clothing/wardrobes.twee +++ b/game/base-clothing/wardrobes.twee @@ -1185,7 +1185,7 @@ to the crate and send them to be sold? Might be best to go shopping shortly afte <<if _items[_i].outfitPrimary is undefined and $crateContents is "outfits">> <<continue>> <</if>> - <<set _value += Math.floor(_items[_i].cost * $clothesPrice * (_items[_i].integrity / _items[_i].integrity_max) / 3)>> + <<set _value += Math.floor(getClothingCost(_items[_i]) * (_items[_i].integrity / _items[_i].integrity_max) / 3)>> <</for>> <</for>> It will earn you £<<print ((_value + 5000) / 100).toFixed(2)>>. @@ -1215,7 +1215,7 @@ It will earn you £<<print ((_value + 5000) / 100).toFixed(2)>>. <<if $wardrobe[_equip[$_i]][$_j].outfitPrimary is undefined and $crateContents is "outfits">> <<continue>> <</if>> - <<set _value += Math.floor($wardrobe[_equip[$_i]][$_j].cost * $clothesPrice * ($wardrobe[_equip[$_i]][$_j].integrity / $wardrobe[_equip[$_i]][$_j].integrity_max) / 3)>> + <<set _value += Math.floor(getClothingCost($wardrobe[_equip[$_i]][$_j]) * ($wardrobe[_equip[$_i]][$_j].integrity / $wardrobe[_equip[$_i]][$_j].integrity_max) / 3)>> <<run _toDelete.push(clone($_j))>> <</for>> <<for $_j to $wardrobe[_equip[$_i]].length; $_j gte 0; $_j-->> @@ -1251,7 +1251,7 @@ to the crate and send them to be repaired? Might be best to go shopping shortly <<if _items[_i].outfitPrimary is undefined and $crateContents is "outfits">> <<continue>> <</if>> - <<set _value += Math.floor(_items[_i].cost * $clothesPrice * (1 - (_items[_i].integrity / _items[_i].integrity_max)) * 1.25)>> + <<set _value += Math.floor(getClothingCost(_items[_i]) * (1 - (_items[_i].integrity / _items[_i].integrity_max)) * 1.25)>> <</for>> <</for>> It will cost you @@ -1288,7 +1288,7 @@ It will cost you <<if $wardrobe[_equip[$_i]][$_j].outfitPrimary is undefined and $crateContents is "outfits">> <<continue>> <</if>> - <<set _value += Math.floor($wardrobe[_equip[$_i]][$_j].cost * $clothesPrice * (1 - ($wardrobe[_equip[$_i]][$_j].integrity / $wardrobe[_equip[$_i]][$_j].integrity_max)) * 1.25)>> + <<set _value += Math.floor(getClothingCost($wardrobe[_equip[$_i]][$_j]) * (1 - ($wardrobe[_equip[$_i]][$_j].integrity / $wardrobe[_equip[$_i]][$_j].integrity_max)) * 1.25)>> <<if $wardrobeRepair[_equip[$_i]] is undefined>> <<set $wardrobeRepair[_equip[$_i]] to []>> diff --git a/game/base-clothing/widgets.twee b/game/base-clothing/widgets.twee index b9ca8b8325..28275a2046 100644 --- a/game/base-clothing/widgets.twee +++ b/game/base-clothing/widgets.twee @@ -450,9 +450,9 @@ /*Re-buy*/ <<if $args[0] isnot "genitals">> <<if $carried[$args[0]].name isnot "naked" and $clothingrebuy is 1 and $carried[$args[0]].one_piece isnot "broken" and $carried[$args[0]].shop.length gt 0>> - <<if $money gte Math.trunc($carried[$args[0]].cost * 1.5 * $clothesPrice)>> + <<if $money gte Math.trunc(getClothingCost($carried[$args[0]]) * 1.5)>> <<generalSend "wardrobe" $args[0] $carried[$args[0]].index $carried[$args[0]].colour $carried[$args[0]].accessory_colour>> - <<set $money -= Math.trunc($carried[$args[0]].cost * 1.5 * $clothesPrice)>> + <<set $money -= Math.trunc(getClothingCost($carried[$args[0]]) * 1.5)>> <<set $effectsmessage to 1>><<run $rebuy_success.push(clone($carried[$args[0]].name))>> <<else>> <<set $effectsmessage to 1>><<run $rebuy_failure.push(clone($carried[$args[0]].name))>> @@ -462,21 +462,21 @@ <<if $worn[$args[0]].accessory_colourCustom isnot undefined>><<set _accessory_colourCustom to $worn[$args[0]].accessory_colourCustom>><</if>> <<if $worn[$args[0]].outfitSecondary isnot undefined>> <<if $args[0] is "lower">> - <<if $money gte Math.trunc($worn["upper"].cost * 1.5 * $clothesPrice)>> + <<if $money gte Math.trunc(getClothingCost($worn["upper"]) * 1.5)>> <<generalSend "wardrobe" "upper" $worn["upper"].index $worn["upper"].colour $worn["upper"].accessory_colour>> - <<set $money -= Math.trunc($worn["upper"].cost * 1.5 * $clothesPrice)>> + <<set $money -= Math.trunc(getClothingCost($worn["upper"]) * 1.5)>> <<set $effectsmessage to 1>><<run $rebuy_success.push(clone($worn["upper"].name))>> <</if>> <<elseif $args[0] is "under_lower">> - <<if $money gte Math.trunc($worn["under_upper"].cost * 1.5 * $clothesPrice)>> + <<if $money gte Math.trunc(getClothingCost($worn["under_upper"]) * 1.5)>> <<generalSend "wardrobe" "under_upper" $worn["under_upper"].index $worn["under_upper"].colour $worn["under_upper"].accessory_colour>> - <<set $money -= Math.trunc($worn["under_upper"].cost * 1.5 * $clothesPrice)>> + <<set $money -= Math.trunc(getClothingCost($worn["under_upper"]) * 1.5)>> <<set $effectsmessage to 1>><<run $rebuy_success.push(clone($worn["under_upper"].name))>> <</if>> <</if>> - <<elseif $money gte Math.trunc($worn[$args[0]].cost * 1.5 * $clothesPrice)>> + <<elseif $money gte Math.trunc(getClothingCost($worn[$args[0]]) * 1.5)>> <<generalSend "wardrobe" $args[0] $worn[$args[0]].index $worn[$args[0]].colour $worn[$args[0]].accessory_colour>> - <<set $money -= Math.trunc($worn[$args[0]].cost * 1.5 * $clothesPrice)>> + <<set $money -= Math.trunc(getClothingCost($worn[$args[0]]) * 1.5)>> <<set $effectsmessage to 1>><<run $rebuy_success.push(clone($worn[$args[0]].name))>> <<else>> <<set $effectsmessage to 1>><<run $rebuy_failure.push(clone($worn[$args[0]].name))>> diff --git a/game/base-system/settings.twee b/game/base-system/settings.twee index a65f285024..569db2044b 100644 --- a/game/base-system/settings.twee +++ b/game/base-system/settings.twee @@ -70,6 +70,9 @@ <<set $sidebarAnimations to true>> <<set $combatAnimations to true>> <<set $clothesPrice to 1>> +<<set $clothesPriceUnderwear to 1>> +<<set $clothesPriceSchool to 1>> +<<set $clothesPriceLewd to 1>> <<startingPlayerImageReset>> <</nobr>><</widget>> @@ -107,6 +110,7 @@ <<switch $currentSubsection>> <<case "humanSettings">><<replace #subsectionDiv>><<humanSettings>><</replace>> <<case "beastSettings">><<replace #subsectionDiv>><<beastSettings>><</replace>> + <<case "priceSettings">><<replace #subsectionDiv>><<priceSettings>><</replace>> <<default>><<replace #subsectionDiv>><<humanSettings>><</replace>> <</switch>> <</nobr>><</widget>> @@ -578,12 +582,6 @@ <<numberslider "$alluremod" $alluremod 0.2 2 0.1>> <br><br> - <span class="gold">Clothing Price</span> - Default is 1, 2 is recommended for hard mode. - <br> - Will multiply the clothing cost by the number set. This includes the cost for buying, the automatic re-buy and repairing. Towels are still free. - <<numberslider "$clothesPrice" $clothesPrice 1 10 1>> - <br><br> - <div class="gold widerButton"> <<button "Human NPC Settings">> <<displaySubsection "humanSettings">> @@ -591,6 +589,9 @@ <<button "Beast Settings and Toggles">> <<displaySubsection "beastSettings">> <</button>> + <<button "Clothing Price Settings">> + <<displaySubsection "priceSettings">> + <</button>> </div> <div id="subsectionDiv"> @@ -720,6 +721,49 @@ </div> <</nobr>><</widget>> + <<widget "priceSettings">><<nobr>> + <div class="solidBorderContainer clothes-price-container"> + <span class="bold gold">Clothing Price</span> + <div class="small-description">Modify cost of clothing items. This includes the cost for buying, the automatic re-buy and repairing. Towels are still free.</div> + <div class="numberslider-group"> + <div class="numberslider-inline"> + <span class="gold">All Clothes</span> + <div class="small-description">For hard mode 200% is recommended.</div> + <<numberslider "$clothesPrice" $clothesPrice 1 10 0.5>> + </div> + </div> + <div class="numberslider-group"> + <div class="numberslider-inline"> + <span class="gold">Underwear</span> + <<numberslider "$clothesPriceUnderwear" $clothesPriceUnderwear 1 10 0.5>> + </div> + <div class="numberslider-inline"> + <span class="gold">School Clothes</span> + <<numberslider "$clothesPriceSchool" $clothesPriceSchool 1 10 0.5>> + </div> + <div class="numberslider-inline"> + <span class="gold">Lewd Clothes</span> + <<numberslider "$clothesPriceLewd" $clothesPriceLewd 0.1 2 0.1>> + </div> + </div> + + <!-- Make it show % instead of fractions and add some colour --> + <<run $(() => { $('.clothes-price-container input').on('input change', e => { + let valSpan = $(e.currentTarget).siblings().first(); + let value = valSpan.text(); + + valSpan.text((i, value) => Math.round(value * 100) + '%'); + + if (value > 1) + valSpan.css('color', 'gold'); + else if (value < 1) + valSpan.css('color', 'green'); + else + valSpan.css('color', 'unset'); + }).trigger('change') })>> + </div> + <</nobr>><</widget>> + <span class="gold">Togglable Features</span> <br> <label><div class="settingsToggle"> diff --git a/game/overworld-town/loc-shop/clothing-v2.twee b/game/overworld-town/loc-shop/clothing-v2.twee index b3300666bd..0b3b1864d7 100644 --- a/game/overworld-town/loc-shop/clothing-v2.twee +++ b/game/overworld-town/loc-shop/clothing-v2.twee @@ -304,7 +304,7 @@ </div> <<else>> <!-- Price tag --> - <span class="clothing-price">£<<print _item.cost * $clothesPrice * 0.01>></span> + <span class="clothing-price">£<<print getClothingCost(_item) / 100>></span> <!-- Integrity, Reveal and Warmth indicators --> <<if !$shopDefaults.compactMode>> <div class="clothing-integrity"> @@ -408,7 +408,7 @@ <<elseif _temp_choice.gender is "f">> <span class="pink">For girls.</span> <</if>> - <<print _temp_choice.description>> Costs <span class="gold">£<<print _temp_choice.cost * $clothesPrice * 0.01>>.</span> + <<print _temp_choice.description>> Costs <span class="gold">£<<print getClothingCost(_temp_choice) / 100>>.</span> <br> <<set _truewarmth = getTrueWarmth(_temp_choice)>> <<warmth _truewarmth>> @@ -477,7 +477,7 @@ <<printcursed>> <<else>> <<link "Steal and wear">> - <<shopbuyv2 $clothingShopSlot "steal" "wear" $clothes_choice>><<crimeup `_temp_choice.cost * $clothesPrice / 100`>><<unset $clothes_choice>> + <<shopbuyv2 $clothingShopSlot "steal" "wear" $clothes_choice>><<crimeup `getClothingCost(_temp_choice) / 100`>><<unset $clothes_choice>> <<set $clothingShop.stolenClothes++>> <<set $clothingShop.totalStolenClothes++>> <<updateclotheslist>> @@ -491,7 +491,7 @@ <br> <</if>> <<link "Steal and take home">> - <<shopbuyv2 $clothingShopSlot "steal" "send" $clothes_choice>><<crimeup `_temp_choice.cost * $clothesPrice / 100`>> + <<shopbuyv2 $clothingShopSlot "steal" "send" $clothes_choice>><<crimeup `getClothingCost(_temp_choice) / 100`>> <<set $clothingShop.stolenClothes++>> <<set $clothingShop.totalStolenClothes++>> <<if $shopDefaults.disableReturn is false>> @@ -506,7 +506,7 @@ <span class="red">You can't carry any more clothes with you.</span> You should take them to your wardrobe. <br> <</if>> - <<elseif $money >= _temp_choice.cost * $clothesPrice>> + <<elseif $money >= getClothingCost(_temp_choice)>> <<if _cursedPrevent>> <<printcursed>> <</if>> @@ -521,7 +521,7 @@ <<link "Buy and wear">> <<clothingReset $clothingShopSlot>> <<shopbuyv2 $clothingShopSlot "buy" "wear" $clothes_choice>> - <<set $money -= _temp_choice.cost * $clothesPrice>> + <<set $money -= getClothingCost(_temp_choice)>> <<unset $clothes_choice>> <<updateclotheslist>> <<updatesidebarimg>> @@ -532,7 +532,7 @@ <<if $shopDefaults.disableReturn>><<updatewarmthdescription>><</if>> <<run updateMoment()>> <</link>> - <span>(<span class="gold">£<<print _temp_choice.cost * $clothesPrice * 0.01>></span>)</span> + <span>(<span class="gold">£<<print getClothingCost(_temp_choice) / 100>></span>)</span> <</if>> </div> </div> @@ -586,14 +586,14 @@ <</nobr>><</widget>> <<widget "printbuysendhome">><<nobr>> - <<set _canAfford = ($money >= _temp_choice.cost * $clothesPrice * $buyMultiple and _spaceLeft >= $buyMultiple) ? "" : "disabled">> + <<set _canAfford = ($money >= getClothingCost(_temp_choice) * $buyMultiple and _spaceLeft >= $buyMultiple) ? "" : "disabled">> <div class="buy-button"> <div @class="'buy-button-inner buy-multiple div-link ' + _canAfford"> <<link `'Buy and send home × ' + $buyMultiple`>> - <<if $money >= _temp_choice.cost * $clothesPrice * $buyMultiple and _spaceLeft >= $buyMultiple>> + <<if $money >= getClothingCost(_temp_choice) * $buyMultiple and _spaceLeft >= $buyMultiple>> <<clothingReset $clothingShopSlot>> <<shopbuyv2 $clothingShopSlot "buy" "send" $clothes_choice $buyMultiple>> - <<set $money -= _temp_choice.cost * $clothesPrice * $buyMultiple>> + <<set $money -= getClothingCost(_temp_choice) * $buyMultiple>> <<if $shopDefaults.disableReturn is false>> <<unset $clothes_choice>> <</if>> @@ -603,7 +603,7 @@ <<run updateMoment()>> <</if>> <</link>> - <span>(<span class="gold">£<<print _temp_choice.cost * $clothesPrice * $buyMultiple * 0.01>></span>)</span> + <span>(<span class="gold">£<<print getClothingCost(_temp_choice) * $buyMultiple / 100>></span>)</span> </div> <div id="buy-multiple-slider" class="buy-multiple-slider"> @@ -618,8 +618,8 @@ text.push($buyMultiple); el.text(text.join(' ')); - $('#buy-send-home > .buy-button > .buy-button-inner > span > span').text('£' + _temp_choice.cost * $clothesPrice * $buyMultiple * 0.01); - $('#buy-send-home > .buy-button > .buy-button-inner').toggleClass('disabled', $money < _temp_choice.cost * $clothesPrice * $buyMultiple or _spaceLeft < $buyMultiple); + $('#buy-send-home > .buy-button > .buy-button-inner > span > span').text('£' + getClothingCost(_temp_choice) * $buyMultiple / 100); + $('#buy-send-home > .buy-button > .buy-button-inner').toggleClass('disabled', $money < getClothingCost(_temp_choice) * $buyMultiple or _spaceLeft < $buyMultiple); }); })>> </div> diff --git a/game/overworld-town/loc-shop/cosmetics.twee b/game/overworld-town/loc-shop/cosmetics.twee index e95ae98d88..4811c1d1ce 100644 --- a/game/overworld-town/loc-shop/cosmetics.twee +++ b/game/overworld-town/loc-shop/cosmetics.twee @@ -108,14 +108,14 @@ _textIntro <<set _buy = $daystate == "night" ? "Steal" : "Buy">> <<if _isConsumable == true>> <<set _usesText = _usesPerBuy > 1 ? " ("+_usesPerBuy+" uses)" : "">> - <<link [[_buy+_usesText|_passageCurrent]]>><<addConsumableCosmetics _itemType $cosmeticsChoice _usesPerBuy>><<if $daystate is "night">><<crimeup _price * 0.01>><<else>><<set $money -= _price>><</if>><</link>><<if $daystate is "night">><<crime>><</if>><br> + <<link [[_buy+_usesText|_passageCurrent]]>><<addConsumableCosmetics _itemType $cosmeticsChoice _usesPerBuy>><<if $daystate is "night">><<crimeup _price / 100>><<else>><<set $money -= _price>><</if>><</link>><<if $daystate is "night">><<crime>><</if>><br> <<if _canUseNow == true>> - <<link [[_buy+_usesText+" and apply"+(_usesPerBuy > 1 ? " one" : "")+" right now"|_passageCurrent]]>><<addConsumableCosmetics _itemType $cosmeticsChoice _usesPerBuy-1>><<set $makeup[_itemType] = $cosmeticsChoice>><<if $daystate is "night">><<crimeup _price * 0.01>><<else>><<set $money -= _price>><</if>><</link>><<if $daystate is "night">><<crime>><</if>><br> + <<link [[_buy+_usesText+" and apply"+(_usesPerBuy > 1 ? " one" : "")+" right now"|_passageCurrent]]>><<addConsumableCosmetics _itemType $cosmeticsChoice _usesPerBuy-1>><<set $makeup[_itemType] = $cosmeticsChoice>><<if $daystate is "night">><<crimeup _price / 100>><<else>><<set $money -= _price>><</if>><</link>><<if $daystate is "night">><<crime>><</if>><br> <</if>> <<else>> - <<link [[_buy+" and send home"|_passageCurrent]]>><<set $makeup.owned[_itemType].push($cosmeticsChoice)>><<if $daystate is "night">><<crimeup _price * 0.01>><<else>><<set $money -= _price>><</if>><</link>><<if $daystate is "night">><<crime>><</if>><br> + <<link [[_buy+" and send home"|_passageCurrent]]>><<set $makeup.owned[_itemType].push($cosmeticsChoice)>><<if $daystate is "night">><<crimeup _price / 100>><<else>><<set $money -= _price>><</if>><</link>><<if $daystate is "night">><<crime>><</if>><br> <<if _canUseNow == true>> - <<link [[_buy+" and use right now"|_passageCurrent]]>><<set $makeup.owned[_itemType].push($cosmeticsChoice)>><<set $makeup[_itemType] = $cosmeticsChoice>><<if $daystate is "night">><<crimeup _price * 0.01>><<else>><<set $money -= _price>><</if>><</link>><<if $daystate is "night">><<crime>><</if>><br> + <<link [[_buy+" and use right now"|_passageCurrent]]>><<set $makeup.owned[_itemType].push($cosmeticsChoice)>><<set $makeup[_itemType] = $cosmeticsChoice>><<if $daystate is "night">><<crimeup _price / 100>><<else>><<set $money -= _price>><</if>><</link>><<if $daystate is "night">><<crime>><</if>><br> <</if>> <</if>> <<else>> diff --git a/game/overworld-town/loc-shop/tailor.twee b/game/overworld-town/loc-shop/tailor.twee index 37cecd0854..dd7580fef5 100644 --- a/game/overworld-town/loc-shop/tailor.twee +++ b/game/overworld-town/loc-shop/tailor.twee @@ -29,7 +29,7 @@ You are in the tailor shop. It has cloth of various colours hanging on racks. <</if>> <</if>> <<if $worn[_active_clothes].integrity lt $worn[_active_clothes].integrity_max and $worn[_active_clothes].integrity gt 0 and $worn[_active_clothes].integrity_max gt 0>> - <<set $tailor_cost += Math.trunc($worn[_active_clothes].cost * $clothesPrice * (1 - $worn[_active_clothes].integrity / $worn[_active_clothes].integrity_max))>> + <<set $tailor_cost += Math.trunc(getClothingCost($worn[_active_clothes]) * (1 - $worn[_active_clothes].integrity / $worn[_active_clothes].integrity_max))>> <<set _time += 5>> <</if>> <</for>> @@ -201,7 +201,7 @@ Your lower clothes have been fixed. <<if _items[_i].outfitSecondary isnot undefined>> <<continue>> <</if>> - <<set _value += Math.floor(_items[_i].cost * $clothesPrice * (_items[_i].integrity / _items[_i].integrity_max) / 3)>> + <<set _value += Math.floor(getClothingCost(_items[_i]) * (_items[_i].integrity / _items[_i].integrity_max) / 3)>> <</for>> <</for>> You think it will earn you £<<print ((_value / 100) + 50).toFixed(2)>> currently after getting the deposit back. @@ -230,7 +230,7 @@ Please make sure you don't buy too many new clothes once you send them to us, or <<if _items[_i].outfitSecondary isnot undefined>> <<continue>> <</if>> - <<set _value += Math.floor(_items[_i].cost * $clothesPrice * (1 - (_items[_i].integrity / _items[_i].integrity_max)) * 1.25)>> + <<set _value += Math.floor(getClothingCost(_items[_i]) * (1 - (_items[_i].integrity / _items[_i].integrity_max)) * 1.25)>> <</for>> <</for>> You think it will cost you diff --git a/game/overworld-town/loc-shop/tryOn.twee b/game/overworld-town/loc-shop/tryOn.twee index fd67610f72..2a78951578 100644 --- a/game/overworld-town/loc-shop/tryOn.twee +++ b/game/overworld-town/loc-shop/tryOn.twee @@ -78,7 +78,7 @@ <<if _tryon[1].colour isnot 0>> <<print '<span class="' + _tryon[1].colour + '">(_tryon[1].colour)</span>'>> <</if>> - <<print _tryon[1].name_cap>> with a price tag of £<<print _tryon[1].cost * $clothesPrice / 100>> + <<print _tryon[1].name_cap>> with a price tag of £<<print getClothingCost(_tryon[1]) / 100>> <<capture _tryon[0]>> | <<link "Remove">><<clothingReset _tryon[0]>> <<updatesidebarimg>> @@ -268,7 +268,7 @@ <<for _labelTO, _valueTO range _items>> <<set $worn[_labelTO] to clone(_valueTO)>> <<set $tryOn.tryingOn[_labelTO] to clone(_valueTO)>> - <<set $tryOn.value += $tryOn.tryingOn[_labelTO].cost * $clothesPrice>> + <<set $tryOn.value += getClothingCost($tryOn.tryingOn[_labelTO])>> <</for>> <</if>> <</nobr>><</widget>> @@ -292,7 +292,7 @@ <<widget "removeTryingOn">><<nobr>> <<if $tryOn.tryingOn[$args[0]] isnot null>> - <<set $tryOn.value -= $tryOn.tryingOn[$args[0]].cost * $clothesPrice>> + <<set $tryOn.value -= getClothingCost($tryOn.tryingOn[$args[0]])>> <<set $tryOn.tryingOn[$args[0]] to null>> <</if>> <</nobr>><</widget>> diff --git a/game/overworld-town/loc-shop/widgets.twee b/game/overworld-town/loc-shop/widgets.twee index ada070a699..2b45b0158e 100644 --- a/game/overworld-town/loc-shop/widgets.twee +++ b/game/overworld-town/loc-shop/widgets.twee @@ -112,7 +112,7 @@ Forth argument - item index*/ <<elseif _temp_choice.gender is "f">> <span class="pink">For girls.</span> <</if>> - <<print _temp_choice.description>> Costs <span class="gold">£<<print _temp_choice.cost * $clothesPrice / 100>>.</span> + <<print _temp_choice.description>> Costs <span class="gold">£<<print getClothingCost(_temp_choice) / 100>>.</span> <br> <<warmth _temp_choice.warmth>> <br><br> @@ -168,7 +168,7 @@ Forth argument - item index*/ <div id="shopFullImage" @class="($shopDefaults.invertImagesHidden is true? '' : ' hidden')"><<shopFullImage $clothingShopSlot $clothes_choice>></div> <br> <</if>> - <<set _cost to clone(_temp_choice.cost * $clothesPrice)>> + <<set _cost to clone(getClothingCost(_temp_choice))>> <<unset _cursedPrevent>> <<set _outfitPrimaryShop to _temp_choice.outfitPrimary>> <<set _preventSlots to []>> @@ -362,7 +362,7 @@ Forth argument - item index*/ <</link>> <</capture>> <</if>> - | <span class="teal">£<<print _item.cost * $clothesPrice / 100>></span> | + | <span class="teal">£<<print getClothingCost(_item) / 100>></span> | <<if _item.gender is "m">> <span class="blue">♂</span> <<elseif _item.gender is "f">> -- GitLab