mirror of
				https://github.com/sys4-fr/server-nalc.git
				synced 2025-11-04 05:55:28 +01:00 
			
		
		
		
	Reverted moreblocks and maptools updates
This commit is contained in:
		
							
								
								
									
										3
									
								
								mods/moreblocks/stairsplus/API.md
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										3
									
								
								mods/moreblocks/stairsplus/API.md
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -1,5 +1,6 @@
 | 
			
		||||
API documentation for Stairs+
 | 
			
		||||
=============================
 | 
			
		||||
================================
 | 
			
		||||
- - - - - - - - - - - - - - - -
 | 
			
		||||
 | 
			
		||||
* `stairsplus:register_all(modname, subname, recipeitem, fields)`
 | 
			
		||||
	Registers a stair, slab, panel, microblock, and any other types of
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								mods/moreblocks/stairsplus/aliases.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										8
									
								
								mods/moreblocks/stairsplus/aliases.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -1,9 +1,3 @@
 | 
			
		||||
--[[
 | 
			
		||||
More Blocks: alias definitions
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2011-2015 Calinou and contributors.
 | 
			
		||||
Licensed under the zlib license. See LICENSE.md for more information.
 | 
			
		||||
--]]
 | 
			
		||||
 | 
			
		||||
local function register_stairsplus_alias(modname, origname, newname)
 | 
			
		||||
	minetest.register_alias(modname.. ":slab_" ..origname, "moreblocks:slab_" ..newname)
 | 
			
		||||
@@ -39,14 +33,12 @@ end
 | 
			
		||||
 | 
			
		||||
register_stairsplus_alias("stairsplus", "stone", "stone")
 | 
			
		||||
register_stairsplus_alias("stairsplus", "wood", "wood")
 | 
			
		||||
register_stairsplus_alias("stairsplus", "pinewood", "pinewood")
 | 
			
		||||
register_stairsplus_alias("stairsplus", "cobble", "cobble")
 | 
			
		||||
register_stairsplus_alias("stairsplus", "brick", "brick")
 | 
			
		||||
register_stairsplus_alias("stairsplus", "sandstone", "sandstone")
 | 
			
		||||
register_stairsplus_alias("stairsplus", "glass", "glass")
 | 
			
		||||
register_stairsplus_alias("stairsplus", "tree", "tree")
 | 
			
		||||
register_stairsplus_alias("stairsplus", "jungletree", "jungletree")
 | 
			
		||||
register_stairsplus_alias("stairsplus", "pinetree", "pinetree")
 | 
			
		||||
register_stairsplus_alias("stairsplus", "desert_stone", "desert_stone")
 | 
			
		||||
register_stairsplus_alias("stairsplus", "steelblock", "steelblock")
 | 
			
		||||
register_stairsplus_alias("stairsplus", "mossycobble", "mossycobble")
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								mods/moreblocks/stairsplus/conversion.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										7
									
								
								mods/moreblocks/stairsplus/conversion.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -1,10 +1,3 @@
 | 
			
		||||
--[[
 | 
			
		||||
More Blocks: conversion
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2011-2015 Calinou and contributors.
 | 
			
		||||
Licensed under the zlib license. See LICENSE.md for more information.
 | 
			
		||||
--]]
 | 
			
		||||
 | 
			
		||||
-- Function to convert all stairs/slabs/etc nodes from
 | 
			
		||||
-- inverted, wall, etc to regular + 6d facedir
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										19
									
								
								mods/moreblocks/stairsplus/init.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										19
									
								
								mods/moreblocks/stairsplus/init.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -1,10 +1,3 @@
 | 
			
		||||
--[[
 | 
			
		||||
More Blocks: Stairs+
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2011-2015 Calinou and contributors.
 | 
			
		||||
Licensed under the zlib license. See LICENSE.md for more information.
 | 
			
		||||
--]]
 | 
			
		||||
 | 
			
		||||
-- Nodes will be called <modname>:{stair,slab,panel,micro}_<subname>
 | 
			
		||||
 | 
			
		||||
local modpath = minetest.get_modpath("moreblocks").. "/stairsplus"
 | 
			
		||||
@@ -25,7 +18,6 @@ function stairsplus:register_all(modname, subname, recipeitem, fields)
 | 
			
		||||
	end
 | 
			
		||||
	self:register_stair(modname, subname, recipeitem, fields)
 | 
			
		||||
	self:register_slab (modname, subname, recipeitem, fields)
 | 
			
		||||
	self:register_slope(modname, subname, recipeitem, fields)
 | 
			
		||||
	self:register_panel(modname, subname, recipeitem, fields)
 | 
			
		||||
	self:register_micro(modname, subname, recipeitem, fields)
 | 
			
		||||
	-- self:register_6dfacedir_conversion(modname, subname) -- Not needed as of Q3 2013, uncomment to fix old maps.
 | 
			
		||||
@@ -44,9 +36,8 @@ end
 | 
			
		||||
 | 
			
		||||
-- dofile(modpath.. "/aliases.lua") -- Not needed as of Q2 2013, uncomment to fix old maps.
 | 
			
		||||
-- dofile(modpath.. "/conversion.lua") -- Not needed as of Q2 2013, uncomment to fix old maps.
 | 
			
		||||
dofile(modpath .. "/stairs.lua")
 | 
			
		||||
dofile(modpath .. "/slabs.lua")
 | 
			
		||||
dofile(modpath .. "/slopes.lua")
 | 
			
		||||
dofile(modpath .. "/panels.lua")
 | 
			
		||||
dofile(modpath .. "/microblocks.lua")
 | 
			
		||||
dofile(modpath .. "/registrations.lua")
 | 
			
		||||
dofile(modpath.. "/stairs.lua")
 | 
			
		||||
dofile(modpath.. "/slabs.lua")
 | 
			
		||||
dofile(modpath.. "/panels.lua")
 | 
			
		||||
dofile(modpath.. "/microblocks.lua")
 | 
			
		||||
dofile(modpath.. "/registrations.lua")
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								mods/moreblocks/stairsplus/microblocks.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										15
									
								
								mods/moreblocks/stairsplus/microblocks.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -1,11 +1,10 @@
 | 
			
		||||
--[[
 | 
			
		||||
More Blocks: microblock definitions
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2011-2015 Calinou and contributors.
 | 
			
		||||
Licensed under the zlib license. See LICENSE.md for more information.
 | 
			
		||||
--]]
 | 
			
		||||
 | 
			
		||||
local S = moreblocks.intllib
 | 
			
		||||
local S -- Load translation library if intllib is installed:
 | 
			
		||||
if (minetest.get_modpath("intllib")) then
 | 
			
		||||
	dofile(minetest.get_modpath("intllib").."/intllib.lua")
 | 
			
		||||
	S = intllib.Getter(minetest.get_current_modname())
 | 
			
		||||
else
 | 
			
		||||
	S = function(s) return s end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- Node will be called <modname>:micro_<subname>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								mods/moreblocks/stairsplus/panels.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										15
									
								
								mods/moreblocks/stairsplus/panels.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -1,11 +1,10 @@
 | 
			
		||||
--[[
 | 
			
		||||
More Blocks: panel definitions
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2011-2015 Calinou and contributors.
 | 
			
		||||
Licensed under the zlib license. See LICENSE.md for more information.
 | 
			
		||||
--]]
 | 
			
		||||
 | 
			
		||||
local S = moreblocks.intllib
 | 
			
		||||
local S -- Load translation library if intllib is installed:
 | 
			
		||||
if (minetest.get_modpath("intllib")) then
 | 
			
		||||
	dofile(minetest.get_modpath("intllib").."/intllib.lua")
 | 
			
		||||
	S = intllib.Getter(minetest.get_current_modname())
 | 
			
		||||
else
 | 
			
		||||
	S = function(s) return s end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- Node will be called <modname>:panel_<subname>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								mods/moreblocks/stairsplus/registrations.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										11
									
								
								mods/moreblocks/stairsplus/registrations.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -1,10 +1,3 @@
 | 
			
		||||
--[[
 | 
			
		||||
More Blocks: registrations
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2011-2015 Calinou and contributors.
 | 
			
		||||
Licensed under the zlib license. See LICENSE.md for more information.
 | 
			
		||||
--]]
 | 
			
		||||
 | 
			
		||||
local default_nodes = { -- Default stairs/slabs/panels/microblocks:
 | 
			
		||||
	"stone",
 | 
			
		||||
	"cobble",
 | 
			
		||||
@@ -17,14 +10,12 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
 | 
			
		||||
	"bronzeblock",
 | 
			
		||||
	"diamondblock",
 | 
			
		||||
	"desert_stone",
 | 
			
		||||
	"desert_cobble",
 | 
			
		||||
--	"desert_cobble",
 | 
			
		||||
	"glass",
 | 
			
		||||
	"tree",
 | 
			
		||||
	"wood",
 | 
			
		||||
	"jungletree",
 | 
			
		||||
	"junglewood",
 | 
			
		||||
	"pinetree",
 | 
			
		||||
	"pinewood",
 | 
			
		||||
	"obsidian",
 | 
			
		||||
	"obsidian_glass",
 | 
			
		||||
	"stonebrick",
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										21
									
								
								mods/moreblocks/stairsplus/slabs.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										21
									
								
								mods/moreblocks/stairsplus/slabs.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -1,11 +1,10 @@
 | 
			
		||||
--[[
 | 
			
		||||
More Blocks: slab definitions
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2011-2015 Calinou and contributors.
 | 
			
		||||
Licensed under the zlib license. See LICENSE.md for more information.
 | 
			
		||||
--]]
 | 
			
		||||
 | 
			
		||||
local S = moreblocks.intllib
 | 
			
		||||
local S -- Load translation library if intllib is installed:
 | 
			
		||||
if (minetest.get_modpath("intllib")) then
 | 
			
		||||
	dofile(minetest.get_modpath("intllib").."/intllib.lua")
 | 
			
		||||
	S = intllib.Getter(minetest.get_current_modname())
 | 
			
		||||
else
 | 
			
		||||
	S = function(s) return s end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- Node will be called <modname>:slab_<subname>
 | 
			
		||||
 | 
			
		||||
@@ -76,11 +75,11 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields)
 | 
			
		||||
		end
 | 
			
		||||
		def.description = desc
 | 
			
		||||
		if fields.drop then
 | 
			
		||||
			def.drop = modname.. ":slab_" .. fields.drop .. alternate
 | 
			
		||||
			def.drop = modname.. ":slab_" ..fields.drop..alternate
 | 
			
		||||
		end
 | 
			
		||||
		minetest.register_node(":" .. modname .. ":slab_" .. subname .. alternate, def)
 | 
			
		||||
		minetest.register_node(":" ..modname.. ":slab_" ..subname..alternate, def)
 | 
			
		||||
	end
 | 
			
		||||
	minetest.register_alias("stairs:slab_" .. subname, modname .. ":slab_" .. subname)
 | 
			
		||||
	minetest.register_alias("stairs:slab_" ..subname, modname.. ":slab_" ..subname)
 | 
			
		||||
 | 
			
		||||
	-- Some saw-less recipes:
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,459 +0,0 @@
 | 
			
		||||
--[[
 | 
			
		||||
More Blocks: slope definitions
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2011-2015 Calinou and contributors.
 | 
			
		||||
Licensed under the zlib license. See LICENSE.md for more information.
 | 
			
		||||
--]]
 | 
			
		||||
 | 
			
		||||
local S = moreblocks.intllib
 | 
			
		||||
 | 
			
		||||
local box_slope = {
 | 
			
		||||
	type = "fixed",
 | 
			
		||||
	fixed = {
 | 
			
		||||
		{-0.5,  -0.5,  -0.5, 0.5, -0.25, 0.5},
 | 
			
		||||
		{-0.5, -0.25, -0.25, 0.5,     0, 0.5},
 | 
			
		||||
		{-0.5,     0,     0, 0.5,  0.25, 0.5},
 | 
			
		||||
		{-0.5,  0.25,  0.25, 0.5,   0.5, 0.5}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
local box_slope_half = {
 | 
			
		||||
	type = "fixed",
 | 
			
		||||
	fixed = {
 | 
			
		||||
		{-0.5, -0.5,   -0.5,  0.5, -0.375, 0.5},
 | 
			
		||||
		{-0.5, -0.375, -0.25, 0.5, -0.25,  0.5},
 | 
			
		||||
		{-0.5, -0.25,  0,    0.5, -0.125, 0.5},
 | 
			
		||||
		{-0.5, -0.125, 0.25, 0.5,  0,     0.5},
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
local box_slope_half_raised = {
 | 
			
		||||
	type = "fixed",
 | 
			
		||||
	fixed = {
 | 
			
		||||
		{-0.5, -0.5,   -0.5,  0.5, 0.125, 0.5},
 | 
			
		||||
		{-0.5, 0.125, -0.25, 0.5, 0.25,  0.5},
 | 
			
		||||
		{-0.5, 0.25,  0,    0.5, 0.375, 0.5},
 | 
			
		||||
		{-0.5, 0.375, 0.25, 0.5,  0.5,     0.5},
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
--==============================================================
 | 
			
		||||
 | 
			
		||||
local box_slope_inner = {
 | 
			
		||||
	type = "fixed",
 | 
			
		||||
	fixed = {
 | 
			
		||||
		{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
 | 
			
		||||
		{-0.5, -0.5, -0.25, 0.5, 0, 0.5},
 | 
			
		||||
		{-0.5, -0.5, -0.5, 0.25, 0, 0.5},
 | 
			
		||||
		{-0.5, 0, -0.5, 0, 0.25, 0.5},
 | 
			
		||||
		{-0.5, 0, 0, 0.5, 0.25, 0.5},
 | 
			
		||||
		{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5},
 | 
			
		||||
		{-0.5, 0.25, -0.5, -0.25, 0.5, 0.5},
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
local box_slope_inner_half = {
 | 
			
		||||
	type = "fixed",
 | 
			
		||||
	fixed = {
 | 
			
		||||
		{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
 | 
			
		||||
		{-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
 | 
			
		||||
		{-0.5, -0.375, -0.5, 0.25, -0.25, 0.5},
 | 
			
		||||
		{-0.5, -0.25, -0.5, 0, -0.125, 0.5},
 | 
			
		||||
		{-0.5, -0.25, 0, 0.5, -0.125, 0.5},
 | 
			
		||||
		{-0.5, -0.125, 0.25, 0.5, 0, 0.5},
 | 
			
		||||
		{-0.5, -0.125, -0.5, -0.25, 0, 0.5},
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
local box_slope_inner_half_raised = {
 | 
			
		||||
	type = "fixed",
 | 
			
		||||
	fixed = {
 | 
			
		||||
		{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
 | 
			
		||||
		{-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
 | 
			
		||||
		{-0.5, 0.125, -0.5, 0.25, 0.25, 0.5},
 | 
			
		||||
		{-0.5, 0.25, -0.5, 0, 0.375, 0.5},
 | 
			
		||||
		{-0.5, 0.25, 0, 0.5, 0.375, 0.5},
 | 
			
		||||
		{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
 | 
			
		||||
		{-0.5, 0.375, -0.5, -0.25, 0.5, 0.5},
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
--==============================================================
 | 
			
		||||
 | 
			
		||||
local box_slope_outer = {
 | 
			
		||||
	type = "fixed",
 | 
			
		||||
	fixed = {
 | 
			
		||||
		{-0.5,  -0.5,  -0.5,   0.5, -0.25, 0.5},
 | 
			
		||||
		{-0.5, -0.25, -0.25,  0.25,     0, 0.5},
 | 
			
		||||
		{-0.5,     0,     0,     0,  0.25, 0.5},
 | 
			
		||||
		{-0.5,  0.25,  0.25, -0.25,   0.5, 0.5}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
local box_slope_outer_half = {
 | 
			
		||||
	type = "fixed",
 | 
			
		||||
	fixed = {
 | 
			
		||||
		{-0.5,  -0.5,  -0.5,   0.5, -0.375, 0.5},
 | 
			
		||||
		{-0.5, -0.375, -0.25,  0.25, -0.25, 0.5},
 | 
			
		||||
		{-0.5,  -0.25,     0,     0, -0.125, 0.5},
 | 
			
		||||
		{-0.5,  -0.125,  0.25, -0.25, 0, 0.5}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
local box_slope_outer_half_raised = {
 | 
			
		||||
	type = "fixed",
 | 
			
		||||
	fixed = {
 | 
			
		||||
		{-0.5,  -0.5,  -0.5,   0.5, 0.125, 0.5},
 | 
			
		||||
		{-0.5, 0.125, -0.25,  0.25, 0.25, 0.5},
 | 
			
		||||
		{-0.5,  0.25,     0,     0, 0.375, 0.5},
 | 
			
		||||
		{-0.5,  0.375,  0.25, -0.25, 0.5, 0.5}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-- Node will be called <modname>:slope_<subname>
 | 
			
		||||
 | 
			
		||||
function register_slope(modname, subname, recipeitem, groups, images, description, drop, light)
 | 
			
		||||
	return stairsplus:register_slope(modname, subname, recipeitem, {
 | 
			
		||||
		groups = groups,
 | 
			
		||||
		tiles = images,
 | 
			
		||||
		description = description,
 | 
			
		||||
		drop = drop,
 | 
			
		||||
		light_source = light,
 | 
			
		||||
		sounds = default.node_sound_stone_defaults(),
 | 
			
		||||
	})
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
function stairsplus:register_slope(modname, subname, recipeitem, fields)
 | 
			
		||||
	local defs = {
 | 
			
		||||
		[""] = {
 | 
			
		||||
			mesh = "moreblocks_slope.obj",
 | 
			
		||||
			collision_box = box_slope,
 | 
			
		||||
			selection_box = box_slope,
 | 
			
		||||
			
 | 
			
		||||
		},
 | 
			
		||||
		["_half"] = {
 | 
			
		||||
			mesh = "moreblocks_slope_half.obj",
 | 
			
		||||
			collision_box = box_slope_half,
 | 
			
		||||
			selection_box = box_slope_half,
 | 
			
		||||
		},
 | 
			
		||||
		["_half_raised"] = {
 | 
			
		||||
			mesh = "moreblocks_slope_half_raised.obj",
 | 
			
		||||
			collision_box = box_slope_half_raised,
 | 
			
		||||
			selection_box = box_slope_half_raised,
 | 
			
		||||
		},
 | 
			
		||||
		
 | 
			
		||||
--==============================================================
 | 
			
		||||
		
 | 
			
		||||
		["_inner"] = {
 | 
			
		||||
			mesh = "moreblocks_slope_inner.obj",
 | 
			
		||||
			collision_box = box_slope_inner,
 | 
			
		||||
			selection_box = box_slope_inner,
 | 
			
		||||
		},
 | 
			
		||||
		["_inner_half"] = {
 | 
			
		||||
			mesh = "moreblocks_slope_inner_half.obj",
 | 
			
		||||
			collision_box = box_slope_inner_half,
 | 
			
		||||
			selection_box = box_slope_inner_half,
 | 
			
		||||
		},
 | 
			
		||||
		["_inner_half_raised"] = {
 | 
			
		||||
			mesh = "moreblocks_slope_inner_half_raised.obj",
 | 
			
		||||
			collision_box = box_slope_inner_half_raised,
 | 
			
		||||
			selection_box = box_slope_inner_half_raised,
 | 
			
		||||
		},
 | 
			
		||||
		
 | 
			
		||||
--==============================================================
 | 
			
		||||
		
 | 
			
		||||
		["_outer"] = {
 | 
			
		||||
			mesh = "moreblocks_slope_outer.obj",
 | 
			
		||||
			collision_box = box_slope_outer,
 | 
			
		||||
			selection_box = box_slope_outer,
 | 
			
		||||
		},
 | 
			
		||||
		["_outer_half"] = {
 | 
			
		||||
			mesh = "moreblocks_slope_outer_half.obj",
 | 
			
		||||
			collision_box = box_slope_outer_half,
 | 
			
		||||
			selection_box = box_slope_outer_half,
 | 
			
		||||
		},
 | 
			
		||||
		["_outer_half_raised"] = {
 | 
			
		||||
			mesh = "moreblocks_slope_outer_half_raised.obj",
 | 
			
		||||
			collision_box = box_slope_outer_half_raised,
 | 
			
		||||
			selection_box = box_slope_outer_half_raised,
 | 
			
		||||
		},
 | 
			
		||||
		
 | 
			
		||||
--==============================================================
 | 
			
		||||
		
 | 
			
		||||
		["_outer_cut"] = {
 | 
			
		||||
			mesh = "moreblocks_slope_outer_cut.obj",
 | 
			
		||||
			collision_box = box_slope_outer,
 | 
			
		||||
			selection_box = box_slope_outer,
 | 
			
		||||
		},
 | 
			
		||||
		["_outer_cut_half"] = {
 | 
			
		||||
			mesh = "moreblocks_slope_outer_cut_half.obj",
 | 
			
		||||
			collision_box = box_slope_outer_half,
 | 
			
		||||
			selection_box = box_slope_outer_half,
 | 
			
		||||
		},
 | 
			
		||||
		["_outer_cut_half_raised"] = {
 | 
			
		||||
			mesh = "moreblocks_slope_outer_cut_half_raised.obj",
 | 
			
		||||
			collision_box = box_slope_outer_half_raised,
 | 
			
		||||
			selection_box = box_slope_outer_half_raised,
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	local desc = S("%s Slope"):format(fields.description)
 | 
			
		||||
	for alternate, def in pairs(defs) do
 | 
			
		||||
		def.drawtype = "mesh"
 | 
			
		||||
		def.paramtype = "light"
 | 
			
		||||
		def.paramtype2 = "facedir"
 | 
			
		||||
		def.on_place = minetest.rotate_node
 | 
			
		||||
		for k, v in pairs(fields) do
 | 
			
		||||
			def[k] = v
 | 
			
		||||
		end
 | 
			
		||||
		def.description = desc
 | 
			
		||||
		if fields.drop then
 | 
			
		||||
			def.drop = modname.. ":slope_" ..fields.drop..alternate
 | 
			
		||||
		end
 | 
			
		||||
		minetest.register_node(":" ..modname.. ":slope_" ..subname..alternate, def)
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	-- Some saw-less recipes:
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. " 7",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{modname .. ":panel_" .. subname, "", ""},
 | 
			
		||||
			{recipeitem, modname .. ":panel_" .. subname, ""},
 | 
			
		||||
			{recipeitem, recipeitem, modname .. ":panel_" .. subname},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. " 7",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{"", "", modname .. ":panel_" .. subname},
 | 
			
		||||
			{"", modname .. ":panel_" .. subname, recipeitem},
 | 
			
		||||
			{modname .. ":panel_" .. subname, recipeitem, recipeitem},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_half 10",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{modname .. ":panel_" .. subname, "", ""},
 | 
			
		||||
			{recipeitem, recipeitem, modname .. ":panel_" .. subname},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_half 10",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{"", "", modname .. ":panel_" .. subname},
 | 
			
		||||
			{modname .. ":panel_" .. subname, recipeitem, recipeitem},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_half_raised 7",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{modname .. ":panel_" .. subname, "", ""},
 | 
			
		||||
			{recipeitem, recipeitem, modname .. ":panel_" .. subname},
 | 
			
		||||
			{recipeitem, recipeitem, recipeitem},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_half_raised 7",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{"", "", modname .. ":panel_" .. subname},
 | 
			
		||||
			{modname .. ":panel_" .. subname, recipeitem, recipeitem},
 | 
			
		||||
			{recipeitem, recipeitem, recipeitem},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
--===================================================== Inner ==
 | 
			
		||||
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_inner 7",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{modname .. ":stair_" .. subname .. "_half", "", ""},
 | 
			
		||||
			{recipeitem, modname .. ":stair_" .. subname .. "_half", ""},
 | 
			
		||||
			{recipeitem, recipeitem, modname .. ":stair_" .. subname .. "_half"},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_inner 7",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{"", "", modname .. ":stair_" .. subname .. "_half"},
 | 
			
		||||
			{"", modname .. ":stair_" .. subname .. "_half", recipeitem},
 | 
			
		||||
			{modname .. ":stair_" .. subname .. "_half", recipeitem, recipeitem},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_inner_half 10",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{modname .. ":stair_" .. subname .. "_half", "", ""},
 | 
			
		||||
			{recipeitem, recipeitem, modname .. ":stair_" .. subname .. "_half"},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_inner_half 10",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{"", "", modname .. ":stair_" .. subname .. "_half"},
 | 
			
		||||
			{modname .. ":stair_" .. subname .. "_half", recipeitem, recipeitem},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_inner_half_raised 7",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{modname .. ":stair_" .. subname .. "_half", "", ""},
 | 
			
		||||
			{recipeitem, recipeitem, modname .. ":stair_" .. subname .. "_half"},
 | 
			
		||||
			{recipeitem, recipeitem, recipeitem},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_inner_half_raised 7",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{"", "", modname .. ":stair_" .. subname .. "_half"},
 | 
			
		||||
			{modname .. ":stair_" .. subname .. "_half", recipeitem, recipeitem},
 | 
			
		||||
			{recipeitem, recipeitem, recipeitem},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
--===================================================== Outer ==
 | 
			
		||||
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_outer 7",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{modname .. ":micro_" .. subname, "", ""},
 | 
			
		||||
			{recipeitem, modname .. ":micro_" .. subname, ""},
 | 
			
		||||
			{recipeitem, recipeitem, modname .. ":micro_" .. subname},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_outer 7",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{"", "", modname .. ":micro_" .. subname},
 | 
			
		||||
			{"", modname .. ":micro_" .. subname, recipeitem},
 | 
			
		||||
			{modname .. ":micro_" .. subname, recipeitem, recipeitem},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_outer_half 10",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{modname .. ":micro_" .. subname, "", ""},
 | 
			
		||||
			{recipeitem, recipeitem, modname .. ":micro_" .. subname},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_outer_half 10",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{"", "", modname .. ":micro_" .. subname},
 | 
			
		||||
			{modname .. ":micro_" .. subname, recipeitem, recipeitem},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_outer_half_raised 7",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{modname .. ":micro_" .. subname, "", ""},
 | 
			
		||||
			{recipeitem, recipeitem, modname .. ":micro_" .. subname},
 | 
			
		||||
			{recipeitem, recipeitem, recipeitem},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_outer_half_raised 7",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{"", "", modname .. ":micro_" .. subname},
 | 
			
		||||
			{modname .. ":micro_" .. subname, recipeitem, recipeitem},
 | 
			
		||||
			{recipeitem, recipeitem, recipeitem},
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
--================================================= Shapeless ==
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		type = "shapeless",
 | 
			
		||||
		output = recipeitem,
 | 
			
		||||
		recipe =  {modname .. ":slope_" .. subname, modname .. ":slope_" .. subname},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		type = "shapeless",
 | 
			
		||||
		output = recipeitem,
 | 
			
		||||
		recipe =  {modname .. ":slope_" .. subname .. "_outer_cut", modname .. ":slope_" .. subname .. "_outer_cut"},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		type = "shapeless",
 | 
			
		||||
		output = recipeitem,
 | 
			
		||||
		recipe =  {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half_raised"},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		type = "shapeless",
 | 
			
		||||
		output = recipeitem,
 | 
			
		||||
		recipe =  {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
 | 
			
		||||
				   modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		type = "shapeless",
 | 
			
		||||
		output = modname .. ":slab_" .. subname,
 | 
			
		||||
		recipe =  {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		type = "shapeless",
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_half_raised",
 | 
			
		||||
		recipe =  {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
 | 
			
		||||
				   modname .. ":slope_" .. subname .. "_half"},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		type = "shapeless",
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_half_raised",
 | 
			
		||||
		recipe =  {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_half"},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		type = "shapeless",
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_inner_half_raised",
 | 
			
		||||
		recipe =  {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_half"},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		type = "shapeless",
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_outer_half_raised",
 | 
			
		||||
		recipe =  {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_outer_half"},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		type = "shapeless",
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_outer_cut_half_raised",
 | 
			
		||||
		recipe =  {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_outer_cut_half"},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		type = "shapeless",
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_outer_cut",
 | 
			
		||||
		recipe =  {modname .. ":slope_" .. subname .. "_outer"},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		type = "shapeless",
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_outer_cut_half",
 | 
			
		||||
		recipe =  {modname .. ":slope_" .. subname .. "_outer_half"},
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		type = "shapeless",
 | 
			
		||||
		output = modname .. ":slope_" .. subname .. "_outer_cut_half_raised",
 | 
			
		||||
		recipe =  {modname .. ":slope_" .. subname .. "_outer_half_raised"},
 | 
			
		||||
	})
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										21
									
								
								mods/moreblocks/stairsplus/stairs.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										21
									
								
								mods/moreblocks/stairsplus/stairs.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -1,11 +1,10 @@
 | 
			
		||||
--[[
 | 
			
		||||
More Blocks: stair definitions
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2011-2015 Calinou and contributors.
 | 
			
		||||
Licensed under the zlib license. See LICENSE.md for more information.
 | 
			
		||||
--]]
 | 
			
		||||
 | 
			
		||||
local S = moreblocks.intllib
 | 
			
		||||
local S -- Load translation library if intllib is installed:
 | 
			
		||||
if (minetest.get_modpath("intllib")) then
 | 
			
		||||
	dofile(minetest.get_modpath("intllib").."/intllib.lua")
 | 
			
		||||
	S = intllib.Getter(minetest.get_current_modname())
 | 
			
		||||
else
 | 
			
		||||
	S = function(s) return s end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- Node will be called <modname>:stair_<subname>
 | 
			
		||||
 | 
			
		||||
@@ -117,11 +116,11 @@ function stairsplus:register_stair(modname, subname, recipeitem, fields)
 | 
			
		||||
		end
 | 
			
		||||
		def.description = desc
 | 
			
		||||
		if fields.drop then
 | 
			
		||||
			def.drop = modname .. ":stair_" .. fields.drop .. alternate
 | 
			
		||||
			def.drop = modname.. ":stair_" ..fields.drop..alternate
 | 
			
		||||
		end
 | 
			
		||||
		minetest.register_node(":" .. modname .. ":stair_" .. subname .. alternate, def)
 | 
			
		||||
		minetest.register_node(":" ..modname.. ":stair_" ..subname..alternate, def)
 | 
			
		||||
	end
 | 
			
		||||
	minetest.register_alias("stairs:stair_" .. subname, modname .. ":stair_" .. subname)
 | 
			
		||||
	minetest.register_alias(":stairs:stair_" ..subname, modname.. ":stair_" ..subname)
 | 
			
		||||
 | 
			
		||||
	-- Some saw-less recipes:
 | 
			
		||||
	
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user