Fix the use of deprecated functions for Minetest 5.4

* Remove 'use_texture_alpha = true' not needed and deprecated
* Replace 'minetest.get_mapgen_params().mgname' by
  'minetest.get_mapgen_setting("mg_name")'
This commit is contained in:
Sys Quatre 2021-02-26 14:30:20 +01:00
parent 5e8cd73393
commit d4e6b9c3a5

View File

@ -636,7 +636,6 @@ minetest.register_node("moreplants:palmleaves2", {
visual_scale = 2.5, visual_scale = 2.5,
tiles = {"moreplants_palmleaves2.png"}, tiles = {"moreplants_palmleaves2.png"},
inventory_image = "moreplants_palmleaves2.png", inventory_image = "moreplants_palmleaves2.png",
use_texture_alpha = true,
paramtype = "light", paramtype = "light",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
sunlight_propagates = false, sunlight_propagates = false,
@ -656,7 +655,6 @@ minetest.register_node("moreplants:palmleaves1", {
visual_scale = 4.0, visual_scale = 4.0,
tiles = {"moreplants_palmleaves.png"}, tiles = {"moreplants_palmleaves.png"},
inventory_image = "moreplants_palmleaves.png", inventory_image = "moreplants_palmleaves.png",
use_texture_alpha = true,
paramtype = "light", paramtype = "light",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
sunlight_propagates = false, sunlight_propagates = false,
@ -949,7 +947,8 @@ minetest.register_decoration({
-- }) -- })
end end
if minetest.get_mapgen_params().mgname ~= "v6" or minetest.get_mapgen_params().mgname ~= "singlenode" then local mgname = minetest.get_mapgen_setting("mg_name")
if mgname ~= "v6" and mgname ~= "singlenode" then
moreplants.mapgen() moreplants.mapgen()
end end