private void GameLoop_DayStarted(object sender, DayStartedEventArgs e) { // Check if the farmer has the agriculturist profession var farmers = Game1.getAllFarmers(); foreach (var farmer in farmers) { if (farmer.IsMainPlayer && farmer.getProfessionForSkill(Farmer.farmingSkill, 10) == Farmer.agriculturist) { FarmingSkills.IsAgriculturist = true; break; } } // Load the Base Crops var currentDay = SDate.From(Game1.Date).Day; var currentSeason = SDate.From(Game1.Date).Season; switch (currentSeason) { case "spring": ShowCrops(SpringCrops, currentDay); break; case "summer": ShowCrops(SummerCrops, currentDay); break; case "fall": ShowCrops(FallCrops, currentDay); break; case "winter": ShowCrops(WinterCrops, currentDay); break; default: return; } }
public string From_WorldDate(int totalDays) { return(SDate.From(new WorldDate { TotalDays = totalDays }).ToString()); }