add 'emission' argument to gfx.blockwraps.wrap

This commit is contained in:
MihailRis 2025-12-21 00:28:41 +03:00
parent dfdc7ebf6b
commit 4d950c974e
3 changed files with 13 additions and 6 deletions

View file

@ -9,9 +9,10 @@ using namespace scripting;
static int l_wrap(lua::State* L) {
auto position = lua::tovec3(L, 1);
std::string texture = lua::require_string(L, 2);
float emission = lua::isnumber(L, 3) ? lua::tonumber(L, 3) : 1.0f;
return lua::pushinteger(
L, renderer->blockWraps->add(position, std::move(texture))
L, renderer->blockWraps->add(position, std::move(texture), emission)
);
}