Add moreblocks/stairsplus support
This commit is contained in:
parent
eb78b4e217
commit
72609865e7
6
init.lua
6
init.lua
@ -335,10 +335,8 @@ dofile(MP.."/items/redstone.lua")
|
|||||||
dofile(MP.."/items/cement.lua")
|
dofile(MP.."/items/cement.lua")
|
||||||
dofile(MP.."/items/cracking.lua")
|
dofile(MP.."/items/cracking.lua")
|
||||||
dofile(MP.."/items/ceramic.lua")
|
dofile(MP.."/items/ceramic.lua")
|
||||||
|
dofile(MP.."/items/basalt.lua")
|
||||||
if techage.basalt_stone_enabled then
|
dofile(MP.."/items/moreblocks.lua")
|
||||||
dofile(MP.."/items/basalt.lua")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Carts
|
-- Carts
|
||||||
dofile(MP.."/carts/tank_cart.lua")
|
dofile(MP.."/carts/tank_cart.lua")
|
||||||
|
@ -33,17 +33,6 @@ minetest.register_node("techage:basalt_stone", {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
stairs.register_stair_and_slab(
|
|
||||||
"basalt_stone",
|
|
||||||
"techage:basalt_stone",
|
|
||||||
{cracky = 3, stone = 1},
|
|
||||||
{"default_stone.png^[brighten"},
|
|
||||||
"Basalt Stone Stair",
|
|
||||||
"Basalt Stone Slab",
|
|
||||||
default.node_sound_stone_defaults(),
|
|
||||||
false
|
|
||||||
)
|
|
||||||
|
|
||||||
minetest.register_node("techage:basalt_cobble", {
|
minetest.register_node("techage:basalt_cobble", {
|
||||||
description = S("Basalt Cobble"),
|
description = S("Basalt Cobble"),
|
||||||
tiles = {"default_cobble.png^[brighten"},
|
tiles = {"default_cobble.png^[brighten"},
|
||||||
@ -51,17 +40,6 @@ minetest.register_node("techage:basalt_cobble", {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
stairs.register_stair_and_slab(
|
|
||||||
"basalt_cobble",
|
|
||||||
"techage:basalt_cobble",
|
|
||||||
{cracky = 3, stone = 2},
|
|
||||||
{"default_cobble.png^[brighten"},
|
|
||||||
"Basalt Cobble Stair",
|
|
||||||
"Basalt Cobble Slab",
|
|
||||||
default.node_sound_stone_defaults(),
|
|
||||||
false
|
|
||||||
)
|
|
||||||
|
|
||||||
minetest.register_node("techage:basalt_stone_brick", {
|
minetest.register_node("techage:basalt_stone_brick", {
|
||||||
description = S("Basalt Stone Brick"),
|
description = S("Basalt Stone Brick"),
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -72,17 +50,6 @@ minetest.register_node("techage:basalt_stone_brick", {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
stairs.register_stair_and_slab(
|
|
||||||
"basalt_stone_brick",
|
|
||||||
"techage:basalt_stone_brick",
|
|
||||||
{cracky = 2, stone = 1},
|
|
||||||
{"default_stone_brick.png^[brighten"},
|
|
||||||
"Basalt Brick Stair",
|
|
||||||
"Basalt Brick Slab",
|
|
||||||
default.node_sound_stone_defaults(),
|
|
||||||
false
|
|
||||||
)
|
|
||||||
|
|
||||||
minetest.register_node("techage:basalt_stone_block", {
|
minetest.register_node("techage:basalt_stone_block", {
|
||||||
description = S("Basalt Stone Block"),
|
description = S("Basalt Stone Block"),
|
||||||
tiles = {"default_stone_block.png^[brighten"},
|
tiles = {"default_stone_block.png^[brighten"},
|
||||||
@ -91,17 +58,6 @@ minetest.register_node("techage:basalt_stone_block", {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
stairs.register_stair_and_slab(
|
|
||||||
"basalt_stone_block",
|
|
||||||
"techage:basalt_stone_block",
|
|
||||||
{cracky = 2, stone = 1},
|
|
||||||
{"default_stone_block.png^[brighten"},
|
|
||||||
"Basalt Stone Block Stair",
|
|
||||||
"Basalt Stone Block Slab",
|
|
||||||
default.node_sound_stone_defaults(),
|
|
||||||
false
|
|
||||||
)
|
|
||||||
|
|
||||||
minetest.register_node("techage:basalt_gravel", {
|
minetest.register_node("techage:basalt_gravel", {
|
||||||
description = S("Basalt Gravel"),
|
description = S("Basalt Gravel"),
|
||||||
tiles = {"default_gravel.png^[brighten"},
|
tiles = {"default_gravel.png^[brighten"},
|
||||||
@ -109,17 +65,6 @@ minetest.register_node("techage:basalt_gravel", {
|
|||||||
sounds = default.node_sound_gravel_defaults(),
|
sounds = default.node_sound_gravel_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
stairs.register_stair_and_slab(
|
|
||||||
"sieved_basalt_gravel",
|
|
||||||
"techage:sieved_basalt_gravel",
|
|
||||||
{crumbly = 2, falling_node = 1},
|
|
||||||
{"default_gravel.png^[brighten"},
|
|
||||||
"Basalt Gravel Stair",
|
|
||||||
"Basalt Gravel Slab",
|
|
||||||
default.node_sound_gravel_defaults(),
|
|
||||||
false
|
|
||||||
)
|
|
||||||
|
|
||||||
minetest.register_node("techage:sieved_basalt_gravel", {
|
minetest.register_node("techage:sieved_basalt_gravel", {
|
||||||
description = S("Sieved Basalt Gravel"),
|
description = S("Sieved Basalt Gravel"),
|
||||||
tiles = {"default_gravel.png^[brighten"},
|
tiles = {"default_gravel.png^[brighten"},
|
||||||
@ -140,17 +85,6 @@ minetest.register_node("techage:basalt_glass", {
|
|||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
stairs.register_stair_and_slab(
|
|
||||||
"basalt_glass",
|
|
||||||
"techage:basalt_glass",
|
|
||||||
{cracky = 3, oddly_breakable_by_hand = 3},
|
|
||||||
{"techage_basalt_glass.png"},
|
|
||||||
"Basalt Glass Stair",
|
|
||||||
"Basalt Glass Slab",
|
|
||||||
default.node_sound_glass_defaults(),
|
|
||||||
false
|
|
||||||
)
|
|
||||||
|
|
||||||
minetest.register_node("techage:basalt_glass2", {
|
minetest.register_node("techage:basalt_glass2", {
|
||||||
description = S("Basalt Glass 2"),
|
description = S("Basalt Glass 2"),
|
||||||
drawtype = "glasslike_framed_optional",
|
drawtype = "glasslike_framed_optional",
|
||||||
@ -164,17 +98,6 @@ minetest.register_node("techage:basalt_glass2", {
|
|||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
stairs.register_stair_and_slab(
|
|
||||||
"basalt_glass2",
|
|
||||||
"techage:basalt_glass2",
|
|
||||||
{cracky = 3, oddly_breakable_by_hand = 3},
|
|
||||||
{"techage_basalt_glass2.png"},
|
|
||||||
"Basalt Glass 2 Stair",
|
|
||||||
"Basalt Glass 2 Slab",
|
|
||||||
default.node_sound_glass_defaults(),
|
|
||||||
false
|
|
||||||
)
|
|
||||||
|
|
||||||
minetest.register_node("techage:basalt_glass_thin", {
|
minetest.register_node("techage:basalt_glass_thin", {
|
||||||
description = S("Basalt Glass Thin"),
|
description = S("Basalt Glass Thin"),
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
|
89
items/moreblocks.lua
Normal file
89
items/moreblocks.lua
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
--[[
|
||||||
|
|
||||||
|
TechAge
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright (C) 2020-2021 Joachim Stolberg
|
||||||
|
|
||||||
|
AGPL v3
|
||||||
|
See LICENSE.txt for more information
|
||||||
|
|
||||||
|
techage node registrations
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
local function register_alias(name)
|
||||||
|
minetest.register_alias("stairs:slab_" ..name, "techage:slab_" ..name)
|
||||||
|
minetest.register_alias("stairs:slab_" ..name.. "_inverted", "techage:slab_" ..name.. "_inverted")
|
||||||
|
minetest.register_alias("stairs:slab_" ..name.. "_wall", "techage:slab_" ..name.. "_wall")
|
||||||
|
minetest.register_alias("stairs:slab_" ..name.. "_quarter", "techage:slab_" ..name.. "_quarter")
|
||||||
|
minetest.register_alias("stairs:slab_" ..name.. "_quarter_inverted", "techage:slab_" ..name.. "_quarter_inverted")
|
||||||
|
minetest.register_alias("stairs:slab_" ..name.. "_quarter_wall", "techage:slab_" ..name.. "_quarter_wall")
|
||||||
|
minetest.register_alias("stairs:slab_" ..name.. "_three_quarter", "techage:slab_" ..name.. "_three_quarter")
|
||||||
|
minetest.register_alias("stairs:slab_" ..name.. "_three_quarter_inverted", "techage:slab_" ..name.. "_three_quarter_inverted")
|
||||||
|
minetest.register_alias("stairs:slab_" ..name.. "_three_quarter_wall", "techage:slab_" ..name.. "_three_quarter_wall")
|
||||||
|
minetest.register_alias("stairs:stair_" ..name, "techage:stair_" ..name)
|
||||||
|
minetest.register_alias("stairs:stair_" ..name.. "_inverted", "techage:stair_" ..name.. "_inverted")
|
||||||
|
minetest.register_alias("stairs:stair_" ..name.. "_wall", "techage:stair_" ..name.. "_wall")
|
||||||
|
minetest.register_alias("stairs:stair_" ..name.. "_wall_half", "techage:stair_" ..name.. "_wall_half")
|
||||||
|
minetest.register_alias("stairs:stair_" ..name.. "_wall_half_inverted", "techage:stair_" ..name.. "_wall_half_inverted")
|
||||||
|
minetest.register_alias("stairs:stair_" ..name.. "_half", "techage:stair_" ..name.. "_half")
|
||||||
|
minetest.register_alias("stairs:stair_" ..name.. "_half_inverted", "techage:stair_" ..name.. "_half_inverted")
|
||||||
|
minetest.register_alias("stairs:stair_" ..name.. "_right_half", "techage:stair_" ..name.. "_right_half")
|
||||||
|
minetest.register_alias("stairs:stair_" ..name.. "_right_half_inverted", "techage:stair_" ..name.. "_right_half_inverted")
|
||||||
|
minetest.register_alias("stairs:stair_" ..name.. "_wall_half", "techage:stair_" ..name.. "_wall_half")
|
||||||
|
minetest.register_alias("stairs:stair_" ..name.. "_wall_half_inverted", "techage:stair_" ..name.. "_wall_half_inverted")
|
||||||
|
minetest.register_alias("stairs:stair_" ..name.. "_inner", "techage:stair_" ..name.. "_inner")
|
||||||
|
minetest.register_alias("stairs:stair_" ..name.. "_inner_inverted", "techage:stair_" ..name.. "_inner_inverted")
|
||||||
|
minetest.register_alias("stairs:stair_" ..name.. "_outer", "techage:stair_" ..name.. "_outer")
|
||||||
|
minetest.register_alias("stairs:stair_" ..name.. "_outer_inverted", "techage:stair_" ..name.. "_outer_inverted")
|
||||||
|
end
|
||||||
|
|
||||||
|
local NodeNames = {
|
||||||
|
"techage:red_stone",
|
||||||
|
"techage:red_stone_block",
|
||||||
|
"techage:red_stone_brick",
|
||||||
|
|
||||||
|
"techage:basalt_cobble",
|
||||||
|
"techage:basalt_stone",
|
||||||
|
"techage:basalt_stone_block",
|
||||||
|
"techage:basalt_stone_brick",
|
||||||
|
"techage:sieved_basalt_gravel",
|
||||||
|
|
||||||
|
"techage:basalt_glass",
|
||||||
|
"techage:basalt_glass2",
|
||||||
|
"techage:bauxite_stone",
|
||||||
|
"techage:bauxite_cobble",
|
||||||
|
}
|
||||||
|
|
||||||
|
if(minetest.get_modpath("moreblocks")) then
|
||||||
|
for _,name in ipairs(NodeNames) do
|
||||||
|
local ndef = minetest.registered_nodes[name]
|
||||||
|
if ndef then
|
||||||
|
ndef = table.copy(ndef)
|
||||||
|
local subname = string.split(name, ":")[2]
|
||||||
|
ndef.sunlight_propagates = true
|
||||||
|
ndef.groups.not_in_creative_inventory = 1
|
||||||
|
stairsplus:register_all("techage", subname, name, ndef)
|
||||||
|
register_alias(subname)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
for _,name in ipairs(NodeNames) do
|
||||||
|
local ndef = minetest.registered_nodes[name]
|
||||||
|
if ndef then
|
||||||
|
local subname = string.split(name, ":")[2]
|
||||||
|
stairs.register_stair_and_slab(
|
||||||
|
subname,
|
||||||
|
name,
|
||||||
|
ndef.groups,
|
||||||
|
ndef.tiles,
|
||||||
|
ndef.description.." Stair",
|
||||||
|
ndef.description.." Slab",
|
||||||
|
ndef.sound,
|
||||||
|
false
|
||||||
|
)
|
||||||
|
register_alias(subname)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -22,17 +22,6 @@ minetest.register_node("techage:red_stone", {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
stairs.register_stair_and_slab(
|
|
||||||
"red_stone",
|
|
||||||
"techage:red_stone",
|
|
||||||
{cracky = 3, stone = 1},
|
|
||||||
{"default_stone.png^[colorize:#ff4538:110"},
|
|
||||||
"Red Stone Stair",
|
|
||||||
"Red Stone Slab",
|
|
||||||
default.node_sound_stone_defaults(),
|
|
||||||
false
|
|
||||||
)
|
|
||||||
|
|
||||||
minetest.register_node("techage:red_stone_brick", {
|
minetest.register_node("techage:red_stone_brick", {
|
||||||
description = S("Red Stone Brick"),
|
description = S("Red Stone Brick"),
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -43,17 +32,6 @@ minetest.register_node("techage:red_stone_brick", {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
stairs.register_stair_and_slab(
|
|
||||||
"red_stone_brick",
|
|
||||||
"techage:red_stone_brick",
|
|
||||||
{cracky = 2, stone = 1},
|
|
||||||
{"default_stone_brick.png^[colorize:#ff4538:110"},
|
|
||||||
"Red Brick Stair",
|
|
||||||
"Red Brick Slab",
|
|
||||||
default.node_sound_stone_defaults(),
|
|
||||||
false
|
|
||||||
)
|
|
||||||
|
|
||||||
minetest.register_node("techage:red_stone_block", {
|
minetest.register_node("techage:red_stone_block", {
|
||||||
description = S("Red Stone Block"),
|
description = S("Red Stone Block"),
|
||||||
tiles = {"default_stone_block.png^[colorize:#ff4538:110"},
|
tiles = {"default_stone_block.png^[colorize:#ff4538:110"},
|
||||||
@ -62,18 +40,6 @@ minetest.register_node("techage:red_stone_block", {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
stairs.register_stair_and_slab(
|
|
||||||
"red_stone_block",
|
|
||||||
"techage:red_stone_block",
|
|
||||||
{cracky = 2, stone = 1},
|
|
||||||
{"default_stone_block.png^[colorize:#ff4538:110"},
|
|
||||||
"Red Stone Block Stair",
|
|
||||||
"Red Stone Block Slab",
|
|
||||||
default.node_sound_stone_defaults(),
|
|
||||||
false
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "techage:red_stone_brick 4",
|
output = "techage:red_stone_brick 4",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
2
mod.conf
2
mod.conf
@ -1,4 +1,4 @@
|
|||||||
name = techage
|
name = techage
|
||||||
depends = default,doors,flowers,tubelib2,basic_materials,bucket,stairs,screwdriver,minecart,lcdlib,safer_lua
|
depends = default,doors,flowers,tubelib2,basic_materials,bucket,stairs,screwdriver,minecart,lcdlib,safer_lua
|
||||||
optional_depends = unified_inventory,wielded_light,unifieddyes,moreores,ethereal,mesecon,digtron,bakedclay
|
optional_depends = unified_inventory,wielded_light,unifieddyes,moreores,ethereal,mesecon,digtron,bakedclay,moreblocks
|
||||||
description = Techage, go through 4 tech ages in search of wealth and power!
|
description = Techage, go through 4 tech ages in search of wealth and power!
|
||||||
|
@ -22,8 +22,10 @@ minetest.after(1, function()
|
|||||||
--print(dump(recipe.items))
|
--print(dump(recipe.items))
|
||||||
local key = recipe_key(recipe.items)
|
local key = recipe_key(recipe.items)
|
||||||
if Recipes[key] then
|
if Recipes[key] then
|
||||||
local text = Recipes[key].." and "..name.." have the same incredients"
|
if not string.find(name, "slab") and not string.find(name, "stair") then
|
||||||
minetest.log("error", text)
|
local text = Recipes[key].." and "..name.." have the same incredients"
|
||||||
|
minetest.log("error", text)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
Recipes[key] = name
|
Recipes[key] = name
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user