Patched for 5.4 - use_texture_alpha = "clip"

master
daretmavi 2021-03-01 21:32:37 +01:00
parent 7f302057ab
commit 4412aba102
3 changed files with 41 additions and 13 deletions

View File

@ -1,5 +1,5 @@
--------------------------------------------------------
-- Minetest :: Doors Redux Mod (doors)
-- Minetest :: Doors Redux Mod v1.1 (doors)
--
-- See README.txt for licensing and other information.
-- Copyright (c) 2016-2020, Leslie E. Krause
@ -23,6 +23,7 @@ doors.ADJUST_LOCKING = 1
doors.ADJUST_CLOSING = 2
minetest.register_node( "doors:hidden", {
use_texture_alpha = "clip",
description = "Hidden Door Segment",
drawtype = "nodebox", -- cannot use air-like, since falling nodes would be stuck
paramtype = "light",
@ -972,9 +973,3 @@ minetest.register_craft( {
{ "default:steel_ingot" },
}
} )
-- compatibility for Minetest S3 engine
if not vector.offset_y or not minetest.get_node_above then
dofile( minetest.get_modpath( "doors" ) .. "/compatibility.lua" )
end

View File

@ -18,6 +18,7 @@ dofile( minetest.get_modpath( "doors" ) .. "/api.lua" )
doors.register_door( "doors:door_wood", {
tiles = {{ name = "doors_door_wood.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "Wooden Door",
inventory_image = "doors_item_wood.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
@ -32,6 +33,7 @@ doors.register_door( "doors:door_wood", {
doors.register_door( "doors:door_woodpanel1", {
-- Colonial Style (6 panel)
tiles = {{ name = "doors_door_woodpanel1.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "Wooden Colonial Door",
inventory_image = "doors_item_woodpanel1.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
@ -46,6 +48,7 @@ doors.register_door( "doors:door_woodpanel1", {
doors.register_door( "doors:door_woodglass1", {
tiles = {{ name = "doors_door_woodglass1.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "Wooden Single-Lite Door",
inventory_image = "doors_item_woodglass1.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
@ -60,6 +63,7 @@ doors.register_door( "doors:door_woodglass1", {
doors.register_door( "doors:door_woodglass2", {
tiles = {{ name = "doors_door_woodglass2.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "Wooden Double-Lite Door",
inventory_image = "doors_item_woodglass2.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
@ -74,6 +78,7 @@ doors.register_door( "doors:door_woodglass2", {
doors.register_door( "doors:door_japanese", {
tiles = {{ name = "doors_door_japanese.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "Japanese Door",
inventory_image = "doors_item_japanese.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
@ -88,6 +93,7 @@ doors.register_door( "doors:door_japanese", {
doors.register_door( "doors:door_french", {
tiles = {{ name = "doors_door_french.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "French Door",
inventory_image = "doors_item_french.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
@ -102,6 +108,7 @@ doors.register_door( "doors:door_french", {
doors.register_door( "doors:door_cottage1", {
tiles = {{ name = "doors_door_cottage1.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "Cottage Interior Door",
inventory_image = "doors_item_cottage1.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
@ -116,6 +123,7 @@ doors.register_door( "doors:door_cottage1", {
doors.register_door( "doors:door_cottage2", {
tiles = {{ name = "doors_door_cottage2.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "Cottage Exterior Door",
inventory_image = "doors_item_cottage2.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
@ -130,6 +138,7 @@ doors.register_door( "doors:door_cottage2", {
doors.register_door( "doors:door_barn1", {
tiles = {{ name = "doors_door_barn1.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "Barn Interior Door",
inventory_image = "doors_item_barn1.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
@ -144,6 +153,7 @@ doors.register_door( "doors:door_barn1", {
doors.register_door( "doors:door_barn2", {
tiles = {{ name = "doors_door_barn2.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "Barn Exterior Door",
inventory_image = "doors_item_barn2.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
@ -158,6 +168,7 @@ doors.register_door( "doors:door_barn2", {
doors.register_door( "doors:door_castle1", {
tiles = {{ name = "doors_door_castle1.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "Castle Interior Door",
inventory_image = "doors_item_castle1.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
@ -172,6 +183,7 @@ doors.register_door( "doors:door_castle1", {
doors.register_door( "doors:door_castle2", {
tiles = {{ name = "doors_door_castle2.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "Castle Exterior Door",
inventory_image = "doors_item_castle2.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
@ -186,6 +198,7 @@ doors.register_door( "doors:door_castle2", {
doors.register_door( "doors:door_mansion1", {
tiles = {{ name = "doors_door_mansion1.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "Mansion Interior Door",
inventory_image = "doors_item_mansion1.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
@ -193,13 +206,12 @@ doors.register_door( "doors:door_mansion1", {
{ "group:wood", "group:wood", "default:steel_rod" },
{ "group:wood", "group:wood", "dye:white" },
{ "group:wood", "group:wood", "default:steel_rod" },
},
is_lockable = true,
is_closable = true,
}
} )
doors.register_door( "doors:door_mansion2", {
tiles = {{ name = "doors_door_mansion2.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "Mansion Exterior Door ",
inventory_image = "doors_item_mansion2.png",
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
@ -207,13 +219,12 @@ doors.register_door( "doors:door_mansion2", {
{ "group:wood", "group:wood", "default:steel_rod" },
{ "group:wood", "group:wood", "dye:black" },
{ "group:wood", "group:wood", "default:steel_rod" },
},
is_lockable = true,
is_closable = true,
}
} )
doors.register_door( "doors:door_steel", {
tiles = {{ name = "doors_door_steel.png", backface_culling = true}},
use_texture_alpha = "clip",
description = "Steel Door",
inventory_image = "doors_item_steel.png",
protected = true,
@ -232,6 +243,7 @@ doors.register_door( "doors:door_steel", {
doors.register_door( "doors:door_dungeon1", {
tiles = {{ name = "doors_door_dungeon1.png", backface_culling = true}},
use_texture_alpha = "clip",
description = "Dungeon Interior Door",
inventory_image = "doors_item_dungeon1.png",
protected = true,
@ -249,6 +261,7 @@ doors.register_door( "doors:door_dungeon1", {
doors.register_door( "doors:door_dungeon2", {
tiles = {{ name = "doors_door_dungeon2.png", backface_culling = true}},
use_texture_alpha = "clip",
description = "Dungeon Exterior Door",
inventory_image = "doors_item_dungeon2.png",
protected = true,
@ -266,6 +279,7 @@ doors.register_door( "doors:door_dungeon2", {
doors.register_door( "doors:door_steelpanel1", {
tiles = {{ name = "doors_door_steelpanel1.png", backface_culling = true}},
use_texture_alpha = "clip",
description = "Steel Colonial Door",
inventory_image = "doors_item_steelpanel1.png",
protected = true,
@ -284,6 +298,7 @@ doors.register_door( "doors:door_steelpanel1", {
doors.register_door( "doors:door_steelglass1", {
tiles = {{ name = "doors_door_steelglass1.png", backface_culling = true}},
use_texture_alpha = "clip",
description = "Steel Single-Lite Door",
inventory_image = "doors_item_steelglass1.png",
protected = true,
@ -302,6 +317,7 @@ doors.register_door( "doors:door_steelglass1", {
doors.register_door( "doors:door_steelglass2", {
tiles = {{ name = "doors_door_steelglass2.png", backface_culling = true }},
use_texture_alpha = "clip",
description = "Steel Double-Lite Door",
inventory_image = "doors_item_steelglass2.png",
protected = true,
@ -320,6 +336,7 @@ doors.register_door( "doors:door_steelglass2", {
doors.register_door( "doors:door_glass", {
tiles = { "doors_door_glass.png" },
use_texture_alpha = "clip",
description = "Glass Door",
inventory_image = "doors_item_glass.png",
groups = { cracky = 3, oddly_breakable_by_hand = 3 },
@ -338,6 +355,7 @@ doors.register_door( "doors:door_glass", {
doors.register_door( "doors:door_obsidian_glass", {
tiles = { "doors_door_obsidian_glass.png" },
use_texture_alpha = "clip",
description = "Obsidian Glass Door",
inventory_image = "doors_item_obsidian_glass.png",
groups = { cracky = 3 },
@ -359,6 +377,7 @@ doors.register_door( "doors:door_obsidian_glass", {
----------------------------
doors.register_trapdoor( "doors:trapdoor", {
use_texture_alpha = "clip",
description = "Trapdoor",
inventory_image = "doors_trapdoor.png",
wield_image = "doors_trapdoor.png",
@ -371,6 +390,7 @@ doors.register_trapdoor( "doors:trapdoor", {
} )
doors.register_trapdoor( "doors:trapdoor_steel", {
use_texture_alpha = "clip",
description = "Steel Trapdoor",
inventory_image = "doors_trapdoor_steel.png",
wield_image = "doors_trapdoor_steel.png",
@ -409,6 +429,7 @@ minetest.register_craft( {
-----------------------------
doors.register_fencegate( "doors:gate_wood", {
use_texture_alpha = "clip",
description = "Wooden Fence Gate",
texture = "default_wood.png",
material = "default:wood",
@ -416,6 +437,7 @@ doors.register_fencegate( "doors:gate_wood", {
} )
doors.register_fencegate( "doors:gate_junglewood", {
use_texture_alpha = "clip",
description = "Junglewood Fence Gate",
texture = "default_junglewood.png",
material = "default:junglewood",
@ -423,6 +445,7 @@ doors.register_fencegate( "doors:gate_junglewood", {
} )
doors.register_fencegate( "doors:gate_acacia_wood", {
use_texture_alpha = "clip",
description = "Acacia Fence Gate",
texture = "default_acacia_wood.png",
material = "default:acacia_wood",
@ -430,6 +453,7 @@ doors.register_fencegate( "doors:gate_acacia_wood", {
} )
doors.register_fencegate( "doors:gate_pine_wood", {
use_texture_alpha = "clip",
description = "Pine Fence Gate",
texture = "default_pine_wood.png",
material = "default:pine_wood",
@ -437,6 +461,7 @@ doors.register_fencegate( "doors:gate_pine_wood", {
} )
doors.register_fencegate( "doors:gate_aspen_wood", {
use_texture_alpha = "clip",
description = "Aspen Fence Gate",
texture = "default_aspen_wood.png",
material = "default:aspen_wood",

View File

@ -95,6 +95,7 @@ function ts_doors.register_door(item, description, texture, sounds, recipe)
end
doors.register("ts_doors:door_" .. item:gsub(":", "_"), {
use_texture_alpha = "clip",
tiles = { { name = "[combine:32x38:0,0=" .. texture .. ":0,16=" .. texture .. ":0,32=" .. texture .. ":16,0=" .. texture .. ":16,16=" .. texture .. ":16,32=" .. texture .. "^[transformR90^[colorize:#fff:30^ts_doors_base.png^[noalpha^[makealpha:0,255,0", backface_culling = true } },
description = S(description .. " Windowed Door"),
inventory_image = "[combine:32x32:0,8=" .. texture .. ":16,8=" .. texture .. "^[transformR90^[colorize:#fff:30^ts_doors_base_inv.png^[noalpha^[makealpha:0,255,0",
@ -115,6 +116,7 @@ function ts_doors.register_door(item, description, texture, sounds, recipe)
})
doors.register_trapdoor("ts_doors:trapdoor_" .. item:gsub(":", "_"), {
use_texture_alpha = "clip",
description = S("Windowed " .. description .. " Trapdoor"),
inventory_image = texture .. "^[transformR90^[colorize:#fff:30^ts_doors_base_trapdoor.png^[noalpha^[makealpha:0,255,0",
wield_image = texture .. "^[transformR90^[colorize:#fff:30^ts_doors_base_trapdoor.png^[noalpha^[makealpha:0,255,0",
@ -127,6 +129,7 @@ function ts_doors.register_door(item, description, texture, sounds, recipe)
})
doors.register_trapdoor("ts_doors:trapdoor_full_" .. item:gsub(":", "_"), {
use_texture_alpha = "clip",
description = S("Solid " .. description .. " Trapdoor"),
inventory_image = texture .. "^[transformR90^[colorize:#fff:30^ts_doors_base_trapdoor_full.png^[noalpha",
wield_image = texture .. "^[transformR90^[colorize:#fff:30^ts_doors_base_trapdoor_full.png^[noalpha",
@ -141,6 +144,7 @@ function ts_doors.register_door(item, description, texture, sounds, recipe)
door_groups.level = 2
doors.register("ts_doors:door_locked_" .. item:gsub(":", "_"), {
use_texture_alpha = "clip",
tiles = { { name = "[combine:32x38:0,0=" .. texture .. ":0,16=" .. texture .. ":0,32=" .. texture .. ":16,0=" .. texture .. ":16,16=" .. texture .. ":16,32=" .. texture .. "^[transformR90^[colorize:#fff:30^ts_doors_base_locked.png^[noalpha^[makealpha:0,255,0", backface_culling = true } },
description = S("Windowed Locked " .. description .. " Door"),
inventory_image = "[combine:32x32:0,8=" .. texture .. ":16,8=" .. texture .. "^[transformR90^[colorize:#fff:30^ts_doors_base_locked_inv.png^[noalpha^[makealpha:0,255,0",
@ -154,6 +158,7 @@ function ts_doors.register_door(item, description, texture, sounds, recipe)
})
doors.register("ts_doors:door_full_locked_" .. item:gsub(":", "_"), {
use_texture_alpha = "clip",
tiles = { { name = "[combine:32x38:0,0=" .. texture .. ":0,16=" .. texture .. ":0,32=" .. texture .. ":16,0=" .. texture .. ":16,16=" .. texture .. ":16,32=" .. texture .. "^[transformR90^[colorize:#fff:30^ts_doors_base_full_locked.png^[noalpha", backface_culling = true } },
description = S("Solid Locked " .. description .. " Door"),
inventory_image = "[combine:32x32:0,8=" .. texture .. ":16,8=" .. texture .. "^[transformR90^[colorize:#fff:30^ts_doors_base_full_locked_inv.png^[noalpha^[makealpha:0,255,0",
@ -167,6 +172,7 @@ function ts_doors.register_door(item, description, texture, sounds, recipe)
})
doors.register_trapdoor("ts_doors:trapdoor_locked_" .. item:gsub(":", "_"), {
use_texture_alpha = "clip",
description = S("Windowed Locked " .. description .. " Trapdoor"),
inventory_image = texture .. "^[transformR90^[colorize:#fff:30^ts_doors_base_trapdoor_locked.png^[noalpha^[makealpha:0,255,0",
wield_image = texture .. "^[transformR90^[colorize:#fff:30^ts_doors_base_trapdoor_locked.png^[noalpha^[makealpha:0,255,0",
@ -180,6 +186,7 @@ function ts_doors.register_door(item, description, texture, sounds, recipe)
})
doors.register_trapdoor("ts_doors:trapdoor_full_locked_" .. item:gsub(":", "_"), {
use_texture_alpha = "clip",
description = S("Solid Locked " .. description .. " Trapdoor"),
inventory_image = texture .. "^[transformR90^[colorize:#fff:30^ts_doors_base_trapdoor_full_locked.png^[noalpha",
wield_image = texture .. "^[transformR90^[colorize:#fff:30^ts_doors_base_trapdoor_full_locked.png^[noalpha",
@ -542,6 +549,7 @@ local function can_dig(pos, player)
end
ts_workshop.register_workshop("ts_doors", "workshop", {
use_texture_alpha = "clip",
description = S("Door Workshop"),
tiles = {
"default_wood.png",