Exemple #1
0
            protected static bool BaseCommonPlantingTest(Sim a, GameObject target, Lot lotTryingToPlantingOn, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (!PlantableComponent.PlantInteractionOpportunityTest(a, target))
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("PlantInteractionOpportunityTest");
                    return(false);
                }

                if (CameraController.IsMapViewModeEnabled())
                {
                    greyedOutTooltipCallback = new GreyedOutTooltipCallback(PlantObject.MapViewGreyedTooltip);
                    return(false);
                }

                /*
                 * if (!PlantingLotTest(lotTryingToPlantingOn, a))
                 * {
                 *  greyedOutTooltipCallback = new GreyedOutTooltipCallback(PlantObject.CanOnlyPlantOnHomeLot);
                 *  return false;
                 * }
                 */
                if (!PlantableComponent.PlantInteractionGardeningSkillTest(a, target, ref greyedOutTooltipCallback))
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("PlantInteractionGardeningSkillTest");
                    return(false);
                }
                return(true);
            }
		public static bool CommonPlantingTest(Sim a, GameObject target, Lot lotTryingToPlantingOn, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
		{
			if (!PlantableComponent.PlantInteractionOpportunityTest(a, target))
			{
				return false;
			}
			if (CameraController.IsMapViewModeEnabled())
			{
				greyedOutTooltipCallback = new GreyedOutTooltipCallback(MapViewGreyedTooltip);
				return false;
			}
			if (!PlantingLotTest(lotTryingToPlantingOn, a))
			{
				greyedOutTooltipCallback = new GreyedOutTooltipCallback(CanOnlyPlantOnHomeLot);
				return false;
			}
			if (!a.IsCat)  // TODO: Skill test
			{
				return false;
			}
			return true;
		}