mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Fix LINT broken by dfa0c15ce045705f05487d623dc7beca6c945b4b
This commit is contained in:
parent
dfa0c15ce0
commit
de840fe271
@ -269,7 +269,7 @@ int ModApiClient::l_get_item_def(lua_State *L)
|
|||||||
|
|
||||||
IItemDefManager *idef = gdef->idef();
|
IItemDefManager *idef = gdef->idef();
|
||||||
assert(idef);
|
assert(idef);
|
||||||
|
|
||||||
if (!lua_isstring(L, 1))
|
if (!lua_isstring(L, 1))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -277,10 +277,10 @@ int ModApiClient::l_get_item_def(lua_State *L)
|
|||||||
if (!idef->isKnown(name))
|
if (!idef->isKnown(name))
|
||||||
return 0;
|
return 0;
|
||||||
const ItemDefinition &def = idef->get(name);
|
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)
|
// get_node_def(nodename)
|
||||||
@ -288,20 +288,20 @@ int ModApiClient::l_get_node_def(lua_State *L)
|
|||||||
{
|
{
|
||||||
IGameDef *gdef = getGameDef(L);
|
IGameDef *gdef = getGameDef(L);
|
||||||
assert(gdef);
|
assert(gdef);
|
||||||
|
|
||||||
INodeDefManager *ndef = gdef->ndef();
|
INodeDefManager *ndef = gdef->ndef();
|
||||||
assert(ndef);
|
assert(ndef);
|
||||||
|
|
||||||
if (!lua_isstring(L, 1))
|
if (!lua_isstring(L, 1))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
const std::string &name = lua_tostring(L, 1);
|
const std::string &name = lua_tostring(L, 1);
|
||||||
const ContentFeatures &cf = ndef->get(ndef->getId(name));
|
const ContentFeatures &cf = ndef->get(ndef->getId(name));
|
||||||
if (cf.name != name) // Unknown node. | name = <whatever>, cf.name = ignore
|
if (cf.name != name) // Unknown node. | name = <whatever>, cf.name = ignore
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
push_content_features(L, cf);
|
push_content_features(L, cf);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,10 +76,10 @@ private:
|
|||||||
|
|
||||||
// get_server_info()
|
// get_server_info()
|
||||||
static int l_get_server_info(lua_State *L);
|
static int l_get_server_info(lua_State *L);
|
||||||
|
|
||||||
// get_item_def(itemstring)
|
// get_item_def(itemstring)
|
||||||
static int l_get_item_def(lua_State *L);
|
static int l_get_item_def(lua_State *L);
|
||||||
|
|
||||||
// get_node_def(nodename)
|
// get_node_def(nodename)
|
||||||
static int l_get_node_def(lua_State *L);
|
static int l_get_node_def(lua_State *L);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user