diff options
author | sfan5 <sfan5@live.de> | 2021-09-09 16:51:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-09 16:51:35 +0200 |
commit | bbfae0cc673d3abdc21224c53e09b209ee4688a2 (patch) | |
tree | e1afb8f64570b212d3db53a975b59fff5af67ad8 /builtin/game/misc.lua | |
parent | bcb65654836caffa670a611ff7c79b0705a40c3c (diff) | |
download | minetest-bbfae0cc673d3abdc21224c53e09b209ee4688a2.tar.gz minetest-bbfae0cc673d3abdc21224c53e09b209ee4688a2.tar.bz2 minetest-bbfae0cc673d3abdc21224c53e09b209ee4688a2.zip |
Dynamic_Add_Media v2 (#11550)
Diffstat (limited to 'builtin/game/misc.lua')
-rw-r--r-- | builtin/game/misc.lua | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/builtin/game/misc.lua b/builtin/game/misc.lua index aac6c2d18..63d64817c 100644 --- a/builtin/game/misc.lua +++ b/builtin/game/misc.lua @@ -269,27 +269,8 @@ function core.cancel_shutdown_requests() end --- Callback handling for dynamic_add_media - -local dynamic_add_media_raw = core.dynamic_add_media_raw -core.dynamic_add_media_raw = nil -function core.dynamic_add_media(filepath, callback) - local ret = dynamic_add_media_raw(filepath) - if ret == false then - return ret - end - if callback == nil then - core.log("deprecated", "Calling minetest.dynamic_add_media without ".. - "a callback is deprecated and will stop working in future versions.") - else - -- At the moment async loading is not actually implemented, so we - -- immediately call the callback ourselves - for _, name in ipairs(ret) do - callback(name) - end - end - return true -end +-- Used for callback handling with dynamic_add_media +core.dynamic_media_callbacks = {} -- PNG encoder safety wrapper |