Fix texture alpha warnings since 5.5.0-dev (#12)

This commit is contained in:
Starbeamrainbowlabs 2021-10-16 13:36:01 +01:00 committed by GitHub
parent 3a933aa081
commit 4dff9943d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 1 deletions

27
.luacheckrc Normal file
View File

@ -0,0 +1,27 @@
quiet = 1
codes = true
exclude_files = {
".luarocks/*",
"worldeditadditions/utils/bit.lua"
}
ignore = {
"631", "61[124]",
"542",
"412",
"321/bit",
"21[123]"
}
-- Read-write globals (i.e. they can be defined)
globals = {
"flowerpot"
}
-- Read-only globals
read_globals = {
"minetest",
"default"
}
std = "max"

View File

@ -84,7 +84,7 @@ function flowerpot.register_node(nodename)
local desc = nodedef.description
local name = nodedef.name:gsub(":", "_")
local tiles = {}
local tiles
if nodedef.drawtype == "plantlike" then
tiles = {
@ -109,6 +109,7 @@ function flowerpot.register_node(nodename)
tiles = tiles,
paramtype = "light",
sunlight_propagates = true,
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
collision_box = {
type = "fixed",
fixed = {-1/4, -1/2, -1/4, 1/4, -1/8, 1/4},
@ -151,6 +152,7 @@ minetest.register_node("flowerpot:empty", {
},
paramtype = "light",
sunlight_propagates = true,
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
collision_box = {
type = "fixed",
fixed = {-1/4, -1/2, -1/4, 1/4, -1/8, 1/4},