Browse Source

Door close, price tweaks

Load_Fix
Robert Chen 11 years ago
parent
commit
e5306e63d5
  1. 8
      js/main.js
  2. 5
      js/stories.js
  3. 11
      js/ui.js

8
js/main.js

@ -230,10 +230,10 @@ function GameState(){
"res/screens/KitchenScreen/StuffingSpecialKitchen.png","res/screens/KitchenScreen/StuffingSpecialKitchenGlow.png", "res/screens/KitchenScreen/StuffingSpecialKitchen.png","res/screens/KitchenScreen/StuffingSpecialKitchenGlow.png",
"Once rated as the most handsome man in the universe. Scott and his patented special stuffing will set you on the path to food heaven" ), "Once rated as the most handsome man in the universe. Scott and his patented special stuffing will set you on the path to food heaven" ),
"Organic Turkey" : new MarketItem( this, "Organic Turkey", 180,360, randomWeight[0]*2.00, "res/items/Turkey5.png", "res/items/Turkey5Glow.png",null,null, "All natural. No hormones. No antibiotics. Free Range. Lead Free", parseFloat(randomWeight[0]) ), "Organic Turkey" : new MarketItem( this, "Organic Turkey", 180,360, randomWeight[0]*1.6, "res/items/Turkey5.png", "res/items/Turkey5Glow.png",null,null, "All natural. No hormones. No antibiotics. Free Range. Lead Free", parseFloat(randomWeight[0]) ),
"Free Range Turkey": new MarketItem( this, "Free Range Turkey", 540,320, randomWeight[1]*1.25, "res/items/Turkey4.png", "res/items/Turkey4Glow.png",null,null, "Our turkeys have wide open spaces to roam and are fed with only the highest quality feed.", parseFloat(randomWeight[1]) ), "Free Range Turkey": new MarketItem( this, "Free Range Turkey", 540,320, randomWeight[1]*1.20, "res/items/Turkey4.png", "res/items/Turkey4Glow.png",null,null, "Our turkeys have wide open spaces to roam and are fed with only the highest quality feed.", parseFloat(randomWeight[1]) ),
"Sunny Farms Turkey" : new MarketItem( this, "Sunny Farms Turkey", 265,415, randomWeight[2]*0.85, "res/items/Turkey3.png", "res/items/Turkey3Glow.png",null,null, "100% Turkey product from Sunny Farms Heavy Industries, Ltd.", parseFloat(randomWeight[2]) ), "Sunny Farms Turkey" : new MarketItem( this, "Sunny Farms Turkey", 265,415, randomWeight[2]*0.80, "res/items/Turkey3.png", "res/items/Turkey3Glow.png",null,null, "100% Turkey product from Sunny Farms Heavy Industries, Ltd.", parseFloat(randomWeight[2]) ),
"Pastured Turkey": new MarketItem( this, "Pastured Turkey", 474,357, randomWeight[3]*1.75, "res/items/Turkey2.png", "res/items/Turkey2Glow.png",null,null, "Grassy fields and natural ingredients allow our turkeys to have a better life, and taste great.", parseFloat(randomWeight[3]) ), "Pastured Turkey": new MarketItem( this, "Pastured Turkey", 474,357, randomWeight[3]*1.4, "res/items/Turkey2.png", "res/items/Turkey2Glow.png",null,null, "Grassy fields and natural ingredients allow our turkeys to have a better life, and taste great.", parseFloat(randomWeight[3]) ),
"General Turkey": new MarketItem( this, "General Turkey", 378,426, randomWeight[4]*1.00, "res/items/Turkey1.png", "res/items/Turkey1Glow.png",null,null, "100% General Satisfaction Guaranteed", parseFloat(randomWeight[4]) ) "General Turkey": new MarketItem( this, "General Turkey", 378,426, randomWeight[4]*1.00, "res/items/Turkey1.png", "res/items/Turkey1Glow.png",null,null, "100% General Satisfaction Guaranteed", parseFloat(randomWeight[4]) )
}; };

5
js/stories.js

@ -4,8 +4,9 @@ var messages = {
"CannotBuyTurkey" : ["Me: I've barely have time for ONE turkey, let alone TWO!"], "CannotBuyTurkey" : ["Me: I've barely have time for ONE turkey, let alone TWO!"],
"NoMoney" : ["Me: I can't afford this!"], "NoMoney" : ["Me: I can't afford this!"],
"BuyTurkeyFirst" : ["Me: I should buy a turkey first!"], "BuyTurkeyFirst" : ["Me: I should buy a turkey first!"],
"BrokenLight" : ["Me: The oven light appears to be broken..."], "BrokenLight" : ["Me: Hmm... the oven light appears to be broken..."],
"EmptyOven" : ["Me: The oven is already preheated..."] "EmptyOven" : ["Me: Ah, the oven is already preheated..."],
"OpenDoor" :["Me: Hmm... I should probably try opening the oven door to measure the turkey's temperature"]
} }
var story = { var story = {

11
js/ui.js

@ -274,9 +274,14 @@ function OvenUI( stage, gameState ){
// Show core temperature // Show core temperature
this.showTempDialog = function(){ this.showTempDialog = function(){
state = ovenModel.getTurkeyState(); if( that.ovenDoor == OVEN_CLOSED ){
gameState.pubsub.publish( "ShowDialog", {seq:"custom", autoAdvance:false, customText:"Hmm.. the core temperature of the turkey is " + UtilityFunctions.C2F(state.core.temp).toFixed(2) + " F" } ); gameState.pubsub.publish("ShowDialog", {seq:"OpenDoor", autoAdvance:true});
gameState.pubsub.publish( "AddRecord", "Core temperature measured: " + UtilityFunctions.C2F(state.core.temp).toFixed(2) + " F" ); }
else{
state = ovenModel.getTurkeyState();
gameState.pubsub.publish( "ShowDialog", {seq:"custom", autoAdvance:false, customText:"Hmm.. the core temperature of the turkey is " + UtilityFunctions.C2F(state.core.temp).toFixed(2) + " F" } );
gameState.pubsub.publish( "AddRecord", "Core temperature measured: " + UtilityFunctions.C2F(state.core.temp).toFixed(2) + " F" );
}
} }
new CookbookUI( stage, gameState ); new CookbookUI( stage, gameState );

Loading…
Cancel
Save