Exemplo n.º 1
0
 private static void TP(string[] args)
 {
     if (Game1.currentLocation is null || Game1.player is null)
     {
         print("\nGame not loaded, cannot warp!\n");
         return;
     }
     if (args.Length == 0)
     {
         print("\nMust specify warp network location\n");
         return;
     }
     WarpHandler.DirectWarp(args[0], true);
 }
Exemplo n.º 2
0
        private static bool UseItem(Farmer who, string id)
        {
            Dictionary <string, WarpItem> items = Utils.GetWarpItems();

            if (items.ContainsKey(id))
            {
                WarpItem item = items[id];
                if (item.Destination.ToLower() == "_all")
                {
                    WarpHandler.ShowWarpMenu("", item.Consume);
                    return(true);
                }
                Color color = Utils.ParseColor(item.Color);
                DoTotemWarpEffects(color, id, item.Consume, who, (f) => WarpHandler.DirectWarp(item.Destination, item.IgnoreDisabled));
                return(true);
            }
            return(false);
        }