forked from your-land/yl_cinema
20 lines
637 B
Lua
20 lines
637 B
Lua
|
|
local function load_images(movies)
|
|
for movie_id, _ in pairs(movies) do
|
|
local loaded_count, total_count = yl_cinema.load_images_of_movie(movie_id)
|
|
if loaded_count ~= total_count then
|
|
yl_cinema.warn(loaded_count .. "/" .. total_count .. " images loaded for movie " .. movie_id)
|
|
else
|
|
yl_cinema.action(loaded_count .. "/" .. total_count .. " images loaded for movie " .. movie_id)
|
|
end
|
|
end
|
|
end
|
|
|
|
local function run_each_serverstart()
|
|
local movies = yl_cinema.load_movies()
|
|
minetest.after(0, load_images, movies)
|
|
yl_cinema.movies = movies
|
|
end
|
|
|
|
run_each_serverstart()
|