Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

isReachable to locatable

Joined
Jun 20, 2015
Messages
183
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
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
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.
 
Joined
Jun 20, 2015
Messages
183
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
 
Last edited:
Engineer
Joined
Jul 28, 2013
Messages
2,776
Well in that sense, to touch a coordinate you must be standing on it, hence it's current location and naming :p
 
Joined
Jun 20, 2015
Messages
183
Well in that sense, to touch a coordinate you must be standing on it, hence it's current location and naming :p

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.
 
Joined
Dec 10, 2014
Messages
3,255
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))
 
Top