Update onTryMoveInto.js

This commit is contained in:
slweeb 2023-08-01 21:45:34 -04:00
parent 7256aab393
commit 204d5a093b
1 changed files with 2 additions and 1 deletions

View File

@ -28,7 +28,8 @@ elements.on_try_move_into_test = {
related: ["debug", "ash"],
}
function tryMove(pixel,nx,ny,leaveBehind=undefined) {
function tryMove(pixel,nx,ny,leaveBehind,force) {
if (pixel.drag && !force) { return true; }
var info = elements[pixel.element];
var oob = outOfBounds(nx,ny);
if (isEmpty(nx,ny,false,oob)) { // If coords is empty, move to coords