Browse Source

[fixed] missing if conditions in kiosk

julzor 5 years ago
parent
commit
fa478c9d45
1 changed files with 48 additions and 40 deletions
  1. 48 40
      locations/kiosk.qsrc

+ 48 - 40
locations/kiosk.qsrc

@@ -137,50 +137,58 @@ if $ARGS[0] = 'counter':
 
 	act 'Leave': $kioskloc = '' & minut += 1 & gt $loc
 
-	act 'Buy a snack (100 <b>₽</b>) (0:05)':
-		*clr & cla
-		gs 'stat'
-		minut += 5
-		money -= 100
-		pcs_health += 10
-		pcs_mood += 20
-		fat += 6
-		pcs_energy += 20
-		if pcs_hydra >= 100:
-			pcs_hydra += 10
-		else
-			pcs_hydra += 20
+	if money >= 100:
+		act 'Buy a snack (100 <b>₽</b>) (0:05)':
+			*clr & cla
+			gs 'stat'
+			minut += 5
+			money -= 100
+			pcs_health += 10
+			pcs_mood += 20
+			fat += 6
+			pcs_energy += 20
+			if pcs_hydra >= 100:
+				pcs_hydra += 10
+			else
+				pcs_hydra += 20
+			end
+			cumspclnt = 2
+			gs 'cum_cleanup'
+			pcs_breath = 0
+			gs 'stat'
+			'<center><img <<$set_imgh>> src="images/shared/food/food.jpg"></center>'
+			'You enjoy a small tasty, but somewhat fattening, snack.'
+			act 'return': gt 'kiosk', 'start'
 		end
-		cumspclnt = 2
-		gs 'cum_cleanup'
-		pcs_breath = 0
-		gs 'stat'
-		'<center><img <<$set_imgh>> src="images/shared/food/food.jpg"></center>'
-		'You enjoy a small tasty, but somewhat fattening, snack.'
-		act 'return': gt 'kiosk', 'start'
+	else
+		'You don''t have enough money to buy a snack.'
 	end
 
-	act 'Buy some water (40 <b>₽</b>) (0:05)':
-		*clr & cla
-		frost = 1
-		alko -= 1
-		minut += 5
-		money -= 40
-		pcs_health += 10
-		pcs_energy += 4
-		if pcs_hydra >= 100:
-			pcs_hydra += 25
-		else
-			pcs_hydra += 50
+	if money >= 40:
+		act 'Buy some water (40 <b>₽</b>) (0:05)':
+			*clr & cla
+			frost = 1
+			alko -= 1
+			minut += 5
+			money -= 40
+			pcs_health += 10
+			pcs_energy += 4
+			if pcs_hydra >= 100:
+				pcs_hydra += 25
+			else
+				pcs_hydra += 50
+			end
+			cumspclnt = 2
+			gs 'cum_cleanup'
+			pcs_breath = 0
+			gs 'cum_cleanup'
+			gs 'stat'
+			'<center><img <<$set_imgh>> src="images/locations/shared/brothel/barorderwater.jpg"></center>'
+			'You enjoy a drink of water'
+			act 'return': gt 'kiosk', 'start'
 		end
-		cumspclnt = 2
-		gs 'cum_cleanup'
-		pcs_breath = 0
-		gs 'cum_cleanup'
-		gs 'stat'
-		'<center><img <<$set_imgh>> src="images/locations/shared/brothel/barorderwater.jpg"></center>'
-		'You enjoy a drink of water'
-		act 'return': gt 'kiosk', 'start'
+	else
+		'You don''t have enough money to buy some water.'
 	end
 
 	act 'View phone themes': $kioskloc = '' & gt 'kiosk', 'themes'