Rename findPenPitAtCoord

develop
Chris Dombroski 2015-01-29 15:02:54 -05:00
parent 4e5325ba62
commit f2eec3198c
5 changed files with 7 additions and 7 deletions

@ -29,7 +29,7 @@ DFHack Future
isPenPasture
isPitPond
isActive
findPenPitAtCoord
findPenPitAt
Fixes
New Plugins
New Scripts

@ -1726,10 +1726,10 @@ static int buildings_findCivzonesAt(lua_State *L)
return 1;
}
static int buildings_findPenPitAtCoord(lua_State *L)
static int buildings_findPenPitAt(lua_State *L)
{
auto pos = CheckCoordXYZ(L, 1, true);
Lua::PushDFObject(L, Buildings::findPenPitAtCoord(pos));
Lua::PushDFObject(L, Buildings::findPenPitAt(pos));
return 1;
}
@ -1792,7 +1792,7 @@ static const luaL_Reg dfhack_buildings_funcs[] = {
{ "getCorrectSize", buildings_getCorrectSize },
{ "setSize", &Lua::CallWithCatchWrapper<buildings_setSize> },
{ "getStockpileContents", buildings_getStockpileContents},
{ "findPenPitAt", buildings_findPenPitAtCoord},
{ "findPenPitAt", buildings_findPenPitAt},
{ NULL, NULL }
};

@ -296,6 +296,6 @@ DFHACK_EXPORT bool isPenPasture(df::building_civzonest * building);
DFHACK_EXPORT bool isPitPond(df::building_civzonest * building);
DFHACK_EXPORT bool isActive(df::building_civzonest * building);
DFHACK_EXPORT df::building* findPenPitAtCoord(df::coord coord);
DFHACK_EXPORT df::building* findPenPitAt(df::coord coord);
}
}

@ -1224,7 +1224,7 @@ bool Buildings::isActive(df::building_civzonest* civ)
}
// returns building of pen/pit at cursor position (NULL if nothing found)
df::building* Buildings::findPenPitAtCoord(df::coord coord)
df::building* Buildings::findPenPitAt(df::coord coord)
{
CHECK_NULL_POINTER(coord);
vector<df::building_civzonest*> zones;

@ -1995,7 +1995,7 @@ command_result df_zone (color_ostream &out, vector <string> & parameters)
}
else
{
target_building = findPenPitAtCoord(Gui::getCursorPos());
target_building = findPenPitAt(Gui::getCursorPos());
if(!target_building)
{
out << "No pen/pasture or pit under cursor!" << endl;