feat: added more recipe button functionality
This commit is contained in:
parent
968a79335c
commit
75f24043b3
@ -68,19 +68,19 @@ function changeCaffeine(drink, caffeine){
|
|||||||
function changeShotType(drink, shotType) {
|
function changeShotType(drink, shotType) {
|
||||||
switch(shotType){
|
switch(shotType){
|
||||||
case "RESTRETTO":
|
case "RESTRETTO":
|
||||||
if(drink.shotType === shotTypes.RESTRETTO){
|
if(drink.recipe.shotType === shotTypes.RESTRETTO){
|
||||||
drink.shotType = shotTypes.NORMAL;
|
drink.recipe.shotType = shotTypes.NORMAL;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
drink.shotType = shotTypes.RESTRETTO;
|
drink.recipe.shotType = shotTypes.RESTRETTO;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "LONG":
|
case "LONG":
|
||||||
if(drink.shotType === shotTypes.LONG){
|
if(drink.recipe.shotType === shotTypes.LONG){
|
||||||
drink.shotType = shotTypes.NORMAL;
|
drink.recipe.shotType = shotTypes.NORMAL;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
drink.shotType = shotTypes.LONG;
|
drink.recipe.shotType = shotTypes.LONG;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -90,16 +90,16 @@ function changeShotType(drink, shotType) {
|
|||||||
function setShotCount(drink, count){
|
function setShotCount(drink, count){
|
||||||
switch(count){
|
switch(count){
|
||||||
case "SOLO":
|
case "SOLO":
|
||||||
drink.shots = 1;
|
drink.recipe.shots = 1;
|
||||||
break;
|
break;
|
||||||
case "DOPPIO":
|
case "DOPPIO":
|
||||||
drink.shots = 2;
|
drink.recipe.shots = 2;
|
||||||
break;
|
break;
|
||||||
case "TRIPLE":
|
case "TRIPLE":
|
||||||
drink.shots = 3;
|
drink.recipe.shots = 3;
|
||||||
break;
|
break;
|
||||||
case "QUAD":
|
case "QUAD":
|
||||||
drink.shots = 4;
|
drink.recipe.shots = 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return drink;
|
return drink;
|
||||||
@ -108,9 +108,21 @@ function setShotCount(drink, count){
|
|||||||
function addRecipe(drink, recipe){
|
function addRecipe(drink, recipe){
|
||||||
if(drink.recipe.assigned == false){
|
if(drink.recipe.assigned == false){
|
||||||
switch(recipe){
|
switch(recipe){
|
||||||
|
case "AMERICANO":
|
||||||
|
drink.recipe = Object.assign(drink.recipe, americano(drink));
|
||||||
|
break;
|
||||||
|
case "ESPRESSO":
|
||||||
|
drink.recipe = Object.assign(drink.recipe, espresso(drink));
|
||||||
|
break;
|
||||||
|
case "ESPRESSOMACCHIATO":
|
||||||
|
drink.recipe = Object.assign(drink.recipe, espressoMacchiato(drink));
|
||||||
|
break;
|
||||||
case "LATTE":
|
case "LATTE":
|
||||||
drink.recipe = Object.assign(drink.recipe, latte(drink));
|
drink.recipe = Object.assign(drink.recipe, latte(drink));
|
||||||
break;
|
break;
|
||||||
|
case "CINNDOLLATTE":
|
||||||
|
drink.recipe = Object.assign(drink.recipe, cinnamonDolceLatte(drink));
|
||||||
|
break;
|
||||||
case "SKINNYLATTE":
|
case "SKINNYLATTE":
|
||||||
drink.recipe = Object.assign(drink.recipe, skinnyLatte(drink));
|
drink.recipe = Object.assign(drink.recipe, skinnyLatte(drink));
|
||||||
break;
|
break;
|
||||||
@ -189,3 +201,7 @@ function standardShots(size, mod){
|
|||||||
return 2 + modValue;
|
return 2 + modValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function espressoShotsDeclaration(){
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user