atlas animation moved to textures/ATLAS/animation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user