summaryrefslogtreecommitdiff
path: root/tube_registration.lua
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2021-03-24 19:47:25 +0100
committerSmallJoker <mk939@ymail.com>2021-03-24 19:47:30 +0100
commitd2954c52773faa86e3a414250b8a9f5acd04c787 (patch)
tree7228296a3181f45f9fc9756924d926b12ab3e477 /tube_registration.lua
parent9ad6e5d07a1600273153e561be832cfb3c5c5171 (diff)
downloadpipeworks-d2954c52773faa86e3a414250b8a9f5acd04c787.tar
pipeworks-d2954c52773faa86e3a414250b8a9f5acd04c787.tar.gz
pipeworks-d2954c52773faa86e3a414250b8a9f5acd04c787.tar.bz2
pipeworks-d2954c52773faa86e3a414250b8a9f5acd04c787.tar.xz
pipeworks-d2954c52773faa86e3a414250b8a9f5acd04c787.zip
Get rid of most 5.4.0 texture warnings
This commit also shortens the lua_tube.lua code a bit
Diffstat (limited to 'tube_registration.lua')
-rw-r--r--tube_registration.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/tube_registration.lua b/tube_registration.lua
index c530cbf..a77154a 100644
--- a/tube_registration.lua
+++ b/tube_registration.lua
@@ -26,6 +26,11 @@ local texture_mt = {
end
}
+-- This will remove any semi-transparent pixels
+-- because that is still buggy in Minetest, force this as default
+local texture_alpha_mode = minetest.features.use_texture_alpha_string_modes
+ and "clip" or true
+
local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, ends, short, inv, special, connects, style)
noctrs = noctrs or default_noctrs
setmetatable(noctrs, texture_mt)
@@ -82,6 +87,7 @@ local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, e
description = tubedesc,
drawtype = "nodebox",
tiles = outimgs,
+ use_texture_alpha = texture_alpha_mode,
sunlight_propagates = true,
inventory_image = iimg,
wield_image = iimg,