public override bool Run() { try { bool previousInteractionSuccessful = false; if (Target.RouteSimToMeAndCheckInUse(Actor) && HarvestPlant.HarvestTest(Target, Actor)) { ConfigureInteraction(); Plant.TryConfigureTendGardenInteraction(Actor.CurrentInteraction); previousInteractionSuccessful = DoHarvest(); } if (IsChainingPermitted(previousInteractionSuccessful)) { IgnorePlants.Add(Target); PushNextInteractionInChain(Singleton, HarvestPlant.HarvestTest, Target.LotCurrent); } return(previousInteractionSuccessful); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); return(false); } }
public override bool Run() { bool flag = false; // This will be route to nearest water and back. if (Target.RouteSimToMeAndCheckInUse(Actor) && WaterTestDisregardGardeningSkill(Target, Actor)) { TryConfigureTendGardenInteraction(Actor.CurrentInteraction); flag = DoWater(); } if (IsChainingPermitted(flag)) { IgnorePlants.Add(Target); PushNextInteractionInChain(Singleton, WaterTestDisregardGardeningSkill, Target.LotCurrent); } return(flag); }