mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-27 01:44:31 +02:00
Fix some missing return values
This commit is contained in:
@@ -1401,8 +1401,7 @@ std::string GameController::ElementResolve(int type, int ctype)
|
|||||||
else if (type >= 0 && type < PT_NUM && gameModel->GetSimulation()->elements)
|
else if (type >= 0 && type < PT_NUM && gameModel->GetSimulation()->elements)
|
||||||
return std::string(gameModel->GetSimulation()->elements[type].Name);
|
return std::string(gameModel->GetSimulation()->elements[type].Name);
|
||||||
}
|
}
|
||||||
else
|
return "";
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameController::IsValidElement(int type)
|
bool GameController::IsValidElement(int type)
|
||||||
|
@@ -1999,7 +1999,7 @@ int LuaScriptInterface::elements_loadDefault(lua_State * l)
|
|||||||
luacon_model->BuildMenus();
|
luacon_model->BuildMenus();
|
||||||
luacon_sim->init_can_move();
|
luacon_sim->init_can_move();
|
||||||
std::fill(luacon_ren->graphicscache, luacon_ren->graphicscache+PT_NUM, gcache_item());
|
std::fill(luacon_ren->graphicscache, luacon_ren->graphicscache+PT_NUM, gcache_item());
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LuaScriptInterface::elements_allocate(lua_State * l)
|
int LuaScriptInterface::elements_allocate(lua_State * l)
|
||||||
@@ -2296,6 +2296,7 @@ int LuaScriptInterface::elements_property(lua_State * l)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
return luaL_error(l, "Invalid element property");
|
return luaL_error(l, "Invalid element property");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -190,6 +190,7 @@ AnyType TPTScriptInterface::eval(std::deque<std::string> * words)
|
|||||||
case TypeString:
|
case TypeString:
|
||||||
return StringType(word);
|
return StringType(word);
|
||||||
}
|
}
|
||||||
|
return StringType(word);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string TPTScriptInterface::FormatCommand(std::string command)
|
std::string TPTScriptInterface::FormatCommand(std::string command)
|
||||||
|
Reference in New Issue
Block a user