Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Pather & general ideas for WRobot classes / profiles

  • Version: All
  • Product: WRobot General
  • Type: Suggestion
  • Status: Not Added

I would like to suggest to add a continent name as a new parameter to the class "Grinderzone" it would allow to easier travelling between continents & taking the right path.

At the current state of the Grinder product for example it doesn't check the continent and taking vectors from a different continent. I've also written methods to check whether vector is on continent by Z axis:

        /// <summary>
        /// Load specific tiles to define the pather by the given location.
        /// </summary>
        /// <param name="from">The location.</param>
        /// <param name="maxDistance">The maximum allowed z-distance.</param>
        public Pather GetPatherByLocation(Vector3 from, float maxDistance = float.PositiveInfinity)
        {
            float d = float.PositiveInfinity;
            Pather p = null;
            try
            {
                Pather pc = null;
                Logging.log("Load tiles to define continent...");
                foreach (MainContinents continent in Enum.GetValues(typeof(MainContinents)))
                {
                    pc = GetPather(from, continent);
                    if (Math.Abs(pc.FindZ(from) - from.Z) < d)
                    {
                        p = pc;
                        d = Math.Abs(p.FindZ(from) - from.Z);
                    }
                    pc.Dispose();
                }
                if (d < maxDistance)
                {
                    Logging.log("Pather for " + from + " found\nContinent: " + p.Continent + "\nDeviation: " + d);
                    return p;
                }
            }
            catch (Exception ex)
            {
                Logging.logex("GetPatherByLocation(...):\n" + ex);
            }
            Logging.log("GetPatherByLocation(...) failed to load suitable continent: " + d + " < " + maxDistance + " is invalid.\nSuspected continent: " + p.Continent);
            return GetPather(from, Usefuls.ContinentNameMpq);
        }
              
              
              
              
              
        /// <summary>
        /// Initialize new pather.
        /// </summary>
        /// <param name="loc">Initial location.</param>
        /// <param name="continent">Pather's continent.</param>
        public Pather GetPather(Vector3 loc, MainContinents continent)
        {
            try
            {
                if (loc != Vector3.Empty)
                {
                    float x1;
                    float y1;
                    return new Pather(continent.ToString());
                }
            }
            catch (Exception ex)
            {
                Logging.logex("GetPather(Vector3 loc, MainContinents continent):\nContinent: " + continent + "\nLocation: " + loc + "\nThrow an Exception:\n" + ex);
            }
            Logging.log("GetPather(Vector3 loc, MainContinents continent) failed to load desired continent: " + Usefuls.ContinentNameMpq);
            return new Pather(Usefuls.ContinentNameMpq);
        }

It works so far (i can put a position from a other continent & can get the string from Pather.Continent). But it needs to load the tiles. That's the down-side of it(If there's a better method to define it, let me know please)

i also have written classes to use the returned pather for connections between boats, Zeppelins & portals and have a general algorithm to take the path with the shortest distance with these connections.

But the mentioned method is the only thing left which is a thorn in my eye.

I would like also to suggest to add a continent property to the Vector3 class. So if someone calls this class it will also get the continent & can be saved in profiles

In the end the pather knows exactly where to go on which continent.

 

ps: i can also upload the classes, if you need them but it has a bit work left.

User Feedback

Recommended Comments

Jasabi

Members

sounds very cool

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.