ID:2223521
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
Instead of dense non-dense states, there could be more states for pathfinding to use.

Some objects might be dense for some mobs and non dense for other mobs this could be achieved by setting the obj density to 2 so anything below 2 could cross it.

I believe it must be pretty simple I haven't seen the source code though so feel free to correct me.


I don't know how pathfinding works in byond but this is how I would implement this:
atom/isDense(var/movable/m)
if(m.density<src.density)return 0
else return 1

that would solve many problems, I mean just changing Cross does not affect Walk procs. This allows the player to customize their path-finding without losing the default 0-1 density.
In response to Victorqr
Victorqr wrote:
I don't know how pathfinding works in byond but this is how I would implement this:
> atom/isDense(var/movable/m)
> if(m.density<src.density)return 0
> else return 1
>

that would solve many problems, I mean just changing Cross does not affect Walk procs. This allows the player to customize their path-finding without losing the default 0-1 density.

Walk procs would ignore this anyway. If an object is dense, a Walk proc will avoid it, point blank, and will not be able to cross into its turf.
More control over the pathfinding would be neato.
Density has a lot of stuff going on with it making behavior you may not want hard to avoid. Such as being the decider on whether or not Bump() gets called on that object, and whether pathfinding works around the tile it is on.
Yeah that's why I think it should be there so there is more customization over path-finding. Lets say we have a terrain which is impassable to certain units and passable to some with 2 density values this cant work, I mean the path-finding. Or maybe a unit has a special access card allowing access through doors, pathfinding should be aware of that, because if you just change Cross() the mob will just get stuck on an obstacle not foreseen by the pathfinding.