Update usages of alpha to the 5.4 convention
This commit is contained in:
parent
bec5339fc6
commit
82e113f0fc
|
@ -7,6 +7,11 @@ local WATER_ALPHA = 179
|
||||||
local WATER_VISC = 1
|
local WATER_VISC = 1
|
||||||
local LAVA_VISC = 7
|
local LAVA_VISC = 7
|
||||||
local LIGHT_LAVA = minetest.LIGHT_MAX
|
local LIGHT_LAVA = minetest.LIGHT_MAX
|
||||||
|
local USE_TEXTURE_ALPHA
|
||||||
|
if minetest.features.use_texture_alpha_string_modes then
|
||||||
|
USE_TEXTURE_ALPHA = "blend"
|
||||||
|
WATER_ALPHA = nil
|
||||||
|
end
|
||||||
|
|
||||||
local lava_death_messages = {
|
local lava_death_messages = {
|
||||||
N("@1 melted in lava."),
|
N("@1 melted in lava."),
|
||||||
|
@ -36,6 +41,7 @@ minetest.register_node("mcl_core:water_flowing", {
|
||||||
sounds = mcl_sounds.node_sound_water_defaults(),
|
sounds = mcl_sounds.node_sound_water_defaults(),
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
alpha = WATER_ALPHA,
|
alpha = WATER_ALPHA,
|
||||||
|
use_texture_alpha = USE_TEXTURE_ALPHA,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "flowingliquid",
|
paramtype2 = "flowingliquid",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -81,6 +87,7 @@ S("• When water is directly below lava, the water turns into stone."),
|
||||||
sounds = mcl_sounds.node_sound_water_defaults(),
|
sounds = mcl_sounds.node_sound_water_defaults(),
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
alpha = WATER_ALPHA,
|
alpha = WATER_ALPHA,
|
||||||
|
use_texture_alpha = USE_TEXTURE_ALPHA,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
pointable = false,
|
pointable = false,
|
||||||
|
|
|
@ -4,6 +4,11 @@ local S = minetest.get_translator("mcl_portals")
|
||||||
local SPAWN_MIN = mcl_vars.mg_end_min+70
|
local SPAWN_MIN = mcl_vars.mg_end_min+70
|
||||||
local SPAWN_MAX = mcl_vars.mg_end_min+98
|
local SPAWN_MAX = mcl_vars.mg_end_min+98
|
||||||
|
|
||||||
|
local PORTAL_ALPHA = 192
|
||||||
|
if minetest.features.use_texture_alpha_string_modes then
|
||||||
|
PORTAL_ALPHA = nil
|
||||||
|
end
|
||||||
|
|
||||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||||
|
|
||||||
local destroy_portal = function(pos)
|
local destroy_portal = function(pos)
|
||||||
|
@ -76,7 +81,7 @@ minetest.register_node("mcl_portals:portal_end", {
|
||||||
-- This is 15 in MC.
|
-- This is 15 in MC.
|
||||||
light_source = 14,
|
light_source = 14,
|
||||||
post_effect_color = {a = 192, r = 0, g = 0, b = 0},
|
post_effect_color = {a = 192, r = 0, g = 0, b = 0},
|
||||||
alpha = 192,
|
alpha = PORTAL_ALPHA,
|
||||||
after_destruct = destroy_portal,
|
after_destruct = destroy_portal,
|
||||||
-- This prevents “falling through”
|
-- This prevents “falling through”
|
||||||
collision_box = {
|
collision_box = {
|
||||||
|
|
|
@ -24,6 +24,11 @@ local DESTINATION_EXPIRES = 60 * 1000000 -- cached destination expires after thi
|
||||||
local PORTAL_SEARCH_HALF_CHUNK = 40 -- greater values may slow down the teleportation
|
local PORTAL_SEARCH_HALF_CHUNK = 40 -- greater values may slow down the teleportation
|
||||||
local PORTAL_SEARCH_ALTITUDE = 128
|
local PORTAL_SEARCH_ALTITUDE = 128
|
||||||
|
|
||||||
|
local PORTAL_ALPHA = 192
|
||||||
|
if minetest.features.use_texture_alpha_string_modes then
|
||||||
|
PORTAL_ALPHA = nil
|
||||||
|
end
|
||||||
|
|
||||||
-- Table of objects (including players) which recently teleported by a
|
-- Table of objects (including players) which recently teleported by a
|
||||||
-- Nether portal. Those objects have a brief cooloff period before they
|
-- Nether portal. Those objects have a brief cooloff period before they
|
||||||
-- can teleport again. This prevents annoying back-and-forth teleportation.
|
-- can teleport again. This prevents annoying back-and-forth teleportation.
|
||||||
|
@ -140,7 +145,7 @@ minetest.register_node("mcl_portals:portal", {
|
||||||
drop = "",
|
drop = "",
|
||||||
light_source = 11,
|
light_source = 11,
|
||||||
post_effect_color = {a = 180, r = 51, g = 7, b = 89},
|
post_effect_color = {a = 180, r = 51, g = 7, b = 89},
|
||||||
alpha = 192,
|
alpha = PORTAL_ALPHA,
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user