Skip to content

Commit

Permalink
Rename findPenPitAtCoord
Browse files Browse the repository at this point in the history
  • Loading branch information
cdombroski committed Jan 29, 2015
1 parent 4e5325b commit f2eec31
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion NEWS
Expand Up @@ -29,7 +29,7 @@ DFHack Future
isPenPasture
isPitPond
isActive
findPenPitAtCoord
findPenPitAt
Fixes
New Plugins
New Scripts
Expand Down
6 changes: 3 additions & 3 deletions library/LuaApi.cpp
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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 }
};

Expand Down
2 changes: 1 addition & 1 deletion library/include/modules/Buildings.h
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion library/modules/Buildings.cpp
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion plugins/zone.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit f2eec31

Please sign in to comment.