Пример #1
0
		public static Plant CreatePlantFromSeed(IGameObject seedObj, Soil soil, Sim planter)
		{
			PlantDefinition plantDefinition = PlantHelper.GetPlantDefinition(seedObj);
			if (plantDefinition == null)
			{
				return null;
			}
			float num = seedObj.Plantable.QualityLevel;
			if (planter != null)
			{
				//int num2 = planter.SkillManager.GetSkillLevel(SkillNames.Gardening);
				//if (num2 == -1)
				//{
				//	num2 = 0;
				//}
				//num *= Sims3.Gameplay.Skills.Gardening.QualityMultiplier[(int)plantDefinition.Rarity, num2];
				//if (planter.HasTrait(TraitNames.SuperGreenThumb))
				//{
				//	num *= TraitTuning.SuperGreenThumbPlantQualityMultiplier;
				//}
			}
			PlantInitParameters initParams = new PlantInitParameters(seedObj, num, plantDefinition, soil);
			Plant plant = Plant.DoCreatePlantFromSeed(plantDefinition, soil, initParams, Plant.IsMushroom(seedObj));
			plant?.AddSimWhoHelpedGrow(planter);
			return plant;
		}