Skip to content

Commit

Permalink
devtest: Fix deprecated alpha usage
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Jan 29, 2021
1 parent 8322992 commit 5c005ad
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 33 deletions.
36 changes: 20 additions & 16 deletions games/devtest/mods/basenodes/init.lua
@@ -1,4 +1,4 @@
local WATER_ALPHA = 160
local WATER_ALPHA = "^[opacity:" .. 160
local WATER_VISC = 1
local LAVA_VISC = 7

Expand Down Expand Up @@ -128,12 +128,12 @@ minetest.register_node("basenodes:water_source", {
"Drowning damage: 1",
drawtype = "liquid",
waving = 3,
tiles = {"default_water.png"},
tiles = {"default_water.png"..WATER_ALPHA},
special_tiles = {
{name = "default_water.png", backface_culling = false},
{name = "default_water.png", backface_culling = true},
{name = "default_water.png"..WATER_ALPHA, backface_culling = false},
{name = "default_water.png"..WATER_ALPHA, backface_culling = true},
},
alpha = WATER_ALPHA,
use_texture_alpha = "blend",
paramtype = "light",
walkable = false,
pointable = false,
Expand All @@ -156,10 +156,12 @@ minetest.register_node("basenodes:water_flowing", {
waving = 3,
tiles = {"default_water_flowing.png"},
special_tiles = {
{name = "default_water_flowing.png", backface_culling = false},
{name = "default_water_flowing.png", backface_culling = false},
{name = "default_water_flowing.png"..WATER_ALPHA,
backface_culling = false},
{name = "default_water_flowing.png"..WATER_ALPHA,
backface_culling = false},
},
alpha = WATER_ALPHA,
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
Expand All @@ -181,12 +183,12 @@ minetest.register_node("basenodes:river_water_source", {
"Drowning damage: 1",
drawtype = "liquid",
waving = 3,
tiles = { "default_river_water.png" },
tiles = { "default_river_water.png"..WATER_ALPHA },
special_tiles = {
{name = "default_river_water.png", backface_culling = false},
{name = "default_river_water.png", backface_culling = true},
{name = "default_river_water.png"..WATER_ALPHA, backface_culling = false},
{name = "default_river_water.png"..WATER_ALPHA, backface_culling = true},
},
alpha = WATER_ALPHA,
use_texture_alpha = "blend",
paramtype = "light",
walkable = false,
pointable = false,
Expand All @@ -209,12 +211,14 @@ minetest.register_node("basenodes:river_water_flowing", {
"Drowning damage: 1",
drawtype = "flowingliquid",
waving = 3,
tiles = {"default_river_water_flowing.png"},
tiles = {"default_river_water_flowing.png"..WATER_ALPHA},
special_tiles = {
{name = "default_river_water_flowing.png", backface_culling = false},
{name = "default_river_water_flowing.png", backface_culling = false},
{name = "default_river_water_flowing.png"..WATER_ALPHA,
backface_culling = false},
{name = "default_river_water_flowing.png"..WATER_ALPHA,
backface_culling = false},
},
alpha = WATER_ALPHA,
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
Expand Down
11 changes: 6 additions & 5 deletions games/devtest/mods/soundstuff/init.lua
Expand Up @@ -60,11 +60,13 @@ minetest.register_node("soundstuff:footstep_liquid", {
description = "Liquid Footstep Sound Node",
drawtype = "liquid",
tiles = {
"soundstuff_node_sound.png^[colorize:#0000FF:127",
"soundstuff_node_sound.png^[colorize:#0000FF:127^[opacity:190",
},
special_tiles = {
{name = "soundstuff_node_sound.png^[colorize:#0000FF:127", backface_culling = false},
{name = "soundstuff_node_sound.png^[colorize:#0000FF:127", backface_culling = true},
{name = "soundstuff_node_sound.png^[colorize:#0000FF:127^[opacity:190",
backface_culling = false},
{name = "soundstuff_node_sound.png^[colorize:#0000FF:127^[opacity:190",
backface_culling = true},
},
liquids_pointable = true,
liquidtype = "source",
Expand All @@ -73,7 +75,7 @@ minetest.register_node("soundstuff:footstep_liquid", {
liquid_renewable = false,
liquid_range = 0,
liquid_viscosity = 0,
alpha = 190,
use_texture_alpha = "blend",
paramtype = "light",
walkable = false,
pointable = false,
Expand All @@ -92,7 +94,6 @@ minetest.register_node("soundstuff:footstep_climbable", {
tiles = {
"soundstuff_node_climbable.png",
},
alpha = 120,
paramtype = "light",
sunlight_propagates = true,
walkable = false,
Expand Down
8 changes: 4 additions & 4 deletions games/devtest/mods/testnodes/drawtypes.lua
Expand Up @@ -364,7 +364,7 @@ for r = 0, 8 do
{name="testnodes_liquidsource_r"..r..".png^[colorize:#FFFFFF:100", backface_culling=false},
{name="testnodes_liquidsource_r"..r..".png^[colorize:#FFFFFF:100", backface_culling=true},
},
use_texture_alpha = true,
use_texture_alpha = "blend",


walkable = false,
Expand All @@ -386,7 +386,7 @@ for r = 0, 8 do
{name="testnodes_liquidflowing_r"..r..".png^[colorize:#FFFFFF:100", backface_culling=false},
{name="testnodes_liquidflowing_r"..r..".png^[colorize:#FFFFFF:100", backface_culling=false},
},
use_texture_alpha = true,
use_texture_alpha = "blend",


walkable = false,
Expand All @@ -411,7 +411,7 @@ minetest.register_node("testnodes:liquid_waving", {
{name="testnodes_liquidsource.png^[colorize:#0000FF:127", backface_culling=false},
{name="testnodes_liquidsource.png^[colorize:#0000FF:127", backface_culling=true},
},
use_texture_alpha = true,
use_texture_alpha = "blend",
waving = 3,


Expand All @@ -434,7 +434,7 @@ minetest.register_node("testnodes:liquid_flowing_waving", {
{name="testnodes_liquidflowing.png^[colorize:#0000FF:127", backface_culling=false},
{name="testnodes_liquidflowing.png^[colorize:#0000FF:127", backface_culling=false},
},
use_texture_alpha = true,
use_texture_alpha = "blend",
waving = 3,


Expand Down
8 changes: 4 additions & 4 deletions games/devtest/mods/testnodes/liquids.lua
Expand Up @@ -9,7 +9,7 @@ for d=0, 8 do
{name = "testnodes_liquidsource_r"..d..".png", backface_culling = false},
{name = "testnodes_liquidsource_r"..d..".png", backface_culling = true},
},
alpha = 192,
use_texture_alpha = "blend",
paramtype = "light",
walkable = false,
buildable_to = true,
Expand All @@ -28,7 +28,7 @@ for d=0, 8 do
{name = "testnodes_liquidflowing_r"..d..".png", backface_culling = false},
{name = "testnodes_liquidflowing_r"..d..".png", backface_culling = false},
},
alpha = 192,
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
Expand All @@ -49,7 +49,7 @@ for d=0, 8 do
{name = "testnodes_liquidsource_r"..d..".png"..mod, backface_culling = false},
{name = "testnodes_liquidsource_r"..d..".png"..mod, backface_culling = true},
},
alpha = 192,
use_texture_alpha = "blend",
paramtype = "light",
walkable = false,
buildable_to = true,
Expand All @@ -68,7 +68,7 @@ for d=0, 8 do
{name = "testnodes_liquidflowing_r"..d..".png"..mod, backface_culling = false},
{name = "testnodes_liquidflowing_r"..d..".png"..mod, backface_culling = false},
},
alpha = 192,
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
Expand Down
4 changes: 2 additions & 2 deletions games/devtest/mods/testnodes/properties.lua
Expand Up @@ -114,7 +114,7 @@ minetest.register_node("testnodes:liquid_nojump", {
{name = "testnodes_liquidsource.png^[colorize:#FF0000:127", backface_culling = false},
{name = "testnodes_liquidsource.png^[colorize:#FF0000:127", backface_culling = true},
},
use_texture_alpha = true,
use_texture_alpha = "blend",
paramtype = "light",
pointable = false,
liquids_pointable = true,
Expand Down Expand Up @@ -142,7 +142,7 @@ minetest.register_node("testnodes:liquidflowing_nojump", {
{name = "testnodes_liquidflowing.png^[colorize:#FF0000:127", backface_culling = false},
{name = "testnodes_liquidflowing.png^[colorize:#FF0000:127", backface_culling = false},
},
use_texture_alpha = true,
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "flowingliquid",
pointable = false,
Expand Down
4 changes: 2 additions & 2 deletions games/devtest/mods/testnodes/textures.lua
Expand Up @@ -46,7 +46,7 @@ for a=1,#alphas do
tiles = {
"testnodes_alpha"..alpha..".png",
},
use_texture_alpha = true,
use_texture_alpha = "blend",

groups = { dig_immediate = 3 },
})
Expand All @@ -59,7 +59,7 @@ for a=1,#alphas do
tiles = {
"testnodes_alpha.png^[opacity:" .. alpha,
},
use_texture_alpha = true,
use_texture_alpha = "blend",

groups = { dig_immediate = 3 },
})
Expand Down

0 comments on commit 5c005ad

Please sign in to comment.