Added books, brass candlestick, alarm clock and zinc ore
|
@ -152,6 +152,18 @@ minetest.register_craftitem(":multidecor:four_lampshades_set",
|
|||
inventory_image = "multidecor_four_lampshades_set.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":multidecor:digital_dial",
|
||||
{
|
||||
description = "Digital Dial",
|
||||
inventory_image = "multidecor_digital_dial.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":multidecor:brass_ingot",
|
||||
{
|
||||
description = "Brass Ingot",
|
||||
inventory_image = "multidecor_brass_ingot.png"
|
||||
})
|
||||
|
||||
minetest.register_craft(
|
||||
{
|
||||
type = "shapeless",
|
||||
|
@ -255,6 +267,28 @@ minetest.register_craft({
|
|||
recipe = {"multidecor:lampshade", "multidecor:lampshade", "multidecor:lampshade", "multidecor:lampshade"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "multidecor:brass_ingot",
|
||||
recipe = {"default:copper_ingot", "multidecor:zinc_ingot"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "multidecor:brass_ingot",
|
||||
recipe = {"default:copper_ingot", "default:tin_ingot"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "multidecor:digital_dial",
|
||||
recipe = {
|
||||
{"multidecor:plastic_sheet", "dye:white", "dye:black"},
|
||||
{"multidecor:steel_scissors", "", ""},
|
||||
{"", "", ""}
|
||||
},
|
||||
replacements = {{"multidecor:steel_scissors", "multidecor:steel_scissors"}}
|
||||
})
|
||||
|
||||
minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv)
|
||||
local contains_saw = false
|
||||
local contains_steel_scissors = false
|
||||
|
|
|
@ -13,7 +13,7 @@ minetest.register_node(":multidecor:wolfram_ore", {
|
|||
}
|
||||
}
|
||||
},
|
||||
groups = {cracky=3.5},
|
||||
groups = {cracky=2.5},
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
|
@ -32,7 +32,7 @@ minetest.register_node(":multidecor:desert_wolfram_ore", {
|
|||
}
|
||||
}
|
||||
},
|
||||
groups = {cracky=3.5},
|
||||
groups = {cracky=2.5},
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
|
@ -76,3 +76,82 @@ minetest.register_craft({
|
|||
recipe = "multidecor:wolfram_ore",
|
||||
cooktime = 8
|
||||
})
|
||||
|
||||
minetest.register_node(":multidecor:zinc_ore", {
|
||||
description = "Zinc Ore",
|
||||
tiles = {"default_stone.png^multidecor_zinc_mineral.png"},
|
||||
is_ground_content = true,
|
||||
paramtype = "light",
|
||||
light_source = 6,
|
||||
drop = {
|
||||
max_items = 5,
|
||||
items = {
|
||||
{
|
||||
rarity = 1000,
|
||||
items = {"multidecor:zinc_fragment"}
|
||||
}
|
||||
}
|
||||
},
|
||||
groups = {cracky=3.5},
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node(":multidecor:desert_zinc_ore", {
|
||||
description = "Desert Zinc Ore",
|
||||
tiles = {"default_desert_stone.png^multidecor_zinc_mineral.png"},
|
||||
is_ground_content = true,
|
||||
paramtype = "light",
|
||||
light_source = 6,
|
||||
drop = {
|
||||
max_items = 5,
|
||||
items = {
|
||||
{
|
||||
rarity = 1000,
|
||||
items = {"multidecor:zinc_lump"}
|
||||
}
|
||||
}
|
||||
},
|
||||
groups = {cracky=3.5},
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "multidecor:zinc_ore",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 400,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
height_min = -31000,
|
||||
height_max = -125
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "multidecor:desert_zinc_ore",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 400,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
height_min = -31000,
|
||||
height_max = -125
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":multidecor:zinc_fragment",
|
||||
{
|
||||
description = "Zinc Fragment",
|
||||
inventory_image = "multidecor_zinc_fragment.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":multidecor:zinc_ingot",
|
||||
{
|
||||
description = "Zinc Ingot",
|
||||
inventory_image = "multidecor_zinc_ingot.png"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "multidecor:zinc_ingot",
|
||||
recipe = "multidecor:zinc_fragment",
|
||||
cooktime = 5
|
||||
})
|
||||
|
|
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 5.2 KiB |
|
@ -78,6 +78,7 @@ function connecting.replace_node_to(pos, disconnect)
|
|||
end
|
||||
minetest.debug("target_node: " .. target_node)
|
||||
target_node = target_node ~= "" and "_" .. target_node or ""
|
||||
|
||||
if not disconnect and target_node == "" then
|
||||
return
|
||||
end
|
||||
|
@ -103,18 +104,13 @@ function connecting.directional_replace_node_to(pos, dir, side, disconnect)
|
|||
local dir_rot = math.deg(vector.dir_to_rotation(dir).y)
|
||||
local dir_rot2 = math.deg(vector.dir_to_rotation(helpers.get_dir(pos)).y)
|
||||
|
||||
minetest.debug("side: " .. dump(side))
|
||||
minetest.debug("dir_rot: " .. dir_rot)
|
||||
minetest.debug("dir_rot2: " .. dir_rot2)
|
||||
local is_left_corner = add_props.connect_parts.left_side == def.mesh and side == "right" and
|
||||
dir_rot-90 == dir_rot2
|
||||
local is_right_corner = add_props.connect_parts.right_side == def.mesh and side == "left" and
|
||||
dir_rot+90 == dir_rot2
|
||||
if is_left_corner then
|
||||
--minetest.debug("left corner")
|
||||
right_dir = dir
|
||||
elseif is_right_corner then
|
||||
--minetest.debug("right corner")
|
||||
left_dir = dir
|
||||
end
|
||||
|
||||
|
|
|
@ -35,7 +35,8 @@ function register.register_light(name, base_def, add_def, craft_def)
|
|||
end
|
||||
|
||||
local sound_off
|
||||
if def.add_properties then
|
||||
local are_props = def.add_properties and def.add_properties.swap_light
|
||||
if are_props then
|
||||
sound_off = def.add_properties.swap_light.sound_off or "multidecor_light_off"
|
||||
def.add_properties.swap_light.sound = def.add_properties.swap_light.sound_on or "multidecor_light_on"
|
||||
def.add_properties.swap_light.sound_on = nil
|
||||
|
@ -44,7 +45,7 @@ function register.register_light(name, base_def, add_def, craft_def)
|
|||
|
||||
register.register_furniture_unit(name, def, craft_def)
|
||||
|
||||
if def.add_properties then
|
||||
if are_props then
|
||||
local def2 = table.copy(def)
|
||||
local swap_light_name = def2.add_properties.swap_light.name
|
||||
def2.light_source = def2.add_properties.swap_light.light_level or 8
|
||||
|
|
|
@ -87,6 +87,7 @@ register.register_table("dresser_with_mirror", {
|
|||
visual_scale = 0.5,
|
||||
mesh = "multidecor_dresser_with_mirror.b3d",
|
||||
tiles = {"multidecor_aspen_wood.png", "multidecor_gloss.png"},
|
||||
inventory_image = "multidecor_dresser_with_mirror_inv.png",
|
||||
use_texture_alpha = "blend",
|
||||
bounding_boxes = {
|
||||
{-0.5, -0.5, -0.5, 1.5, 0.5, 0.5}
|
||||
|
|
|
@ -193,3 +193,34 @@ register.register_light("metal_chandelier_with_plastic_plafonds_off", {
|
|||
{"multidecor:metal_bar", "", ""}
|
||||
}
|
||||
})
|
||||
|
||||
register.register_light("brass_candlestick", {
|
||||
style = "modern",
|
||||
material = "metal",
|
||||
description = "Brass Candlestick",
|
||||
visual_scale = 0.5,
|
||||
use_texture_alpha = "blend",
|
||||
light_source = 10,
|
||||
mesh = "multidecor_brass_candlestick.b3d",
|
||||
tiles = {
|
||||
"multidecor_brass_material.png",
|
||||
"multidecor_candle.png",
|
||||
{name="multidecor_flame_anim.png", animation={
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 3.0
|
||||
}}
|
||||
},
|
||||
bounding_boxes = {
|
||||
{-0.25, -0.5, -0.25, 0.25, -0.4, 0.25},
|
||||
{-0.1, -0.4, -0.1, 0.1, 0.125, 0.1}
|
||||
},
|
||||
},
|
||||
{
|
||||
recipe = {
|
||||
{"multidecor:steel_sheet", "multidecor:steel_sheet", "multidecor:brass_ingot"},
|
||||
{"", "", ""},
|
||||
{"", "", ""}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -15,3 +15,74 @@ register.register_furniture_unit("modern_floor_clock", {
|
|||
},
|
||||
bounding_boxes = {{-0.4, -0.5, -0.3, 0.4, 2, 0.4}}
|
||||
})
|
||||
|
||||
|
||||
register.register_furniture_unit("book", {
|
||||
type = "decoration",
|
||||
style = "modern",
|
||||
material = "wood",
|
||||
visual_scale = 0.5,
|
||||
description = "Book",
|
||||
mesh = "multidecor_book.b3d",
|
||||
tiles = {
|
||||
"multidecor_book_envelope.png^[multiply:blue^multidecor_book_pattern.png",
|
||||
"multidecor_book.png"
|
||||
},
|
||||
bounding_boxes = {{-0.2, -0.5, -0.3, 0.2, -0.35, 0.3}}
|
||||
},
|
||||
{
|
||||
recipe = {
|
||||
{"default:paper", "default:paper", "dye:blue"},
|
||||
{"default:paper", "default:paper", "default:paper"},
|
||||
{"default:paper", "default:paper", "default:paper"}
|
||||
}
|
||||
})
|
||||
|
||||
register.register_furniture_unit("books_stack", {
|
||||
type = "decoration",
|
||||
style = "modern",
|
||||
material = "wood",
|
||||
visual_scale = 0.5,
|
||||
description = "Books Stack",
|
||||
mesh = "multidecor_books_stack.b3d",
|
||||
tiles = {
|
||||
"multidecor_book_envelope.png^[multiply:green^multidecor_book_pattern.png",
|
||||
"multidecor_book.png",
|
||||
"multidecor_book_envelope.png^[multiply:blueviolet^multidecor_book_pattern.png",
|
||||
"multidecor_book_envelope.png^[multiply:red",
|
||||
"multidecor_book_envelope.png^[multiply:darkorange^multidecor_book_pattern2.png",
|
||||
},
|
||||
bounding_boxes = {{-0.2, -0.5, -0.3, 0.2, -0.1, 0.3}}
|
||||
},
|
||||
{
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"multidecor:book", "multidecor:book",
|
||||
"multidecor:book", "multidecor:book"
|
||||
}
|
||||
})
|
||||
|
||||
register.register_furniture_unit("alarm_clock", {
|
||||
type = "decoration",
|
||||
style = "modern",
|
||||
material = "plastic",
|
||||
visual_scale = 0.5,
|
||||
description = "Alarm Clock",
|
||||
mesh = "multidecor_alarm_clock.b3d",
|
||||
tiles = {
|
||||
"multidecor_plastic_material.png^[multiply:green",
|
||||
"multidecor_metal_material.png",
|
||||
"multidecor_digital_dial.png",
|
||||
"multidecor_glass_material.png"
|
||||
},
|
||||
use_texture_alpha = "blend",
|
||||
bounding_boxes = {{-0.25, -0.5, -0.175, 0.25, 0.1, 0.175}}
|
||||
},
|
||||
{
|
||||
recipe = {
|
||||
{"multidecor:steel_sheet", "multidecor:steel_sheet", "dye:green"},
|
||||
{"multidecor:plastic_sheet", "multidecor:digital_dial", "multidecor:plastic_sheet"},
|
||||
{"", "multidecor:plastic_sheet", ""}
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -9,29 +9,73 @@ local frame_types = {
|
|||
|
||||
local materials = {"wood", "plastic"}
|
||||
|
||||
local dyes = {
|
||||
"black",
|
||||
"blue",
|
||||
"brown",
|
||||
"cyan",
|
||||
"dark_green",
|
||||
"dark_grey",
|
||||
"green",
|
||||
"grey",
|
||||
"magenta",
|
||||
"orange",
|
||||
"pink",
|
||||
"red",
|
||||
"violet",
|
||||
"white",
|
||||
"yellow"
|
||||
}
|
||||
|
||||
local bbox = {-0.5, -0.5, 0.35, 0.5, 0.5, 0.5}
|
||||
|
||||
local images = {
|
||||
--{<image_name>, <frame_types_i>, <materials_i>, <size>}
|
||||
{"alps", 1, 1, 1},
|
||||
{"cactus_valley", 1, 2, 1},
|
||||
{"cefeus", 1, 2, 1},
|
||||
{"chamomile", 4, 1, 1},
|
||||
{"dark_forest", 2, 1, 1},
|
||||
{"elk", 1, 2, 1},
|
||||
{"forest", 4, 1, 1},
|
||||
{"jupiter_and_saturn", 2, 2, 2},
|
||||
{"minetest_castle", 5, 1, 1},
|
||||
{"minetest_logo", 1, 2, 1},
|
||||
{"prairie", 1, 1, 1},
|
||||
{"rose", 4, 1, 1},
|
||||
{"ship_in_lava", 4, 1, 2},
|
||||
{"sky", 3, 2, 1},
|
||||
{"sunset_in_sea", 6, 1, 1},
|
||||
{"supernova", 3, 1, 2},
|
||||
{"tropic", 2, 2, 1}
|
||||
{"alps", 1, 1, 1, {4, 5, 8, 14, 6}},
|
||||
{"cactus_valley", 1, 2, 1, {3, 7, 14, 15, 11}},
|
||||
{"cefeus", 1, 2, 1, {1, 14, 8, 13}},
|
||||
{"chamomile", 4, 1, 1, {7, 14, 15, 10}},
|
||||
{"dark_forest", 2, 1, 1, {1, 2, 13, 5, 4}},
|
||||
{"elk", 1, 2, 1, {15, 7, 3, 14}},
|
||||
{"forest", 4, 1, 1, {15, 3, 7, 14}},
|
||||
{"jupiter_and_saturn", 2, 2, 2, {1, 3, 12, 11, 15}},
|
||||
{"minetest_castle", 5, 1, 1, {4, 14, 8, 3, 2}},
|
||||
{"minetest_logo", 1, 2, 1, {2, 5, 14, 15, 4}},
|
||||
{"prairie", 1, 1, 1, {15, 4, 14, 2}},
|
||||
{"rose", 4, 1, 1, {12, 5, 11, 7}},
|
||||
{"ship_in_lava", 4, 1, 2, {1, 12, 10, 15, 2}},
|
||||
{"sky", 3, 2, 1, {4, 14, 12, 15, 7}},
|
||||
{"sunset_in_sea", 6, 1, 1, {14, 15, 2, 13}},
|
||||
{"supernova", 3, 1, 2, {1, 11, 14, 13}},
|
||||
{"tropic", 2, 2, 1, {4, 2, 7, 5, 14}}
|
||||
}
|
||||
|
||||
local function painting_craft_recipe(inds)
|
||||
local recipe = {
|
||||
{"", "", ""},
|
||||
{"", "multidecor:painting_frame", ""},
|
||||
{"", "", ""}
|
||||
}
|
||||
|
||||
local c = 0
|
||||
local n = 0
|
||||
for i, dye_i in ipairs(inds) do
|
||||
n = n + 1
|
||||
if i == 5 then
|
||||
n = n+1
|
||||
c = c+1
|
||||
end
|
||||
|
||||
if c == 3 then
|
||||
c = 0
|
||||
end
|
||||
|
||||
c = c + 1
|
||||
recipe[math.ceil(n/3)][c] = "dye:" .. dyes[dye_i]
|
||||
end
|
||||
|
||||
return recipe
|
||||
end
|
||||
|
||||
for _, img in ipairs(images) do
|
||||
local img_bbox = table.copy(bbox)
|
||||
|
@ -68,5 +112,24 @@ for _, img in ipairs(images) do
|
|||
mesh = "multidecor_" .. mesh .. ".b3d",
|
||||
tiles = {base_tile, "multidecor_image_" .. img[1] .. ".png"},
|
||||
bounding_boxes = {img_bbox}
|
||||
},
|
||||
{
|
||||
recipe = painting_craft_recipe(img[5])
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
minetest.register_craftitem(":multidecor:painting_frame", {
|
||||
description = "Painting Frame",
|
||||
inventory_image = "multidecor_painting_frame.png"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "multidecor:painting_frame",
|
||||
recipe = {
|
||||
{"default:paper", "multidecor:plank", "multidecor:saw"},
|
||||
{"", "", ""},
|
||||
{"", "", ""}
|
||||
},
|
||||
replacements = {{"multidecor:saw", "multidecor:saw"}}
|
||||
})
|
||||
|
|
|
@ -86,9 +86,9 @@ for _, wood_n in ipairs({"", "jungle", "pine", "aspen"}) do
|
|||
{-0.5, 0, 0.15, -0.4, -0.5, 0.4},
|
||||
{0.4, 0, 0.15, 0.5, -0.5, 0.4}
|
||||
}
|
||||
}--[[,
|
||||
},
|
||||
{
|
||||
type = "shapeless",
|
||||
recipe = {"multidecor:" .. wood_n .. "plank", "multidecor:" .. wood_n .. "plank"}
|
||||
}]])
|
||||
recipe = {"multidecor:modern_wooden_" .. wood_n .. "wall_shelf", "multidecor:books_stack"}
|
||||
})
|
||||
end
|
||||
|
|
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 867 B |