mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add assets.parse_animation
This commit is contained in:
parent
41713e89a4
commit
86d2e6a614
5 changed files with 28 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue