add assets.parse_animation

This commit is contained in:
MihailRis 2026-09-08 19:38:25 +03:00
parent 41713e89a4
commit 86d2e6a614
5 changed files with 28 additions and 6 deletions

View file

@ -844,13 +844,19 @@ void scripting::load_layout_script(
void scripting::load_vca_animation(
const io::path& file,
const std::string_view* content,
const std::string& identifier
) {
auto L = lua::get_main_state();
if (lua::get_from_registry(L, lua::INTERNALS_TABLE, "load_vca_animation", true)) {
lua::pushlstring(L, file.string());
if (content) {
lua::pushlstring(L, *content);
} else {
lua::pushnil(L);
}
lua::pushlstring(L, identifier);
if (lua::call(L, 2, 0)) {
if (lua::call(L, 3, 0)) {
lua::pop(L);
}
lua::pop(L);