This PR allows disabling diagonal directions via a diagonalDirections property in ranvier.json. The Room#getExits function is the only method in core that references diagonal directions.
I added a Room#checkDiagonalDirections method that allows you to check if diagonal are supported from within anywhere else in state. You can override ranvier.json on a per-Room basis by adding a diagonalDirections property to a Room's metadata.
Please note that bundles implementing CommandParser, commands like look, and any listener in player-events for move may have their own uses of diagonals. Those references to diagonals are isolated to bundles and not a part of core. However, you can use the new Room#checkDiagonalDirections to consistently control the use of diagonal directions in your game.
As well, this PR allows you to fully ignore diagonal directions in core if you so wish.
By default, not including a diagonalDirections property in ranvier.json or a Room's metadata will result in diagonals being enabled. This is the current default setting in Ranvier when using a coordinate system.
This PR allows disabling diagonal directions via a
diagonalDirections
property inranvier.json
. TheRoom#getExits
function is the only method incore
that references diagonal directions.I added a
Room#checkDiagonalDirections
method that allows you to check if diagonal are supported from within anywhere else in state. You can overrideranvier.json
on a per-Room basis by adding adiagonalDirections
property to a Room'smetadata
.Please note that bundles implementing
CommandParser
, commands likelook
, and any listener inplayer-events
formove
may have their own uses of diagonals. Those references to diagonals are isolated to bundles and not a part ofcore
. However, you can use the newRoom#checkDiagonalDirections
to consistently control the use of diagonal directions in your game.As well, this PR allows you to fully ignore diagonal directions in
core
if you so wish.By default, not including a
diagonalDirections
property inranvier.json
or a Room'smetadata
will result in diagonals being enabled. This is the current default setting in Ranvier when using a coordinate system.