Ensure all lua functions accepts the browser id as the first argument (except when there is a target id as well)

This commit is contained in:
sylvass
2022-02-10 07:01:18 -05:00
parent 51496956fc
commit 07c17be12c

View File

@@ -608,9 +608,9 @@ int place3dSkyBrowser(lua_State* L) {
int removeSelectedImageInBrowser(lua_State* L) {
ghoul::lua::checkArgumentsAndThrow(L, 2, "lua::removeSelectedImageInBrowser");
const std::string id = ghoul::lua::value<std::string>(L, 1);
// Image index
const int i = ghoul::lua::value<int>(L, 1);
const std::string id = ghoul::lua::value<std::string>(L, 1);
// Get browser
SkyBrowserModule* module = global::moduleEngine->module<SkyBrowserModule>();
const ImageData& image = module->getWwtDataHandler()->getImage(i);