protected override bool SpecificTest(Sim a, Stove target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if (!target.CommonMakeTest(a) || target.HasGasLeak) { return(false); } Recipe.CanMakeFoodTestResult result = Food.CanMake(this.ChosenRecipe, true, true, Recipe.MealTime.DO_NOT_CHECK, this.Repetition, target.LotCurrent, a, this.Quantity, this.Cost, this.ObjectClickedOn); return(Food.PrepareTestResultCheckAndGrayedOutPieMenuSet(a, this.ChosenRecipe, result, ref greyedOutTooltipCallback)); }
protected override bool SpecificTest(Sim a, Grill target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if (a.Posture is SwimmingInPool) { return(false); } if (!target.CommonMakeTest(a)) { return(false); } if (this.ChosenRecipe == null) { return(a.IsNPC && target.LotCurrent.IsCommunityLot); } Recipe.CanMakeFoodTestResult result = Food.CanMake(this.ChosenRecipe, true, !target.LotCurrent.IsCommunityLot, Recipe.MealTime.DO_NOT_CHECK, this.Repetition, target.LotCurrent, a, this.Quantity, this.Cost, this.ObjectClickedOn); return(Food.PrepareTestResultCheckAndGrayedOutPieMenuSet(a, this.ChosenRecipe, result, ref greyedOutTooltipCallback)); }
protected override bool SpecificTest(Sim a, Microwave target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if (!target.MakeSomethingStandardTests()) { return(false); } if (this.ChosenRecipe != null && !this.ChosenRecipe.IsSnack) { Recipe.CanMakeFoodTestResult result = Food.CanMake(this.ChosenRecipe, true, true, Recipe.MealTime.DO_NOT_CHECK, this.Repetition, target.LotCurrent, a, this.Quantity, this.Cost, this.ObjectClickedOn); return(Food.PrepareTestResultCheckAndGrayedOutPieMenuSet(a, this.ChosenRecipe, result, ref greyedOutTooltipCallback)); } if (this.ChosenRecipe != null && this.ChosenRecipe.IsSnack) { return(CommonMethods.PrepareTestResultCheckAndGrayedOutPieMenuSet(this.ChosenRecipe, a, ref greyedOutTooltipCallback)); } return(true); }
protected override bool SpecificTest(Sim a, Fridge target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if (target.FridgeInventory == null && target.LotCurrent != null && !target.LotCurrent.IsCommunityLot) { return(false); } if (isAutonomous && a.SimDescription.IsFrankenstein) { return(false); } if (this.ChosenRecipe != null && !this.ChosenRecipe.IsSnack) { Recipe.CanMakeFoodTestResult result = Food.CanMake(this.ChosenRecipe, true, true, Recipe.MealTime.DO_NOT_CHECK, this.Repetition, target.LotCurrent, a, this.Quantity, this.Cost, this.ObjectClickedOn); return(Food.PrepareTestResultCheckAndGrayedOutPieMenuSet(a, this.ChosenRecipe, result, ref greyedOutTooltipCallback)); } if (this.ChosenRecipe != null && this.ChosenRecipe.IsSnack) { return(CommonMethods.PrepareTestResultCheckAndGrayedOutPieMenuSet(this.ChosenRecipe, a, ref greyedOutTooltipCallback)); } return(!target.InUse); }