obj
/*
astar_density is used in the A* algorithm
to determine if the object should be considered
dense or not.
By default, all dense objects will be considered
dense for A*, but can be over-ridden by setting
astar_density to 0.
Likewise, non-dense objects can be considered
dense in A* by setting astar_density to 1, while
they're still technically non-dense for all other
intents and purposes.
*/
var astar_density = null
New()
..()
if(astar_density == null)
astar_density = density
Path
add(turf/t)
for(var/obj/o in t)
if(o.astar_density)
return
..()
Would it be possible to have this included in a release of the library, in whatever better way you will undoubtedly come up with?
Previously mobs could walk through each other by default so this wasn't an issue. You could use can_bump() but then you get into other issues. If path planning is tile-based, pixel-based obstacles complicate that. I think having a separate variable to determine if the object blocks the entire tile is fine. I don't know if I'll call it astar_density, but this approach looks good.