From 686f78a16ae9fa88131aad845eee1a0903b8ebe6 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Tue, 22 Jan 2019 19:26:20 +0100 Subject: [PATCH] quarry bugfix --- techpack_stairway/init.lua | 41 ++++++++++++++++++++++++++++++++++++++ tubelib_addons1/quarry.lua | 7 ++----- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/techpack_stairway/init.lua b/techpack_stairway/init.lua index eaeab8a..b74ec4e 100644 --- a/techpack_stairway/init.lua +++ b/techpack_stairway/init.lua @@ -407,6 +407,38 @@ minetest.register_node("techpack_stairway:ladder2", { sounds = default.node_sound_metal_defaults(), }) +minetest.register_node("techpack_stairway:ladder3", { + description = "TechPack Ladder 3", + tiles = { + 'techpack_stairway_steps.png', + 'techpack_stairway_steps.png', + 'techpack_stairway_ladder.png', + }, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-17/32, -17/32, 15/32, 17/32, 17/32, 17/32}, + --{-17/32, -17/32, -17/32, -15/32, 17/32, 17/32}, + --{-17/32, -17/32, -17/32, 17/32, 17/32, -15/32}, + { 15/32, -17/32, -17/32, 17/32, 17/32, 17/32}, + }, + }, + + selection_box = { + type = "fixed", + fixed = {-8/16, -8/16, -8/16, 8/16, 8/16, 8/16}, + }, + + climbable = true, + paramtype2 = "facedir", + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_metal_defaults(), +}) + minetest.register_node("techpack_stairway:lattice", { description = "TechPack Lattice", tiles = { @@ -475,6 +507,15 @@ minetest.register_craft({ }, }) +minetest.register_craft({ + output = "techpack_stairway:ladder3 4", + recipe = { + {"", "", "default:steel_ingot"}, + {"dye:dark_grey", "default:tin_ingot", "default:coal_lump"}, + {"", "", "default:steel_ingot"}, + }, +}) + minetest.register_craft({ output = "techpack_stairway:lattice 2", recipe = { diff --git a/tubelib_addons1/quarry.lua b/tubelib_addons1/quarry.lua index dbada08..8861bf4 100644 --- a/tubelib_addons1/quarry.lua +++ b/tubelib_addons1/quarry.lua @@ -170,7 +170,8 @@ local function quarry_next_node(pos, meta) meta:set_int("fuel", fuel) local idx = meta:get_int("idx") - local facedir = meta:get_int("facedir") + if idx == 0 then idx = 1 end + local facedir = minetest.get_node(pos).param2 local owner = meta:get_string("owner") local endless = meta:get_int("endless") local start_y = pos.y + meta:get_int("start_level") @@ -295,8 +296,6 @@ minetest.register_node("tubelib_addons1:quarry", { inv:set_size('main', 16) inv:set_size('fuel', 1) local number = tubelib.add_node(pos, "tubelib_addons1:quarry") - local facedir = minetest.dir_to_facedir(placer:get_look_dir(), false) - meta:set_int("facedir", facedir) meta:set_string("owner", placer:get_player_name()) meta:set_int("endless", 0) meta:set_int("curr_level", -1) @@ -388,8 +387,6 @@ minetest.register_node("tubelib_addons1:quarry_defect", { inv:set_size('main', 16) inv:set_size('fuel', 1) local number = tubelib.add_node(pos, "tubelib_addons1:quarry") - local facedir = minetest.dir_to_facedir(placer:get_look_dir(), false) - meta:set_int("facedir", facedir) meta:set_string("owner", placer:get_player_name()) meta:set_int("endless", 0) meta:set_int("curr_level", -1)