forked from Mineclonia/Mineclonia
Update existing occurences of use_texture_alpha to the Minetest 5.4 convention if the feature is detected
This commit is contained in:
parent
eddef41e6b
commit
bec5339fc6
|
@ -3,11 +3,13 @@ local S = minetest.get_translator("mcl_core")
|
||||||
-- Simple solid cubic nodes, most of them are the ground materials and simple building blocks
|
-- Simple solid cubic nodes, most of them are the ground materials and simple building blocks
|
||||||
|
|
||||||
local translucent_ice = minetest.settings:get_bool("mcl_translucent_ice", false)
|
local translucent_ice = minetest.settings:get_bool("mcl_translucent_ice", false)
|
||||||
local ice_drawtype
|
local ice_drawtype, ice_texture_alpha
|
||||||
if translucent_ice then
|
if translucent_ice then
|
||||||
ice_drawtype = "glasslike"
|
ice_drawtype = "glasslike"
|
||||||
|
ice_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true
|
||||||
else
|
else
|
||||||
ice_drawtype = "normal"
|
ice_drawtype = "normal"
|
||||||
|
ice_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_core.fortune_drop_ore = {
|
mcl_core.fortune_drop_ore = {
|
||||||
|
@ -820,7 +822,7 @@ minetest.register_node("mcl_core:ice", {
|
||||||
tiles = {"default_ice.png"},
|
tiles = {"default_ice.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
use_texture_alpha = translucent_ice,
|
use_texture_alpha = ice_texture_alpha,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {handy=1,pickaxey=1, slippery=3, building_block=1, ice=1},
|
groups = {handy=1,pickaxey=1, slippery=3, building_block=1, ice=1},
|
||||||
drop = "",
|
drop = "",
|
||||||
|
@ -886,7 +888,7 @@ for i=0,3 do
|
||||||
tiles = {"mcl_core_frosted_ice_"..i..".png"},
|
tiles = {"mcl_core_frosted_ice_"..i..".png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
use_texture_alpha = translucent_ice,
|
use_texture_alpha = ice_texture_alpha,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {handy=1, frosted_ice=1, slippery=3, not_in_creative_inventory=1, ice=1},
|
groups = {handy=1, frosted_ice=1, slippery=3, not_in_creative_inventory=1, ice=1},
|
||||||
drop = "",
|
drop = "",
|
||||||
|
|
|
@ -44,7 +44,7 @@ function mcl_core.add_stained_glass(desc, recipeitem, colorgroup, color)
|
||||||
tiles = {"mcl_core_glass_"..color..".png"},
|
tiles = {"mcl_core_glass_"..color..".png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
-- TODO: Add color to groups
|
-- TODO: Add color to groups
|
||||||
groups = {handy=1, glass=1, building_block=1, material_glass=1},
|
groups = {handy=1, glass=1, building_block=1, material_glass=1},
|
||||||
|
|
|
@ -40,7 +40,7 @@ minetest.register_node("mcl_core:slimeblock", {
|
||||||
},
|
},
|
||||||
tiles = {"mcl_core_slime.png"},
|
tiles = {"mcl_core_slime.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
-- According to Minecraft Wiki, bouncing off a slime block from a height off 255 blocks should result in a bounce height of 50 blocks
|
-- According to Minecraft Wiki, bouncing off a slime block from a height off 255 blocks should result in a bounce height of 50 blocks
|
||||||
-- bouncy=44 makes the player bounce up to 49.6. This value was chosen by experiment.
|
-- bouncy=44 makes the player bounce up to 49.6. This value was chosen by experiment.
|
||||||
|
|
|
@ -66,7 +66,7 @@ minetest.register_node("mcl_portals:portal_end", {
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
pointable = false,
|
pointable = false,
|
||||||
|
|
|
@ -131,7 +131,7 @@ minetest.register_node("mcl_portals:portal", {
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
pointable = false,
|
pointable = false,
|
||||||
|
|
|
@ -194,7 +194,7 @@ local pane = function(description, node, append)
|
||||||
_doc_items_entry_name = entry_name,
|
_doc_items_entry_name = entry_name,
|
||||||
_doc_items_longdesc = longdesc,
|
_doc_items_longdesc = longdesc,
|
||||||
textures = {texture1, texture1, "xpanes_top_glass"..append..".png"},
|
textures = {texture1, texture1, "xpanes_top_glass"..append..".png"},
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true,
|
||||||
inventory_image = texture1,
|
inventory_image = texture1,
|
||||||
wield_image = texture1,
|
wield_image = texture1,
|
||||||
sounds = mcl_sounds.node_sound_glass_defaults(),
|
sounds = mcl_sounds.node_sound_glass_defaults(),
|
||||||
|
|
Loading…
Reference in New Issue