@@ -4,21 +4,22 @@ import { purchaseItem } from '../../utils/coinsUpdate';
44import { interactionHandler } from '../handler.interactions' ;
55
66export const snackBarGreenInteraction = ( player , k ) => {
7- interactionHandler ( player , 'snack_bar_green ' , k , async ( ) => {
7+ interactionHandler ( player , 'snack_bar_green_1 ' , k , async ( ) => {
88 let ztmSnackDecision = await displayPermissionBox ( {
99 k,
1010 player,
1111 text : [
1212 'Welcome to Snack Bar Green! Ready to go from zero to snack mastery?' ,
1313 ] ,
14+ purchaseCost : 15 ,
1415 } ) ;
1516
1617 if ( ztmSnackDecision ) {
17- k . debug . log (
18- 'Congratulations! You’ve mastered the art of snacking, ZTM style!'
19- ) ;
2018 const purchaseStatus = purchaseItem ( k , 15 , 25 ) ;
2119 if ( purchaseStatus === 'purchased' ) {
20+ k . debug . log (
21+ 'Congratulations! You’ve mastered the art of snacking, ZTM style!'
22+ ) ;
2223 updateAchievements ( 'Food enthusiast' , 'Snack Bar Green' ) ;
2324 }
2425 } else {
@@ -28,14 +29,15 @@ export const snackBarGreenInteraction = (player, k) => {
2829 text : [
2930 'Are you sure? The path to snack mastery is only one bite away...' ,
3031 ] ,
32+ purchaseCost : 15 ,
3133 } ) ;
3234
3335 if ( secondSnackChance ) {
34- k . debug . log (
35- 'Great choice! You’re on your way to becoming a Snack Sensei!'
36- ) ;
3736 const purchaseStatus = purchaseItem ( k , 15 , 25 ) ;
3837 if ( purchaseStatus === 'purchased' ) {
38+ k . debug . log (
39+ 'Great choice! You’re on your way to becoming a Snack Sensei!'
40+ ) ;
3941 updateAchievements ( 'Food enthusiast' , 'Snack Bar Green' ) ;
4042 }
4143 } else {
@@ -55,14 +57,15 @@ export const snackBarRedInteraction = (player, k) => {
5557 text : [
5658 'Welcome to Snack Bar Red! The *real* masters of snacking... Unlike *ahem* some green wannabes across the street. Ready for the best snack experience?' ,
5759 ] ,
60+ purchaseCost : 15 ,
5861 } ) ;
5962
6063 if ( snackOffer ) {
61- k . debug . log (
62- 'Excellent choice! You clearly have superior taste. Snack Bar Green can’t compete!'
63- ) ;
6464 const purchaseStatus = purchaseItem ( k , 15 , 24 ) ;
6565 if ( purchaseStatus === 'purchased' ) {
66+ k . debug . log (
67+ 'Excellent choice! You clearly have superior taste. Snack Bar Green can’t compete!'
68+ ) ;
6669 updateAchievements ( 'Food enthusiast' , 'Snack Bar Red' ) ;
6770 }
6871 } else {
@@ -72,14 +75,15 @@ export const snackBarRedInteraction = (player, k) => {
7275 text : [
7376 'Are you sure? Don’t tell me you’re thinking of going to *that* green place... Their snacks are... well, let’s just say "unimpressive."' ,
7477 ] ,
78+ purchaseCost : 15 ,
7579 } ) ;
7680
7781 if ( changeMind ) {
78- k . debug . log (
79- 'Wise move! Snack Bar Red – where the real snack mastery happens!'
80- ) ;
8182 const purchaseStatus = purchaseItem ( k , 15 , 24 ) ;
8283 if ( purchaseStatus === 'purchased' ) {
84+ k . debug . log (
85+ 'Wise move! Snack Bar Red – where the real snack mastery happens!'
86+ ) ;
8387 updateAchievements ( 'Food enthusiast' , 'Snack Bar Red' ) ;
8488 }
8589 } else {
@@ -99,14 +103,15 @@ export const snackBarStreetInteraction = (player, k) => {
99103 text : [
100104 'Psst! You look hungry! How about a snack? It’s a secret recipe!' ,
101105 ] ,
106+ purchaseCost : 15 ,
102107 } ) ;
103108
104109 if ( snackDecision ) {
105- k . debug . log (
106- 'Yum! You just ate the best mystery snack of your life!'
107- ) ;
108110 const purchaseStatus = purchaseItem ( k , 15 , 24 ) ;
109111 if ( purchaseStatus === 'purchased' ) {
112+ k . debug . log (
113+ 'Yum! You just ate the best mystery snack of your life!'
114+ ) ;
110115 updateAchievements ( 'Food enthusiast' , 'Snack Bar Street' ) ;
111116 }
112117 } else {
@@ -116,14 +121,15 @@ export const snackBarStreetInteraction = (player, k) => {
116121 text : [
117122 'Are you sure? It’s low calorie and totally NOT haunted! Still no?' ,
118123 ] ,
124+ purchaseCost : 15 ,
119125 } ) ;
120126
121127 if ( secondChance ) {
122- k . debug . log (
123- 'Ah, there we go! Enjoy your... totally normal snack.'
124- ) ;
125128 const purchaseStatus = purchaseItem ( k , 15 , 24 ) ;
126129 if ( purchaseStatus === 'purchased' ) {
130+ k . debug . log (
131+ 'Ah, there we go! Enjoy your... totally normal snack.'
132+ ) ;
127133 updateAchievements ( 'Food enthusiast' , 'Snack Bar Street' ) ;
128134 }
129135 } else {
0 commit comments