1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

isReachable to locatable

Discussion in 'Client & Site Suggestions' started by Zasz, Jul 29, 2015.

  1. Zasz

    Joined:
    Jun 20, 2015
    Messages:
    183
    Likes Received:
    52
    Just a nice feature so the need to call the .getPosition().isReachable is not needed when if its locatable, you can find if its isReachable anyway.

    @Cloud
     
  2. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    The reasoning it's not there is because most gameobjects aren't reachable in the sense that you can't step on them. When that happens you can use Area.getSurroundingCoordinates and then check if any of those are in a List of the reachable coordinates.
     
  3. Zasz

    Joined:
    Jun 20, 2015
    Messages:
    183
    Likes Received:
    52
    Ah, we should change it to .isStepable then lol, I thought reachable would mean you can reach out to grab it/reach it, but I see the instances where it doesn't make sense that way as well. So its fine
     
    #3 Zasz, Jul 29, 2015
    Last edited: Jul 29, 2015
  4. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    Well in that sense, to touch a coordinate you must be standing on it, hence it's current location and naming :p
     
  5. Zasz

    Joined:
    Jun 20, 2015
    Messages:
    183
    Likes Received:
    52
    Items on tables (only thing I know works for sure from a standard isReachable call). We can not stand on tables.

    You can touch items on tables. Which is reachable.
     
  6. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,198
    Likes Received:
    1,041
    Why not just add to Locatable:
    isReachable() -> can stand on the Locatable's position
    isSurroundingsReachable() -> can stand on surrounding coordinates. (getArea().getSurroundingCoordinates().stream().anyMatch(Coordinate::isReachable))
     
    Fabreze likes this.

Share This Page

Loading...