Ejemplo n.º 1
0
        public static bool Prefix(Farm ___farm, ShippingBin __instance)
        {
            if (___farm != null && Game1.player.ActiveObject != null && Game1.player.ActiveObject.canBeShipped() && Vector2.Distance(Game1.player.getTileLocation(), new Vector2((float)(int)__instance.tileX.Value + 0.5f, (float)(int)__instance.tileY.Value + 0.5f)) <= 2.25f)
            {
                //Console.WriteLine("ShippingBin.leftClicked");
                MainBinListener.OnShipItem(Game1.player.ActiveObject, Game1.player);
            }

            return(true);
        }
Ejemplo n.º 2
0
        public static bool Prefix(int x, int y, Farmer who)
        {
            if (who.ActiveObject != null && x / 64 >= 71 && x / 64 <= 72 && y / 64 >= 13 && y / 64 <= 14 && who.ActiveObject.canBeShipped() && Vector2.Distance(who.getTileLocation(), new Vector2(71.5f, 14f)) <= 2f)
            {
                //Console.WriteLine("Farm.leftClick");
                MainBinListener.OnShipItem(who.ActiveObject, who);
            }

            return(true);
        }
Ejemplo n.º 3
0
        public static bool Prefix(Item i, Farmer who)
        {
            //Console.WriteLine($"Farm.shipItem(item, farmer) called. item_null={i == null}, who_null={who == null}");

            if (i != null && who != null)
            {
                MainBinListener.OnShipItem(i, who);
            }

            return(true);
        }
Ejemplo n.º 4
0
 private static void OnRemove(Item item)
 {
     MainBinListener.OnRemoveItem(item);
 }
Ejemplo n.º 5
0
 private static void OnAdd(Item item)
 {
     MainBinListener.OnShipItem(item, Game1.player);
 }