Add files via upload

master
Gerold55 2019-03-09 23:01:23 -05:00 committed by GitHub
parent af44cb3fd9
commit 995cfc7c5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 95 additions and 38 deletions

View File

@ -1,8 +1,22 @@
nodecore.register_craft({
label = "assemble wood chair",
nodes = {
{match = "nc_furniture:plank", replace = "air"},
{x = -1, z = -1, match = "nc_furniture:wood", replace = "air"},
{match = "nc_woodwork:plank", replace = "air"},
{x = -1, z = -1, match = "nc_woodwork:staff", replace = "air"},
{x = -1, z = 1, match = "nc_woodwork:staff", replace = "air"},
{x = -1, z = 1, match = "nc_woodwork:plank", replace = "air"},
{x = -1, z = 1, match = "nc_woodwork:stick", replace = "air"},
{x = -1, z = 1, match = "nc_woodwork:stick", replace = "air"},
},
items = {
"nc_furniture:chair_wood"
}
})
nodecore.register_craft({
label = "assemble stone chair",
nodes = {
{match = "nc_woodwork:plank", replace = "air"},
{x = -1, z = -1, match = "nc_woodwork:plank", replace = "air"},
{x = -1, z = 1, match = "nc_furniture:furn_legs", replace = "air"},
},
items = {
@ -11,28 +25,38 @@ nodecore.register_craft({
})
nodecore.register_craft({
label = "assemble wood table",
nodes = {
{match = "nc_furniture:plank", replace = "air"},
{x = -1, z = -1, match = "nc_furniture:wood", replace = "air"},
{x = -1, z = 1, match = "nc_furniture:stick", replace = "air"},
},
items = {
"nc_furniture:chair_wood"
}
})
label = "assemble wood table",
action= "pummel",
nodes = {
{match = "nc_woodwork:plank", replace = "air"},
{x = -1, z = -1, match = "nc_woodwork:plank", replace = "air"},
{x = -1, z = 1, match = "nc_tree:stick", replace = "air"},
},
items = {
"nc_furniture:table_woodwork_plank"
}
})
nodecore.register_craft({
label = "assemble stone table",
action= "pummel",
nodes = {
{match = "nc_stonework:cobble", replace = "air"},
{x = -1, z = -1, match = "nc_stonework:cobble", replace = "air"},
{x = -1, z = 1, match = "nc_tree:stick", replace = "air"},
},
items = {
"nc_furniture:table_stonework_cobble"
}
})
nodecore.register_craft({
label = "assemble wood chair",
label = "assemble chisel",
nodes = {
{match = "nc_furniture:plank", replace = "air"},
{x = -1, z = -1, match = "nc_furniture:stick", replace = "air"},
{x = 1, z = -1, match = "nc_furniture:stick", replace = "air"},
{x = 2, z = -1, match = "nc_furniture:stick", replace = "air"},
{x = 3, z = -1, match = "nc_furniture:stick", replace = "air"},
{match = "nc_stonework:cobble", replace = "air"},
{x = -1, z = -1, match = "nc_woodwork:wood", replace = "air"},
{x = -1, z = 1, match = "nc_tree:stick", replace = "air"},
},
items = {
"nc_furniture:chair_wood"
"nc_furniture:chisel"
}
})

5
depends.txt Normal file
View File

@ -0,0 +1,5 @@
nc_api
nc_api_craft
nc_woodwork
nc_stonework
nc_lode

View File

@ -1,10 +1,6 @@
local chair_table = { --name, material, invimg
{"Stone Chair", "cobble"},
{"Wood Chair", "wood"},
{"Acacia Wood Chair", "acacia_wood"},
{"Aspen Wood Chair", "aspen_wood"},
{"Pine Wood Chair", "pine_wood"},
{"Jungle Wood Chair", "junglewood"}
{"Stone Chair", "terrain_stone"},
{"Wood Chair", "woodwork_plank"}
}
for i in ipairs (chair_table) do
@ -15,11 +11,10 @@ for i in ipairs (chair_table) do
minetest.register_node("nc_furniture:chair_"..material, {
description = name,
drawtype = "nodebox",
tiles = {"default_"..material..".png"},
groups = {choppy=2, oddly_breakably_by_hand=2, furniture=1, flammable=1},
tiles = {"nc_"..material..".png^nc_legs_"..material.."^nc_"..material..".png"},
groups = {choppy=2, oddly_breakably_by_hand=2, flammable=1},
paramtype = "light",
paramtype2 = "facedir",
sounds = default.node_sound_wood_defaults(),
on_rightclick = function(pos, node, clicker)
nc_furniture.sit(pos, node, clicker)
end,
@ -38,8 +33,8 @@ minetest.register_node("nc_furniture:chair_"..material, {
end
local table_table = { --name, material, invimg
{"Stone Table", "stonework_stone"},
{"Wood Table", "woodwork_wood"}
{"Stone Table", "terrain_stone"},
{"Wood Table", "woodwork_plank"}
}
for i in ipairs (table_table) do
@ -51,21 +46,16 @@ minetest.register_node("nc_furniture:table_"..material, {
description = name,
drawtype = "nodebox",
tiles = {"nc_"..material..".png"},
groups = {snappy = 2, oddly_breakable_by_hand = 2, furniture = 1, flammable = 1, table = 1},
groups = {snappy = 2, oddly_breakable_by_hand = 2, flammable = 1, table = 1},
paramtype = "light",
paramtype2 = "facedir",
sounds = default.node_sound_wood_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.5, -0.125, 0.125, 0.3125, 0.125}, -- NodeBox2
{-0.5, 0.3125, -0.5, 0.5, 0.5, 0.5}, -- NodeBox3
}
},
after_dig_node = function(pos) nc_furniture.check_table(pos, material, false, true) end,
after_place_node = function(pos) nc_furniture.check_table(pos, material, true, true) end,
on_punch = function(pos) nc_furniture.check_table(pos, material, true, true) end
}
})
end

38
ores.lua Normal file
View File

@ -0,0 +1,38 @@
local modname = minetest.get_current_modname()
stratstone[1] = stone
local ore = reg("Ore", {
tiles = { "nc_terrain_stone.png^(" .. modname .. "_iron.png^[mask:"
.. modname .. "_iron.png)" },
drop_in_place = modname .. ":iron",
strata = stratore
})
minetest.register_ore(nodecore.underride(def, {
name = "nc_furniture:iron",
ore_type = "scatter",
ore = name,
wherein = "nc_terrain:stone",
random_factor = 0,
noise_params = {
offset = 0,
scale = 4,
spread = {x=40, y=5, z=40},
seed = 12497,
octaves = 3,
persist = 0.5,
flags = "eased",
},
noise_threshold = 1.3
}, def))
end
regore(ore, {
clust_num_ores = 16,
clust_size = 3,
clust_scarcity = 8 * 8 * 8,
})
regore(stone, {
clust_num_ores = 4,
clust_size = 3,
clust_scarcity = 2 * 2 * 2,
})