mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
add 'emission' argument to gfx.blockwraps.wrap
This commit is contained in:
parent
dfdc7ebf6b
commit
4d950c974e
3 changed files with 13 additions and 6 deletions
|
|
@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue