3D Ladder and minor default cleanup

This commit is contained in:
MoNTE48 2019-10-15 16:35:59 +02:00
parent 2efa5a2917
commit 3d7d669e35
5 changed files with 31 additions and 95 deletions

View File

@ -1,74 +1,12 @@
-- mods/default/aliases.lua
-- Aliases to support loading worlds using nodes following the old naming convention
-- These can also be helpful when using chat commands, for example /giveme
minetest.register_alias("stone", "default:stone")
minetest.register_alias("stone_with_coal", "default:stone_with_coal")
minetest.register_alias("stone_with_iron", "default:stone_with_iron")
minetest.register_alias("dirt_with_grass", "default:dirt_with_grass")
minetest.register_alias("dirt_with_grass_footsteps", "default:dirt_with_grass")
minetest.register_alias("default:dirt_with_grass_footsteps", "default:dirt_with_grass")
minetest.register_alias("dirt", "default:dirt")
minetest.register_alias("sand", "default:sand")
minetest.register_alias("gravel", "default:gravel")
minetest.register_alias("sandstone", "default:sandstone")
minetest.register_alias("clay", "default:clay")
minetest.register_alias("brick", "default:brick")
minetest.register_alias("tree", "default:tree")
minetest.register_alias("jungletree", "default:jungletree")
minetest.register_alias("junglegrass", "default:junglegrass")
minetest.register_alias("leaves", "default:leaves")
minetest.register_alias("cactus", "default:cactus")
minetest.register_alias("papyrus", "default:sugarcane")
minetest.register_alias("bookshelf", "default:bookshelf")
minetest.register_alias("glass", "default:glass")
minetest.register_alias("wooden_fence", "default:fence_wood")
minetest.register_alias("ladder", "default:ladder")
minetest.register_alias("wood", "default:wood")
minetest.register_alias("water_flowing", "default:water_flowing")
minetest.register_alias("water_source", "default:water_source")
minetest.register_alias("lava_flowing", "default:lava_flowing")
minetest.register_alias("lava_source", "default:lava_source")
minetest.register_alias("torch", "default:torch")
minetest.register_alias("sign_wall", "default:sign_wall")
minetest.register_alias("signs:sign_wall", "signs:sign")
minetest.register_alias("furnace", "default:furnace")
minetest.register_alias("chest", "default:chest")
minetest.register_alias("locked_chest", "default:chest_locked")
minetest.register_alias("cobble", "default:cobble")
minetest.register_alias("mossycobble", "default:mossycobble")
minetest.register_alias("steelblock", "default:steelblock")
minetest.register_alias("sapling", "default:sapling")
minetest.register_alias("apple", "default:apple")
minetest.register_alias("WPick", "default:pick_wood")
minetest.register_alias("STPick", "default:pick_stone")
minetest.register_alias("SteelPick", "default:pick_steel")
minetest.register_alias("WShovel", "default:shovel_wood")
minetest.register_alias("STShovel", "default:shovel_stone")
minetest.register_alias("SteelShovel", "default:shovel_steel")
minetest.register_alias("WAxe", "default:axe_wood")
minetest.register_alias("STAxe", "default:axe_stone")
minetest.register_alias("SteelAxe", "default:axe_steel")
minetest.register_alias("WSword", "default:sword_wood")
minetest.register_alias("STSword", "default:sword_stone")
minetest.register_alias("SteelSword", "default:sword_steel")
minetest.register_alias("Stick", "default:stick")
minetest.register_alias("paper", "default:paper")
minetest.register_alias("book", "default:book")
minetest.register_alias("lump_of_coal", "default:coal_lump")
minetest.register_alias("lump_of_iron", "default:steel_ingot")
minetest.register_alias("lump_of_clay", "default:clay_lump")
minetest.register_alias("steel_ingot", "default:steel_ingot")
minetest.register_alias("clay_brick", "default:clay_brick")
minetest.register_alias("snow", "default:snow")
-- Aliases for corrected pine node names
-- Pinetree
minetest.register_alias("default:pinetree", "default:pine_tree")
minetest.register_alias("default:pinewood", "default:pine_wood")
-- Gold nugget
-- Gold Nugget
minetest.register_alias("default:gold_nugget", "default:gold_ingot")
-- Sandstone Carved
@ -77,7 +15,7 @@ minetest.register_alias("default:sandstonecarved", "default:sandstonesmooth")
-- Ladder
minetest.register_alias("default:ladder", "default:ladder_wood")
-- Ladder
-- Sugarcane
minetest.register_alias("default:reeds", "default:sugarcane")
minetest.register_alias("default:papyrus", "default:sugarcane")

View File

@ -71,7 +71,6 @@ minetest.register_node("default:chest", {
},
paramtype = "light",
paramtype2 = "facedir",
legacy_facedir_simple = true,
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2},
sounds = default.node_sound_wood_defaults(),
@ -129,7 +128,6 @@ minetest.register_node("default:chest_left", {
},
paramtype = "light",
paramtype2 = "facedir",
legacy_facedir_simple = true,
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, not_in_creative_inventory = 1},
drop = "default:chest",
@ -159,7 +157,6 @@ minetest.register_node("default:chest_right", {
},
paramtype = "light",
paramtype2 = "facedir",
legacy_facedir_simple = true,
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, not_in_creative_inventory = 1},
drop = "default:chest",

View File

@ -33,9 +33,9 @@ end
local function can_dig(pos, player)
if minetest.is_protected(pos, player:get_player_name()) then
return
return false
end
local meta = minetest.get_meta(pos);
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
for _, name in pairs({"fuel", "dst", "src"}) do
local stack = inv:get_stack(name, 1)
@ -276,7 +276,6 @@ minetest.register_node("default:furnace", {
},
paramtype2 = "facedir",
groups = {cracky = 2},
legacy_facedir_simple = true,
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
@ -325,8 +324,7 @@ minetest.register_node("default:furnace_active", {
paramtype2 = "facedir",
light_source = minetest.LIGHT_MAX - 5,
drop = "default:furnace",
groups = {cracky = 2, not_in_creative_inventory=1},
legacy_facedir_simple = true,
groups = {cracky = 2, not_in_creative_inventory = 1},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
on_timer = furnace_node_timer,

View File

@ -17,7 +17,6 @@ minetest.register_node("default:stone", {
tiles = {"default_stone.png"},
groups = {cracky = 3, stone = 1},
drop = "default:cobble",
legacy_mineral = true,
sounds = default.node_sound_stone_defaults()
})
@ -229,12 +228,16 @@ minetest.register_node("default:snow", {
groups = {crumbly = 3, falling_node = 1, snowy = 1, puts_out_fire = 1, misc = 1, speed = -30, not_in_creative_inventory = 1},
sounds = default.node_sound_snow_defaults(),
drop = "default:snowball",
on_use = default.snow_shoot_snowball,
on_construct = function(pos)
pos.y = pos.y - 1
pos.y = pos.y - 1
if minetest.get_node(pos).name == "default:dirt_with_grass" then
minetest.set_node(pos, {name = "default:dirt_with_snow"})
end
end,
on_timer = function(pos)
minetest.remove_node(pos)
end
})
@ -303,7 +306,6 @@ minetest.register_node("default:sapling", {
drawtype = "plantlike",
tiles = {"default_sapling.png"},
inventory_image = "default_sapling.png",
wield_image = "default_sapling.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
@ -454,7 +456,6 @@ minetest.register_node("default:junglesapling", {
drawtype = "plantlike",
tiles = {"default_junglesapling.png"},
inventory_image = "default_junglesapling.png",
wield_image = "default_junglesapling.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
@ -533,7 +534,6 @@ minetest.register_node("default:pine_sapling", {
drawtype = "plantlike",
tiles = {"default_pine_sapling.png"},
inventory_image = "default_pine_sapling.png",
wield_image = "default_pine_sapling.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
@ -613,7 +613,6 @@ minetest.register_node("default:acacia_sapling", {
drawtype = "plantlike",
tiles = {"default_acacia_sapling.png"},
inventory_image = "default_acacia_sapling.png",
wield_image = "default_acacia_sapling.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
@ -690,7 +689,6 @@ minetest.register_node("default:birch_sapling", {
drawtype = "plantlike",
tiles = {"default_birch_sapling.png"},
inventory_image = "default_birch_sapling.png",
wield_image = "default_birch_sapling.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
@ -807,7 +805,7 @@ minetest.register_node("default:goldblock", {
})
minetest.register_node("default:stone_with_emerald", {
description = "Emerald Ore",
description = default.colors.emerald .. Sl("Emerald Ore"),
tiles = {"default_stone.png^default_mineral_emerald.png"},
groups = {cracky = 2},
drop = "default:emerald",
@ -815,7 +813,7 @@ minetest.register_node("default:stone_with_emerald", {
})
minetest.register_node("default:emeraldblock", {
description = "Emerald Block",
description = default.colors.emerald .. Sl("Emerald Block"),
tiles = {"default_emerald_block.png"},
groups = {cracky = 1},
sounds = default.node_sound_stone_defaults()
@ -872,7 +870,6 @@ minetest.register_node("default:sugarcane", {
drawtype = "plantlike",
tiles = {"default_sugarcane.png"},
inventory_image = "default_sugarcane_inv.png",
wield_image = "default_sugarcane_inv.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
@ -893,6 +890,7 @@ minetest.register_node("default:dry_shrub", {
drawtype = "plantlike",
waving = 1,
tiles = {"default_dry_shrub.png"},
inventory_image = "default_dry_shrub.png",
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 4,
@ -914,7 +912,6 @@ minetest.register_node("default:junglegrass", {
visual_scale = 1.3,
tiles = {"default_junglegrass.png"},
inventory_image = "default_junglegrass.png",
wield_image = "default_junglegrass.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
@ -929,7 +926,6 @@ minetest.register_node("default:grass", {
waving = 1,
tiles = {"default_tallgrass.png"},
inventory_image = "default_tallgrass.png",
wield_image = "default_tallgrass.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
@ -946,7 +942,6 @@ minetest.register_node("default:dry_grass", {
waving = 1,
tiles = {"default_dry_tallgrass.png"},
inventory_image = "default_dry_tallgrass.png",
wield_image = "default_dry_tallgrass.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
@ -1338,8 +1333,8 @@ minetest.register_node("default:bookshelf", {
minetest.register_node("default:ladder_wood", {
description = "Wooden Ladder",
drawtype = "signlike",
tiles = {"default_ladder_wood.png"},
drawtype = "nodebox",
tiles = {"default_wood.png"},
inventory_image = "default_ladder_wood.png",
wield_image = "default_ladder_wood.png",
paramtype = "light",
@ -1348,14 +1343,24 @@ minetest.register_node("default:ladder_wood", {
walkable = false,
climbable = true,
is_ground_content = false,
node_box = {
type = "fixed",
fixed = {
{-0.375, -0.5, -0.5, -0.25, -0.375, 0.5}, -- Strut Left
{ 0.25, -0.5, -0.5, 0.375, -0.375, 0.5}, -- Strut Right
{-0.438, -0.5, 0.312, 0.438, -0.35, 0.435}, -- Rung 1
{-0.438, -0.5, 0.06, 0.438, -0.35, 0.185}, -- Rung 2
{-0.438, -0.5, -0.185, 0.438, -0.35, -0.06}, -- Rung 3
{-0.438, -0.5, -0.435, 0.438, -0.35, -0.31} -- Rung 4
}
},
selection_box = {
type = "wallmounted",
--wall_top = = <default>
--wall_bottom = = <default>
--wall_side = = <default>
wall_top = {-0.438, 0.35, -0.5, 0.438, 0.5, 0.5},
wall_bottom = {-0.438, -0.5, -0.5, 0.438, -0.35, 0.5},
wall_side = {-0.5, -0.5, -0.438, -0.35, 0.5, 0.438}
},
groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2, attached_node = 1},
legacy_wallmounted = true,
sounds = default.node_sound_wood_defaults()
})
@ -1384,7 +1389,6 @@ minetest.register_node("default:vine", {
type = "wallmounted",
},
groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2},
legacy_wallmounted = true,
sounds = default.node_sound_leaves_defaults(),
drop = "",
after_dig_node = function(pos, oldnode, oldmetadata, user)

View File

@ -1 +0,0 @@
default_privs = interact, shout, fly, settime