mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
atlas animation moved to textures/ATLAS/animation
This commit is contained in:
parent
0af780c5e4
commit
4af0a8acf7
2 changed files with 112 additions and 101 deletions
|
|
@ -226,22 +226,21 @@ static bool setattr(lua_State* L, Menu* menu, const std::string& attr) {
|
|||
if (menu == nullptr)
|
||||
return false;
|
||||
if (attr == "page") {
|
||||
auto page = lua_tostring(L, 4);
|
||||
menu->setPage(page);
|
||||
menu->setPage(lua_tostring(L, 4));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool setattr(lua_State* L, InventoryView* inventory, const std::string& attr) {
|
||||
if (inventory == nullptr)
|
||||
static bool setattr(lua_State* L, InventoryView* view, const std::string& attr) {
|
||||
if (view == nullptr)
|
||||
return false;
|
||||
if (attr == "inventory") {
|
||||
auto inv = scripting::level->inventories->get(lua_tointeger(L, 4));
|
||||
if (inv == nullptr) {
|
||||
inventory->unbind();
|
||||
auto inventory = scripting::level->inventories->get(lua_tointeger(L, 4));
|
||||
if (inventory == nullptr) {
|
||||
view->unbind();
|
||||
} else {
|
||||
inventory->bind(inv, scripting::content);
|
||||
view->bind(inventory, scripting::content);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue