aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/lua_api/l_client.cpp')
-rw-r--r--src/script/lua_api/l_client.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/script/lua_api/l_client.cpp b/src/script/lua_api/l_client.cpp
index 87cfa00fe..09b832ccf 100644
--- a/src/script/lua_api/l_client.cpp
+++ b/src/script/lua_api/l_client.cpp
@@ -269,7 +269,7 @@ int ModApiClient::l_get_item_def(lua_State *L)
IItemDefManager *idef = gdef->idef();
assert(idef);
-
+
if (!lua_isstring(L, 1))
return 0;
@@ -277,10 +277,10 @@ int ModApiClient::l_get_item_def(lua_State *L)
if (!idef->isKnown(name))
return 0;
const ItemDefinition &def = idef->get(name);
-
- push_item_definition_full(L, def);
- return 1;
+ push_item_definition_full(L, def);
+
+ return 1;
}
// get_node_def(nodename)
@@ -288,20 +288,20 @@ int ModApiClient::l_get_node_def(lua_State *L)
{
IGameDef *gdef = getGameDef(L);
assert(gdef);
-
+
INodeDefManager *ndef = gdef->ndef();
assert(ndef);
-
+
if (!lua_isstring(L, 1))
return 0;
-
+
const std::string &name = lua_tostring(L, 1);
const ContentFeatures &cf = ndef->get(ndef->getId(name));
if (cf.name != name) // Unknown node. | name = <whatever>, cf.name = ignore
return 0;
-
+
push_content_features(L, cf);
-
+
return 1;
}