diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp index 07a9be2ae..a4ebbea5b 100644 --- a/library/LuaApi.cpp +++ b/library/LuaApi.cpp @@ -1314,7 +1314,7 @@ static const LuaWrapper::FunctionReg dfhack_maps_module[] = { WRAPM(Maps, enableBlockUpdates), WRAPM(Maps, getGlobalInitFeature), WRAPM(Maps, getLocalInitFeature), - WRAPM(Maps, canPathBetween), + WRAPM(Maps, canWalkBetween), WRAPM(Maps, spawnFlow), WRAPN(hasTileAssignment, hasTileAssignment), WRAPN(getTileAssignment, getTileAssignment), diff --git a/library/include/modules/Maps.h b/library/include/modules/Maps.h index 33344b1a5..ed0a7bf6a 100644 --- a/library/include/modules/Maps.h +++ b/library/include/modules/Maps.h @@ -307,7 +307,7 @@ extern DFHACK_EXPORT bool SortBlockEvents(df::map_block *block, /// remove a block event from the block by address extern DFHACK_EXPORT bool RemoveBlockEvent(uint32_t x, uint32_t y, uint32_t z, df::block_square_event * which ); -DFHACK_EXPORT bool canPathBetween(df::coord pos1, df::coord pos2); +DFHACK_EXPORT bool canWalkBetween(df::coord pos1, df::coord pos2); DFHACK_EXPORT bool canStepBetween(df::coord pos1, df::coord pos2); } } diff --git a/library/modules/Maps.cpp b/library/modules/Maps.cpp index 5de2409c8..43b76904a 100644 --- a/library/modules/Maps.cpp +++ b/library/modules/Maps.cpp @@ -525,7 +525,7 @@ bool Maps::ReadGeology(vector > *layer_mats, vector return true; } -bool Maps::canPathBetween(df::coord pos1, df::coord pos2) +bool Maps::canWalkBetween(df::coord pos1, df::coord pos2) { auto block1 = getTileBlock(pos1); auto block2 = getTileBlock(pos2); diff --git a/plugins/devel/stepBetween.cpp b/plugins/devel/stepBetween.cpp index c1bc3fa1a..32d5be31b 100644 --- a/plugins/devel/stepBetween.cpp +++ b/plugins/devel/stepBetween.cpp @@ -80,7 +80,7 @@ df::coord prev; command_result stepBetween (color_ostream &out, std::vector & parameters) { df::coord bob = Gui::getCursorPos(); - out.print("(%d,%d,%d), (%d,%d,%d): canWalkBetween = %d, canPathBetween = %d\n", prev.x, prev.y, prev.z, bob.x, bob.y, bob.z, Maps::canStepBetween(prev, bob), Maps::canPathBetween(prev,bob)); + out.print("(%d,%d,%d), (%d,%d,%d): canStepBetween = %d, canWalkBetween = %d\n", prev.x, prev.y, prev.z, bob.x, bob.y, bob.z, Maps::canStepBetween(prev, bob), Maps::canWalkBetween(prev,bob)); prev = bob; return CR_OK; diff --git a/plugins/fix-armory.cpp b/plugins/fix-armory.cpp index 0a8872418..5a4821b4b 100644 --- a/plugins/fix-armory.cpp +++ b/plugins/fix-armory.cpp @@ -477,7 +477,7 @@ static bool try_store_item(df::building *target, df::item *item) df::coord tpos(target->centerx, target->centery, target->z); df::coord ipos = Items::getPosition(item); - if (!Maps::canPathBetween(tpos, ipos)) + if (!Maps::canWalkBetween(tpos, ipos)) return false; // Check if the target has enough space left