1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-01 07:30:23 +02:00

Allow specifying name for dynamic media files

This commit is contained in:
sfan5
2024-01-22 21:24:42 +01:00
parent af69d4f7a9
commit c90ebad46b
5 changed files with 15 additions and 9 deletions

View File

@ -159,14 +159,17 @@ end
local textures_path = core.get_worldpath() .. "/"
core.safe_file_write(
textures_path .. "testnodes_generated_mb.png",
textures_path .. "testnodes1.png",
encode_and_check(512, 512, "rgb", data_mb)
)
core.safe_file_write(
textures_path .. "testnodes_generated_ck.png",
encode_and_check(512, 512, "gray", data_ck)
)
core.dynamic_add_media(textures_path .. "testnodes_generated_mb.png")
core.dynamic_add_media({
filename = "testnodes_generated_mb.png",
filepath = textures_path .. "testnodes1.png"
})
core.dynamic_add_media(textures_path .. "testnodes_generated_ck.png")
minetest.register_node("testnodes:generated_png_mb", {