public static bool Prefix(Event __instance, Location tileLocation, xTile.Dimensions.Rectangle viewport, Farmer who) { var actionStr = Game1.currentLocation.doesTileHaveProperty(tileLocation.X, tileLocation.Y, "Action", "Buildings"); if (actionStr != null) { return(!SpaceEvents.InvokeActionActivated(who, actionStr, tileLocation)); } return(true); }
public static bool Prefix(GameLocation __instance, string action, Farmer who, Location tileLocation) { return(!SpaceEvents.InvokeActionActivated(who, action, tileLocation)); }
/********* ** Private methods *********/ /// <summary>The method to call before <see cref="GameLocation.performAction"/>.</summary> private static bool Before_PerformAction(GameLocation __instance, string action, Farmer who, Location tileLocation) { return(!SpaceEvents.InvokeActionActivated(who, action, tileLocation)); }