Prechádzať zdrojové kódy

change `:: shop_item` so it's no longer possible to buy too high shoes

Stephan Fuchs 3 mesiacov pred
rodič
commit
04cbf106f6
1 zmenil súbory, kde vykonal 6 pridanie a 1 odobranie
  1. 6 1
      sugarcube/src/wardrobe/shop.tw

+ 6 - 1
sugarcube/src/wardrobe/shop.tw

@@ -197,11 +197,14 @@
 <</widget>>
 
 :: shop_item[menu]
+	
     <<set _item_id = $location_var[$here][0]>>
 	<<set _itemData = $wardrobe.itemData(_item_id)>>
 	<<set _item_price = $location_var[$here][1]>>
 	<<set _price_string = _item_price.toLocaleString()+' ₽'>>
 
+	<<set _item = setup.OutfitItem.get(_item_id)>>
+
 	<<set _itemInhibMode = $wardrobe.wearbleInhibition(_item_id)>>
 	<<debugVar _itemData>>
 
@@ -219,7 +222,9 @@
 		<<if $wardrobe.has(_item_id)>>
 			You own this item.
 		<<elseif _itemInhibMode == 0>>
-			<p>You don't feel daring enough to wear an outfit this revealing and can't bring yourself to buy it.</p>
+			<<negative>>You don't feel daring enough to wear an outfit this revealing and can't bring yourself to buy it.<</negative>>
+		<<elseif _item.type == 'shoes' and setup.difficultyOfHighHeels(_item) == 2>>
+			<<negative>>These shoes are way too high for you to walk in. Buying them now wouldn't make sense.<</negative>>
 		<<else>>
 			<<if $finances.cash >= _item_price>>
 				<<act `"Buy with cash ("+_price_string+")"`>>