atlas animation moved to textures/ATLAS/animation

This commit is contained in:
MihailRis
2024-04-30 00:20:24 +03:00
parent 0af780c5e4
commit 4af0a8acf7
2 changed files with 112 additions and 101 deletions
+7 -8
View File
@@ -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;
}