public static bool ImprovedFarming(Character character, out bool returnValue) { if (character.Mind.IsSkillAllowed(CharacterSkillType.Farming)) { FarmManager farmManager = GnomanEmpire.Instance.Fortress.FarmManager; Job job = farmManager.FindPlantSeedJob(character); if (job != null) { JobField.SetValue(character, job); job.Claim(character); returnValue = true; return(true); } job = FindTillSoilJobForSeed(farmManager, character); if (job != null) { JobField.SetValue(character, job); job.Claim(character); returnValue = true; return(true); } job = farmManager.FindHarvestJob(character); if (job != null) { JobField.SetValue(character, job); job.Claim(character); returnValue = true; return(true); } job = farmManager.FindTillSoilJob(character); if (job != null) { JobField.SetValue(character, job); job.Claim(character); returnValue = true; return(true); } } returnValue = false; return(true); }