Compare commits

..

No commits in common. "f50e388c398d404396d8b997e93b80015b7b6436" and "1b21fcb0963de6968831739ed5c2248325a1c49c" have entirely different histories.

2 changed files with 4 additions and 4 deletions

View File

@ -62,7 +62,7 @@ reloadplugin = (event, filename, pluginpath) => {
console.info(event, filename) console.info(event, filename)
pluginpath = (pluginpath ? pluginpath : './plugins/') + filename pluginpath = (pluginpath ? pluginpath : './plugins/') + filename
const check = Object.keys(cfg.plugins) const check = Object.keys(cfg.plugins)
console.info(`reload file: ./lib/${pluginpath}`) console.info(`reload file:`, pluginpath)
const plugin = require.resolve(pluginpath) const plugin = require.resolve(pluginpath)
if (plugin && require.cache[plugin]) { if (plugin && require.cache[plugin]) {
// console.debug(Object.keys(cfg.plugins)) // console.debug(Object.keys(cfg.plugins))

View File

@ -23,7 +23,7 @@ function initMoves(bot = bot, mcData = bot.mcData) {
movements.push(normalMove) movements.push(normalMove)
movements.defaultMove = movements[0] movements.defaultMove = movements[0]
bot.pathfinder.setMovements(normalMove) bot.pathfinder.setMovements(defaultMove)
} }
@ -167,8 +167,8 @@ function moveOrRide(turn = false, reverse = -1, directionLabel, message_parts2)
// bot.once("attach", state = "vehiccel") // bot.once("attach", state = "vehiccel")
if (bot.vehicle) { if (bot.vehicle) {
// FIXME moveVehicle should be +-1 or 0? // FIXME moveVehicle should be +-1 or 0?
const amount = parseInt(message_parts2[0]) * -reverse const amount = Math.sign(parseInt(message_parts2[0]) || -reverse)
bot.moveVehicle(turn && Math.sign(amount) || 0, !turn && amount || 0) bot.moveVehicle(turn && amount || 0, !turn && amount || 0)
} else { } else {
command([directionLabel].concat(message_parts2)) command([directionLabel].concat(message_parts2))
} }