mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2025-07-30 10:20:21 +02:00
Compare commits
59 Commits
stair_comp
...
8f8552b77d
Author | SHA1 | Date | |
---|---|---|---|
8f8552b77d | |||
89703525e6 | |||
15300a4413 | |||
2c08c1f97b | |||
6bbaa7491d | |||
b4297d68a0 | |||
77f2b0e05b | |||
9c7eb2e502 | |||
55bbd478d9 | |||
0384943a0a | |||
33710f710b | |||
8893d66dc6 | |||
a598fa3067 | |||
0f8f31d5c8 | |||
78114b83cf | |||
6fa1bbeb1c | |||
0403f47f86 | |||
0f57b2268a | |||
806c8c5e78 | |||
37bc0ed58d | |||
0a605bdb96 | |||
6cd70d2759 | |||
3b98245930 | |||
97d4c65230 | |||
acf17f2ba4 | |||
d667e39851 | |||
5ffdc26673 | |||
70381161fd | |||
680f8e8995 | |||
3d63271855 | |||
e0bc27c825 | |||
2814f672f0 | |||
2ba84b1e3c | |||
00d935de60 | |||
6700f2b935 | |||
6e973c3830 | |||
177a97eab3 | |||
a832b66977 | |||
df9e8aea4b | |||
99a01301a8 | |||
2ef259fa24 | |||
caaa963eaf | |||
e5866b7928 | |||
b6ecc0b95f | |||
320cd1d449 | |||
3675e9c266 | |||
3567b42c39 | |||
bd67ba2499 | |||
5612f4c884 | |||
7bcfbbca3a | |||
e372ccb4d8 | |||
5c6a994698 | |||
1eec6e3615 | |||
0753606eb0 | |||
778b5493c7 | |||
fb0ca9a15c | |||
1520d27a73 | |||
5d4c64d3b2 | |||
4eb9ffb088 |
@ -8,16 +8,9 @@ if minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs") then
|
||||
end
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
minetest.register_alias_force("moreblocks:tar", "building_blocks:Tar")
|
||||
stairsplus:register_alias_all("building_blocks", "tar", "building_blocks", "Tar")
|
||||
stairsplus:register_alias_all("building_blocks", "marble", "building_blocks", "Marble")
|
||||
for _, i in ipairs(stairsplus.shapes_list) do
|
||||
local class = i[1]
|
||||
local cut = i[2]
|
||||
minetest.unregister_item("moreblocks:"..class.."tar"..cut)
|
||||
minetest.register_alias("moreblocks:"..class.."tar"..cut, "building_blocks:"..class.."tar"..cut)
|
||||
end
|
||||
minetest.unregister_item("moreblocks:tar")
|
||||
minetest.register_alias("moreblocks:tar", "building_blocks:Tar")
|
||||
stairsplus:register_alias_all("moreblocks", "tar", "building_blocks", "Tar")
|
||||
|
||||
if minetest.get_modpath("gloopblocks") then
|
||||
@ -40,7 +33,8 @@ if not minetest.get_modpath("technic") then
|
||||
description = S("Granite"),
|
||||
tiles = { "technic_granite.png" },
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1, dig_stone=2},
|
||||
groups = {cracky=1, dig_stone=2, pickaxey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_stone_defaults",
|
||||
},
|
||||
|
@ -4,3 +4,6 @@ dofile(modpath.."/alias.lua")
|
||||
dofile(modpath.."/node_stairs.lua")
|
||||
dofile(modpath.."/others.lua")
|
||||
dofile(modpath.."/recipes.lua")
|
||||
|
||||
minetest.log("action", "[building_blocks] loaded.")
|
||||
|
||||
|
@ -1,6 +1,18 @@
|
||||
local S = minetest.get_translator("building_blocks")
|
||||
|
||||
local function building_blocks_stairs(nodename, def)
|
||||
|
||||
if def.groups and (def.groups.crumbly or def.groups.oddly_breakable_by_hand) then
|
||||
def.groups["handy"]=1
|
||||
def._mcl_hardness=0.6
|
||||
elseif def.groups and (def.groups.snappy or def.groups.choppy) then
|
||||
def.groups["axey"]=5
|
||||
def._mcl_hardness=1.6
|
||||
elseif def.groups and (def.groups.cracky or def.groups.crumbly) then
|
||||
def.groups["pickaxey"]=5
|
||||
def._mcl_hardness=1.6
|
||||
end
|
||||
|
||||
minetest.register_node(nodename, def)
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
local mod, name = nodename:match("(.*):(.*)")
|
||||
@ -64,7 +76,7 @@ building_blocks_stairs("building_blocks:Adobe", {
|
||||
})
|
||||
local grasstex = {"[combine:16x16^[noalpha^[colorize:#006400"}
|
||||
if minetest.get_modpath("default") then
|
||||
grasstex = minetest.registered_nodes["default:dirt_with_grass"].tiles
|
||||
grasstex = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"}
|
||||
end
|
||||
building_blocks_stairs("building_blocks:fakegrass", {
|
||||
tiles = grasstex,
|
||||
@ -128,7 +140,8 @@ minetest.register_node("building_blocks:brobble_spread", {
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3, dig_generic=4},
|
||||
groups = {crumbly=3, dig_generic=4, handy=1},
|
||||
_mcl_hardness=0.6
|
||||
})
|
||||
|
||||
if not minetest.get_modpath("moreblocks") or not minetest.get_modpath("gloopblocks") then
|
||||
@ -150,7 +163,8 @@ if not minetest.get_modpath("moreblocks") or not minetest.get_modpath("gloopbloc
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=2, dig_generic=4},
|
||||
groups = {crumbly=2, dig_generic=4, handy=1},
|
||||
_mcl_hardness=0.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_dirt_defaults",
|
||||
},
|
||||
@ -171,7 +185,8 @@ minetest.register_node("building_blocks:Tarmac_spread", {
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, dig_generic=4},
|
||||
groups = {cracky=3, dig_generic=4, pickaxey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_dirt_defaults",
|
||||
},
|
||||
@ -190,7 +205,8 @@ minetest.register_node("building_blocks:terrycloth_towel", {
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3, dig_generic=4},
|
||||
groups = {crumbly=3, dig_generic=4, handy=1},
|
||||
_mcl_hardness=0.6
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:BWtile", {
|
||||
@ -213,7 +229,8 @@ minetest.register_node("building_blocks:BWtile", {
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3, dig_generic=4},
|
||||
groups = {crumbly=3, dig_generic=4, handy=1},
|
||||
_mcl_hardness=0.6
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:Fireplace", {
|
||||
@ -229,7 +246,8 @@ minetest.register_node("building_blocks:Fireplace", {
|
||||
light_source = minetest.LIGHT_MAX,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2, dig_generic=4},
|
||||
groups = {cracky=2, dig_generic=4, pickaxey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_stone_defaults",
|
||||
},
|
||||
|
@ -1,5 +1,7 @@
|
||||
local S = minetest.get_translator("fake_fire")
|
||||
|
||||
local fake_fire_reload_particles_nodes = {}
|
||||
|
||||
local function fire_particles_on(pos) -- 3 layers of fire
|
||||
local meta = minetest.get_meta(pos)
|
||||
local id1 = minetest.add_particlespawner({ -- 1 layer big particles fire
|
||||
@ -142,7 +144,8 @@ minetest.register_node("fake_fire:ice_fire", {
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_generic=3},
|
||||
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_generic=3, handy=1},
|
||||
_mcl_hardness=0.6,
|
||||
sunlight_propagates = true,
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
@ -182,7 +185,8 @@ minetest.register_node("fake_fire:fancy_fire", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "clip",
|
||||
groups = {oddly_breakable_by_hand=3, flammable=0},
|
||||
groups = {oddly_breakable_by_hand=3, flammable=0, handy=1},
|
||||
_mcl_hardness=0.6,
|
||||
sunlight_propagates = true,
|
||||
light_source = 13,
|
||||
walkable = false,
|
||||
@ -226,7 +230,8 @@ minetest.register_node("fake_fire:embers", {
|
||||
aspect_w=16, aspect_h=16, length=2}},
|
||||
},
|
||||
light_source = 9,
|
||||
groups = {crumbly=3, dig_stone=2},
|
||||
groups = {crumbly=3, dig_stone=2, handy=1},
|
||||
_mcl_hardness=0.6,
|
||||
paramtype = "light",
|
||||
_sound_def = {
|
||||
key = "node_sound_dirt_defaults",
|
||||
@ -253,10 +258,12 @@ local materials = {
|
||||
|
||||
for _, mat in ipairs(materials) do
|
||||
local name, desc, tex = unpack(mat)
|
||||
table.insert(fake_fire_reload_particles_nodes, "fake_fire:chimney_top_"..name)
|
||||
minetest.register_node("fake_fire:chimney_top_"..name, {
|
||||
description = desc,
|
||||
tiles = {tex.."^chimney_top.png", tex},
|
||||
groups = {snappy=3, dig_stone=2},
|
||||
groups = {snappy=3, dig_stone=2, handy=1},
|
||||
_mcl_hardness=0.6,
|
||||
paramtype = "light",
|
||||
_sound_def = {
|
||||
key = "node_sound_stone_defaults",
|
||||
@ -326,10 +333,25 @@ minetest.register_alias("fake_fire:flint", "fake_fire:flint_and_steel")
|
||||
minetest.register_lbm({
|
||||
name = "fake_fire:reload_particles",
|
||||
label = "restart fire particles on reload",
|
||||
nodenames = {"fake_fire:fancy_fire"},
|
||||
nodenames = { "fake_fire:fancy_fire" },
|
||||
run_at_every_load = true,
|
||||
action = function(pos, node)
|
||||
fire_particles_off(pos)
|
||||
fire_particles_on(pos)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "fake_fire:reload_particles_chimney",
|
||||
label = "restart chimney smoke on reload",
|
||||
nodenames = fake_fire_reload_particles_nodes,
|
||||
run_at_every_load = true,
|
||||
action = function(pos, node)
|
||||
if minetest.get_meta(pos):get_int("smoky") ~= 0 then
|
||||
stop_smoke(pos)
|
||||
start_fire_effects(pos, node, nil, 1)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.log("action", "[fake_fire] loaded.")
|
||||
|
@ -94,16 +94,22 @@ if minetest.get_modpath("doors") then
|
||||
local def
|
||||
for _,mat in ipairs({"wood", "steel"}) do
|
||||
def = table.copy(minetest.registered_nodes["doors:door_"..mat.."_a"])
|
||||
def.groups.handy = 1
|
||||
def._mcl_hardness=0.6
|
||||
def.mesh = "homedecor_3d_door_"..mat.."_a.obj"
|
||||
minetest.register_node(":doors:door_"..mat.."_a", def)
|
||||
|
||||
def = table.copy(minetest.registered_nodes["doors:door_"..mat.."_b"])
|
||||
def.groups.handy = 1
|
||||
def._mcl_hardness=0.6
|
||||
def.mesh = "homedecor_3d_door_"..mat.."_b.obj"
|
||||
minetest.register_node(":doors:door_"..mat.."_b", def)
|
||||
end
|
||||
|
||||
for _,mat in ipairs({"", "_steel"}) do
|
||||
def = table.copy(minetest.registered_nodes["doors:trapdoor"..mat])
|
||||
def.groups.handy = 1
|
||||
def._mcl_hardness=0.6
|
||||
def.drawtype = "mesh"
|
||||
def.mesh = "homedecor_3d_trapdoor"..mat..".obj"
|
||||
def.tiles = {
|
||||
@ -113,6 +119,8 @@ if minetest.get_modpath("doors") then
|
||||
minetest.register_node(":doors:trapdoor"..mat, def)
|
||||
|
||||
def = table.copy(minetest.registered_nodes["doors:trapdoor"..mat.."_open"])
|
||||
def.groups.handy = 1
|
||||
def._mcl_hardness=0.6
|
||||
def.mesh = "homedecor_3d_trapdoor"..mat.."_open.obj"
|
||||
def.drawtype = "mesh"
|
||||
def.tiles = {
|
||||
@ -123,3 +131,6 @@ if minetest.get_modpath("doors") then
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
minetest.log("action", "[homedecor_3d_extra] loaded.")
|
||||
|
||||
|
@ -106,7 +106,7 @@ homedecor.register("towel_rod", {
|
||||
walkable = false,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,dig_tree=2},
|
||||
_sound_def = {
|
||||
key = "node_sound_defaults",
|
||||
key = "node_sound_default",
|
||||
},
|
||||
crafts = {
|
||||
{
|
||||
@ -274,7 +274,7 @@ homedecor.register("toilet_paper", {
|
||||
walkable = false,
|
||||
groups = {snappy=3,oddly_breakable_by_hand=3, dig_stone = 2},
|
||||
_sound_def = {
|
||||
key = "node_sound_defaults",
|
||||
key = "node_sound_default",
|
||||
},
|
||||
crafts = {
|
||||
{
|
||||
|
@ -101,7 +101,7 @@ homedecor.register("bed_extended", {
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
selection_box = bed_sbox,
|
||||
node_box = bed_cbox,
|
||||
groups = {snappy=3, ud_param2_colorable = 1, dig_generic=2},
|
||||
groups = {snappy=3, ud_param2_colorable = 1, dig_generic=2, not_in_creative_inventory=1},
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
},
|
||||
|
@ -194,7 +194,7 @@ minetest.register_on_player_receive_fields(function(player, form_name, fields)
|
||||
meta:set_string("infotext", fields.title)
|
||||
end
|
||||
minetest.log("action", S("@1 has written in a book (title: \"@2\"): \"@3\" at location @4",
|
||||
player:get_player_name(), fields.title, fields.text, minetest.pos_to_string(player:getpos())))
|
||||
player:get_player_name(), fields.title, fields.text, minetest.pos_to_string(player:get_pos())))
|
||||
|
||||
player_current_book[player_name] = nil
|
||||
return true
|
||||
|
@ -47,13 +47,13 @@ local add_mesh_desk_fan_entity = function(pos)
|
||||
local param2 = minetest.get_node(pos).param2
|
||||
local entity = minetest.add_entity(pos, "homedecor:mesh_desk_fan")
|
||||
if param2 == 0 then
|
||||
entity:setyaw(3.142) -- 180 degrees
|
||||
entity:set_yaw(3.142) -- 180 degrees
|
||||
elseif minetest.get_node(pos).param2 == 1 then
|
||||
entity:setyaw(3.142/2) -- 90 degrees
|
||||
entity:set_yaw(3.142/2) -- 90 degrees
|
||||
elseif minetest.get_node(pos).param2 == 3 then
|
||||
entity:setyaw((-3.142/2)) -- 270 degrees
|
||||
entity:set_yaw((-3.142/2)) -- 270 degrees
|
||||
else
|
||||
entity:setyaw(0)
|
||||
entity:set_yaw(0)
|
||||
end
|
||||
return entity
|
||||
end
|
||||
|
@ -91,16 +91,6 @@ function homedecor.register_furnace(name, furnacedef)
|
||||
|
||||
local description = furnacedef.description or S("Furnace")
|
||||
|
||||
local furnace_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", make_formspec(furnacedef, 0))
|
||||
meta:set_string("infotext", description)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("fuel", 1)
|
||||
inv:set_size("src", 1)
|
||||
inv:set_size("dst", furnacedef.output_slots)
|
||||
end
|
||||
|
||||
local furnace_allow_put = function(pos, listname, index, stack, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
@ -139,6 +129,191 @@ function homedecor.register_furnace(name, furnacedef)
|
||||
end
|
||||
end
|
||||
|
||||
local n_active = name.."_active"
|
||||
local nname, name_active = "homedecor:"..name, "homedecor:"..n_active
|
||||
|
||||
local function furnace_node_timer(pos, elapsed)
|
||||
--
|
||||
-- Initialize metadata
|
||||
--
|
||||
local meta = minetest.get_meta(pos)
|
||||
local fuel_time = meta:get_float("fuel_time") or 0
|
||||
local src_time = meta:get_float("src_time") or 0
|
||||
local fuel_totaltime = meta:get_float("fuel_totaltime") or 0
|
||||
|
||||
local inv = meta:get_inventory()
|
||||
local srclist, fuellist
|
||||
local dst_full = false
|
||||
|
||||
local timer_elapsed = meta:get_int("timer_elapsed") or 0
|
||||
meta:set_int("timer_elapsed", timer_elapsed + 1)
|
||||
|
||||
local cookable, cooked
|
||||
local fuel
|
||||
|
||||
local update = true
|
||||
while elapsed > 0 and update do
|
||||
update = false
|
||||
|
||||
srclist = inv:get_list("src")
|
||||
fuellist = inv:get_list("fuel")
|
||||
|
||||
--
|
||||
-- Cooking
|
||||
--
|
||||
|
||||
-- Check if we have cookable content
|
||||
local aftercooked
|
||||
cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
||||
cookable = cooked.time ~= 0
|
||||
|
||||
local el = math.min(elapsed, fuel_totaltime - fuel_time)
|
||||
if cookable then -- fuel lasts long enough, adjust el to cooking duration
|
||||
el = math.min(el, cooked.time - src_time)
|
||||
end
|
||||
|
||||
-- Check if we have enough fuel to burn
|
||||
if fuel_time < fuel_totaltime then
|
||||
-- The furnace is currently active and has enough fuel
|
||||
fuel_time = fuel_time + el
|
||||
-- If there is a cookable item then check if it is ready yet
|
||||
if cookable then
|
||||
src_time = src_time + el
|
||||
if src_time >= cooked.time then
|
||||
-- Place result in dst list if possible
|
||||
if inv:room_for_item("dst", cooked.item) then
|
||||
inv:add_item("dst", cooked.item)
|
||||
inv:set_stack("src", 1, aftercooked.items[1])
|
||||
src_time = src_time - cooked.time
|
||||
update = true
|
||||
else
|
||||
dst_full = true
|
||||
end
|
||||
else
|
||||
-- Item could not be cooked: probably missing fuel
|
||||
update = true
|
||||
end
|
||||
end
|
||||
else
|
||||
-- Furnace ran out of fuel
|
||||
if cookable then
|
||||
-- We need to get new fuel
|
||||
local afterfuel
|
||||
fuel, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist})
|
||||
|
||||
if fuel.time == 0 then
|
||||
-- No valid fuel in fuel list
|
||||
fuel_totaltime = 0
|
||||
src_time = 0
|
||||
else
|
||||
-- prevent blocking of fuel inventory (for automatization mods)
|
||||
local is_fuel = minetest.get_craft_result({method = "fuel", width = 1, items = {afterfuel.items[1]:to_string()}})
|
||||
if is_fuel.time == 0 then
|
||||
table.insert(fuel.replacements, afterfuel.items[1])
|
||||
inv:set_stack("fuel", 1, "")
|
||||
else
|
||||
-- Take fuel from fuel list
|
||||
inv:set_stack("fuel", 1, afterfuel.items[1])
|
||||
end
|
||||
-- Put replacements in dst list or drop them on the furnace.
|
||||
local replacements = fuel.replacements
|
||||
if replacements[1] then
|
||||
local leftover = inv:add_item("dst", replacements[1])
|
||||
if not leftover:is_empty() then
|
||||
local above = vector.new(pos.x, pos.y + 1, pos.z)
|
||||
local drop_pos = minetest.find_node_near(above, 1, {"air"}) or above
|
||||
minetest.item_drop(replacements[1], nil, drop_pos)
|
||||
end
|
||||
end
|
||||
update = true
|
||||
fuel_totaltime = fuel.time + (fuel_totaltime - fuel_time)
|
||||
end
|
||||
else
|
||||
-- We don't need to get new fuel since there is no cookable item
|
||||
fuel_totaltime = 0
|
||||
src_time = 0
|
||||
end
|
||||
fuel_time = 0
|
||||
end
|
||||
|
||||
elapsed = elapsed - el
|
||||
end
|
||||
|
||||
if fuel and fuel_totaltime > fuel.time then
|
||||
fuel_totaltime = fuel.time
|
||||
end
|
||||
if srclist and srclist[1]:is_empty() then
|
||||
src_time = 0
|
||||
end
|
||||
|
||||
--
|
||||
-- Update formspec, infotext and node
|
||||
--
|
||||
local formspec
|
||||
local infotext
|
||||
|
||||
local percent = math.floor(fuel_time / fuel_totaltime * 100)
|
||||
|
||||
local result = false
|
||||
|
||||
local node = minetest.get_node(pos)
|
||||
local locked = node.name:find("_locked$") and "_locked" or ""
|
||||
local desc = minetest.registered_nodes[nname..locked].description
|
||||
|
||||
if fuel_totaltime ~= 0 then
|
||||
formspec = make_formspec(furnacedef, percent)
|
||||
swap_node(pos, name_active .. locked)
|
||||
-- make sure timer restarts automatically
|
||||
result = true
|
||||
else
|
||||
formspec = make_formspec(furnacedef, 0)
|
||||
infotext = S("@1 (out of fuel)", desc)
|
||||
swap_node(pos, nname .. locked)
|
||||
-- stop timer on the inactive furnace
|
||||
minetest.get_node_timer(pos):stop()
|
||||
meta:set_int("timer_elapsed", 0)
|
||||
end
|
||||
|
||||
if not cookable and fuellist and not fuellist[1]:is_empty() then
|
||||
infotext = S("@1 (empty)", desc)
|
||||
end
|
||||
|
||||
if dst_full then
|
||||
infotext = S("@1 (output bins are full)", desc)
|
||||
result = false
|
||||
formspec = make_formspec(furnacedef, 0)
|
||||
swap_node(pos, nname .. locked)
|
||||
-- stop timer on the inactive furnace
|
||||
minetest.get_node_timer(pos):stop()
|
||||
meta:set_int("timer_elapsed", 0)
|
||||
fuel_totaltime, fuel_time, src_time = 0, 0, 0
|
||||
end
|
||||
|
||||
if infotext == nil then
|
||||
infotext = S("@1 (active: @2%)", desc, percent)
|
||||
end
|
||||
|
||||
--
|
||||
-- Set meta values
|
||||
--
|
||||
meta:set_float("fuel_totaltime", fuel_totaltime)
|
||||
meta:set_float("fuel_time", fuel_time)
|
||||
meta:set_float("src_time", src_time)
|
||||
meta:set_string("formspec", formspec)
|
||||
meta:set_string("infotext", infotext)
|
||||
|
||||
return result
|
||||
end
|
||||
|
||||
local furnace_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("fuel", 1)
|
||||
inv:set_size("src", 1)
|
||||
inv:set_size("dst", furnacedef.output_slots)
|
||||
furnace_node_timer(pos, 0)
|
||||
end
|
||||
|
||||
local def = {
|
||||
description = description,
|
||||
tiles = make_tiles(furnacedef.tiles, furnacedef.tile_format, false),
|
||||
@ -152,7 +327,19 @@ function homedecor.register_furnace(name, furnacedef)
|
||||
allow_metadata_inventory_put = furnace_allow_put,
|
||||
allow_metadata_inventory_move = furnace_allow_move,
|
||||
inventory = { lockable = true },
|
||||
is_furnace = true
|
||||
is_furnace = true,
|
||||
on_timer = furnace_node_timer,
|
||||
on_metadata_inventory_move = function(pos)
|
||||
minetest.get_node_timer(pos):start(1.0)
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos)
|
||||
-- start timer function, it will sort out whether furnace can burn or not.
|
||||
minetest.get_node_timer(pos):start(1.0)
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos)
|
||||
-- check whether the furnace is empty or not.
|
||||
minetest.get_node_timer(pos):start(1.0)
|
||||
end
|
||||
}
|
||||
|
||||
local def_active = {
|
||||
@ -170,7 +357,19 @@ function homedecor.register_furnace(name, furnacedef)
|
||||
allow_metadata_inventory_put = furnace_allow_put,
|
||||
allow_metadata_inventory_move = furnace_allow_move,
|
||||
inventory = { lockable = true },
|
||||
is_furnace = true
|
||||
is_furnace = true,
|
||||
on_timer = furnace_node_timer,
|
||||
on_metadata_inventory_move = function(pos)
|
||||
minetest.get_node_timer(pos):start(1.0)
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos)
|
||||
-- start timer function, it will sort out whether furnace can burn or not.
|
||||
minetest.get_node_timer(pos):start(1.0)
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos)
|
||||
-- check whether the furnace is empty or not.
|
||||
minetest.get_node_timer(pos):start(1.0)
|
||||
end
|
||||
}
|
||||
|
||||
if furnacedef.extra_nodedef_fields then
|
||||
@ -180,113 +379,6 @@ function homedecor.register_furnace(name, furnacedef)
|
||||
end
|
||||
end
|
||||
|
||||
local n_active = name.."_active"
|
||||
|
||||
homedecor.register(name, def)
|
||||
homedecor.register(n_active, def_active)
|
||||
|
||||
local nname, name_active = "homedecor:"..name, "homedecor:"..n_active
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {nname, name_active, nname.."_locked", name_active.."_locked"},
|
||||
label = "furnaces",
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.get_meta(pos)
|
||||
for i, pname in ipairs({
|
||||
"fuel_totaltime",
|
||||
"fuel_time",
|
||||
"src_totaltime",
|
||||
"src_time"
|
||||
}) do
|
||||
if meta:get_string(pname) == "" then
|
||||
meta:set_float(pname, 0.0)
|
||||
end
|
||||
end
|
||||
|
||||
local inv = meta:get_inventory()
|
||||
|
||||
local srclist = inv:get_list("src")
|
||||
local cooked = nil
|
||||
local aftercooked
|
||||
|
||||
if srclist then
|
||||
cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
||||
end
|
||||
|
||||
local was_active = false
|
||||
|
||||
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
|
||||
was_active = true
|
||||
meta:set_float("fuel_time", meta:get_float("fuel_time") + 1)
|
||||
meta:set_float("src_time", meta:get_float("src_time") + furnacedef.cook_speed)
|
||||
if cooked and cooked.item and meta:get_float("src_time") >= cooked.time then
|
||||
-- check if there's room for output in "dst" list
|
||||
if inv:room_for_item("dst",cooked.item) then
|
||||
-- Put result in "dst" list
|
||||
inv:add_item("dst", cooked.item)
|
||||
-- take stuff from "src" list
|
||||
inv:set_stack("src", 1, aftercooked.items[1])
|
||||
end
|
||||
meta:set_string("src_time", 0)
|
||||
end
|
||||
end
|
||||
|
||||
-- XXX: Quick patch, make it better in the future.
|
||||
local locked = node.name:find("_locked$") and "_locked" or ""
|
||||
local desc = minetest.registered_nodes[nname..locked].description
|
||||
|
||||
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
|
||||
local percent = math.floor(meta:get_float("fuel_time") /
|
||||
meta:get_float("fuel_totaltime") * 100)
|
||||
meta:set_string("infotext", S("@1 (active: @2%)", desc, percent))
|
||||
swap_node(pos,name_active..locked)
|
||||
meta:set_string("formspec", make_formspec(furnacedef, percent))
|
||||
return
|
||||
end
|
||||
|
||||
local fuel = nil
|
||||
local afterfuel
|
||||
cooked = nil
|
||||
local fuellist = inv:get_list("fuel")
|
||||
srclist = inv:get_list("src")
|
||||
|
||||
if srclist then
|
||||
cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
||||
end
|
||||
if fuellist then
|
||||
fuel, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist})
|
||||
end
|
||||
|
||||
if (not fuel) or (fuel.time <= 0) then
|
||||
meta:set_string("infotext", S("@1 (out of fuel)", desc))
|
||||
swap_node(pos, nname..locked)
|
||||
meta:set_string("formspec", make_formspec(furnacedef, 0))
|
||||
return
|
||||
end
|
||||
|
||||
if cooked.item:is_empty() then
|
||||
if was_active then
|
||||
meta:set_string("infotext", S("@1 (empty)", desc))
|
||||
swap_node(pos, nname..locked)
|
||||
meta:set_string("formspec", make_formspec(furnacedef, 0))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if not inv:room_for_item("dst", cooked.item) then
|
||||
meta:set_string("infotext", S("@1 (output bins are full)", desc))
|
||||
swap_node(pos, nname..locked)
|
||||
meta:set_string("formspec", make_formspec(furnacedef, 0))
|
||||
return
|
||||
end
|
||||
|
||||
meta:set_string("fuel_totaltime", fuel.time)
|
||||
meta:set_string("fuel_time", 0)
|
||||
|
||||
inv:set_stack("fuel", 1, afterfuel.items[1])
|
||||
end,
|
||||
})
|
||||
|
||||
end
|
||||
|
@ -65,6 +65,6 @@ dofile(modpath.."/water_particles.lua")
|
||||
dofile(modpath.."/sit.lua")
|
||||
dofile(modpath.."/crafts.lua")
|
||||
|
||||
if minetest.settings:get_bool("log_mod") then
|
||||
if minetest.settings:get_bool("log_mods") then
|
||||
minetest.log("action", "[HomeDecor API] Loaded!")
|
||||
end
|
||||
|
@ -210,7 +210,7 @@ function homedecor.handle_inventory(name, def, original_def)
|
||||
if lockable then
|
||||
local locked_def = table.copy(original_def)
|
||||
locked_def.description = S("@1 (Locked)", def.description or name)
|
||||
|
||||
locked_def.crafts = nil
|
||||
local locked_inventory = locked_def.inventory
|
||||
locked_inventory.locked = true
|
||||
locked_inventory.lockable = nil -- avoid loops of locked locked stuff
|
||||
|
@ -38,12 +38,13 @@ homedecor.materials = {
|
||||
wool_white = "wool:white",
|
||||
slab_stone = "stairs:slab_stone",
|
||||
slab_wood = "stairs:slab_wood",
|
||||
glass_block = "default_glass",
|
||||
glass_block = "default:glass",
|
||||
glass_bottle = "vessels:glass_bottle",
|
||||
coal_lump = "default:coal_lump",
|
||||
stone = "default:stone",
|
||||
cobble = "default:cobble",
|
||||
brick = "default:brick",
|
||||
obsidian_glass = "default:obsidian_glass",
|
||||
}
|
||||
|
||||
if minetest.get_modpath("moreores") then
|
||||
|
@ -8,6 +8,17 @@ function homedecor.register(name, original_def)
|
||||
|
||||
def.is_furnace = nil
|
||||
|
||||
if def.groups and (def.groups.crumbly or def.groups.oddly_breakable_by_hand) then
|
||||
def.groups["handy"]=1
|
||||
def._mcl_hardness=0.6
|
||||
elseif def.groups and (def.groups.snappy or def.groups.choppy) then
|
||||
def.groups["axey"]=5
|
||||
def._mcl_hardness=1.6
|
||||
elseif def.groups and (def.groups.cracky or def.groups.crumbly) then
|
||||
def.groups["pickaxey"]=5
|
||||
def._mcl_hardness=1.6
|
||||
end
|
||||
|
||||
def.drawtype = def.drawtype
|
||||
or (def.mesh and "mesh")
|
||||
or (def.node_box and "nodebox")
|
||||
@ -121,7 +132,7 @@ function homedecor.register(name, original_def)
|
||||
end
|
||||
|
||||
if cdef.type ~= "toolrepair" and not cdef.output then
|
||||
cdef.output = ":homedecor:" .. name
|
||||
cdef.output = "homedecor:" .. name
|
||||
end
|
||||
|
||||
minetest.register_craft(cdef)
|
||||
|
@ -26,25 +26,25 @@ local door_list = {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sound_open = "homedecor_door_open",
|
||||
sound_close = "homedecor_door_close",
|
||||
mesh = "homedecor_door_fancy.obj"
|
||||
mesh = "homedecor_door_fancy"
|
||||
},
|
||||
{
|
||||
name = "french_oak",
|
||||
description = S("French door, Oak-colored"),
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
mesh = "homedecor_door_french.obj"
|
||||
mesh = "homedecor_door_french"
|
||||
},
|
||||
{
|
||||
name = "french_mahogany",
|
||||
description = S("French door, Mahogany-colored"),
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
mesh = "homedecor_door_french.obj"
|
||||
mesh = "homedecor_door_french"
|
||||
},
|
||||
{
|
||||
name = "french_white",
|
||||
description = S("French door, White"),
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
mesh = "homedecor_door_french.obj"
|
||||
mesh = "homedecor_door_french"
|
||||
},
|
||||
{
|
||||
name = "basic_panel",
|
||||
@ -59,7 +59,7 @@ local door_list = {
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
sound_open = "doors_steel_door_open",
|
||||
sound_close = "doors_steel_door_close",
|
||||
mesh = "homedecor_door_wrought_iron.obj"
|
||||
mesh = "homedecor_door_wrought_iron"
|
||||
},
|
||||
{
|
||||
name = "carolina",
|
||||
@ -74,13 +74,13 @@ local door_list = {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sound_open = "homedecor_door_open",
|
||||
sound_close = "homedecor_door_close",
|
||||
mesh = "homedecor_door_wood_glass_3.obj"
|
||||
mesh = "homedecor_door_wood_glass_3"
|
||||
},
|
||||
{
|
||||
name = "closet_mahogany",
|
||||
description = S("Mahogany Closet Door"),
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
mesh = "homedecor_door_closet.obj"
|
||||
mesh = "homedecor_door_closet"
|
||||
},
|
||||
{
|
||||
name = "closet_oak",
|
||||
@ -93,6 +93,7 @@ local door_list = {
|
||||
local old_doors = {}
|
||||
|
||||
local door_types = {"_a", "_b", "_c", "_d"}
|
||||
local door_conversion = {["_c"]="_a", ["_d"]="_b"}
|
||||
|
||||
local function generate_door(def)
|
||||
local default_settings = {
|
||||
@ -125,14 +126,15 @@ local function generate_door(def)
|
||||
end
|
||||
|
||||
for _, door in ipairs(door_list) do
|
||||
local name = door.name
|
||||
local name, mesh = door.name, door.mesh
|
||||
doors.register("homedecor_" .. name, generate_door(door))
|
||||
|
||||
--hack to get around doors not allowing custom meshes
|
||||
if door.mesh then
|
||||
if mesh then
|
||||
for _, v in pairs(door_types) do
|
||||
if door_conversion[v] then v=door_conversion[v] end
|
||||
minetest.override_item("doors:homedecor_" .. name .. v, {
|
||||
mesh = door.mesh
|
||||
mesh = mesh .. v .. ".obj"
|
||||
})
|
||||
end
|
||||
end
|
||||
@ -244,7 +246,8 @@ for i, g in ipairs(gate_list) do
|
||||
tiles = tiles,
|
||||
paramtype = "light",
|
||||
use_texture_alpha = "clip",
|
||||
groups = {snappy=3},
|
||||
groups = {snappy=3, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
selection_box = {
|
||||
|
@ -362,7 +362,7 @@ homedecor_exterior.shrub_colors = {
|
||||
local shrub_cbox = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
|
||||
for color, color_loc in pairs(homedecor_exterior.shrub_colors) do
|
||||
minetest.register_node(":homedecor:shrubbery_large_"..color, {
|
||||
homedecor.register("shrubbery_large_"..color, {
|
||||
description = S("Shrubbery (large, @1)", color_loc),
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_cube.obj",
|
||||
@ -384,7 +384,7 @@ for color, color_loc in pairs(homedecor_exterior.shrub_colors) do
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node(":homedecor:shrubbery_"..color, {
|
||||
homedecor.register("shrubbery_"..color, {
|
||||
description = S("Shrubbery (@1)", color_loc),
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_shrubbery.obj",
|
||||
|
@ -79,6 +79,15 @@ homedecor.register("chains", {
|
||||
_sound_def = {
|
||||
key = "node_sound_stone_defaults",
|
||||
},
|
||||
crafts = {
|
||||
{
|
||||
output = "homedecor:chains 4",
|
||||
recipe = {
|
||||
{ "steel_ingot","" },
|
||||
{ "homedecor:bars","homedecor:bars" },
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_alias("3dforniture:bars", "homedecor:bars")
|
||||
|
@ -8,6 +8,39 @@ local cutlery_cbox = {
|
||||
}
|
||||
}
|
||||
|
||||
local fdir_to_steampos = {
|
||||
x = { 0.15, 0.275, -0.15, -0.275 },
|
||||
z = { 0.275, -0.15, -0.275, 0.15 }
|
||||
}
|
||||
|
||||
local function sfx(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
local fdir = node.param2
|
||||
if fdir and fdir < 4 then
|
||||
|
||||
local steamx = fdir_to_steampos.x[fdir + 1]
|
||||
local steamz = fdir_to_steampos.z[fdir + 1]
|
||||
|
||||
minetest.add_particlespawner({
|
||||
amount = 1,
|
||||
time = 1,
|
||||
minpos = {x=pos.x - steamx, y=pos.y - 0.35, z=pos.z - steamz},
|
||||
maxpos = {x=pos.x - steamx, y=pos.y - 0.35, z=pos.z - steamz},
|
||||
minvel = {x=-0.003, y=0.01, z=-0.003},
|
||||
maxvel = {x=0.003, y=0.01, z=-0.003},
|
||||
minacc = {x=0.0,y=-0.0,z=-0.0},
|
||||
maxacc = {x=0.0,y=0.003,z=-0.0},
|
||||
minexptime = 2,
|
||||
maxexptime = 5,
|
||||
minsize = 1,
|
||||
maxsize = 1.2,
|
||||
collisiondetection = false,
|
||||
texture = "homedecor_steam.png",
|
||||
})
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
homedecor.register("cutlery_set", {
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_cutlery_set.obj",
|
||||
@ -109,7 +142,7 @@ homedecor.register("wine_rack", {
|
||||
selection_box = wine_cbox,
|
||||
collision_box = wine_cbox,
|
||||
_sound_def = {
|
||||
key = "node_sound_defaults",
|
||||
key = "node_sound_default",
|
||||
},
|
||||
})
|
||||
|
||||
@ -147,7 +180,11 @@ homedecor.register("coffee_maker", {
|
||||
{"basic_materials:plastic_sheet", "basic_materials:heating_element", "basic_materials:plastic_sheet"}
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
on_timer = sfx,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(2)
|
||||
end
|
||||
})
|
||||
|
||||
homedecor.register("toaster", {
|
||||
@ -211,43 +248,6 @@ homedecor.register("toaster_loaf", {
|
||||
drop = "homedecor:toaster"
|
||||
})
|
||||
|
||||
local fdir_to_steampos = {
|
||||
x = { 0.15, 0.275, -0.15, -0.275 },
|
||||
z = { 0.275, -0.15, -0.275, 0.15 }
|
||||
}
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = "homedecor:coffee_maker",
|
||||
label = "sfx",
|
||||
interval = 2,
|
||||
chance = 1,
|
||||
action = function(pos, node)
|
||||
local fdir = node.param2
|
||||
if fdir and fdir < 4 then
|
||||
|
||||
local steamx = fdir_to_steampos.x[fdir + 1]
|
||||
local steamz = fdir_to_steampos.z[fdir + 1]
|
||||
|
||||
minetest.add_particlespawner({
|
||||
amount = 1,
|
||||
time = 1,
|
||||
minpos = {x=pos.x - steamx, y=pos.y - 0.35, z=pos.z - steamz},
|
||||
maxpos = {x=pos.x - steamx, y=pos.y - 0.35, z=pos.z - steamz},
|
||||
minvel = {x=-0.003, y=0.01, z=-0.003},
|
||||
maxvel = {x=0.003, y=0.01, z=-0.003},
|
||||
minacc = {x=0.0,y=-0.0,z=-0.0},
|
||||
maxacc = {x=0.0,y=0.003,z=-0.0},
|
||||
minexptime = 2,
|
||||
maxexptime = 5,
|
||||
minsize = 1,
|
||||
maxsize = 1.2,
|
||||
collisiondetection = false,
|
||||
texture = "homedecor_steam.png",
|
||||
})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- crafting
|
||||
|
||||
minetest.register_craft( {
|
||||
@ -306,3 +306,11 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "homedecor_gastronomy:sfx_init",
|
||||
nodenames = {"homedecor:coffee_maker"},
|
||||
run_at_every_load = false,
|
||||
action = function(pos)
|
||||
minetest.get_node_timer(pos):start(2)
|
||||
end
|
||||
})
|
||||
|
@ -128,3 +128,5 @@ function inbox.get_inbox_insert_formspec(pos)
|
||||
"listring[]"
|
||||
return formspec
|
||||
end
|
||||
|
||||
minetest.log("action", "[inbox] loaded.")
|
||||
|
@ -605,44 +605,56 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:kitchen_cabinet_colorable_steel",
|
||||
recipe = {
|
||||
output = "homedecor:kitchen_cabinet_colorable_with_drawers",
|
||||
recipe = {
|
||||
{"homedecor:kitchen_cabinet_colorable", },
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
local cabinet_types = { "homedecor:kitchen_cabinet_colorable", "homedecor:kitchen_cabinet_colorable_with_drawers" }
|
||||
|
||||
for _, cabinet in ipairs(cabinet_types) do
|
||||
minetest.register_craft({
|
||||
output = cabinet.."_steel",
|
||||
recipe = {
|
||||
{homedecor.materials.steel_ingot, homedecor.materials.steel_ingot, homedecor.materials.steel_ingot},
|
||||
{"", "homedecor:kitchen_cabinet_colorable", ""},
|
||||
}
|
||||
})
|
||||
{"", cabinet, ""},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:kitchen_cabinet_colorable_steel",
|
||||
recipe = {
|
||||
minetest.register_craft({
|
||||
output = cabinet.."_steel",
|
||||
recipe = {
|
||||
{"moreblocks:slab_steelblock_1"},
|
||||
{ "homedecor:kitchen_cabinet_colorable" },
|
||||
}
|
||||
})
|
||||
{cabinet},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:kitchen_cabinet_colorable_marble",
|
||||
recipe = {
|
||||
minetest.register_craft({
|
||||
output = cabinet.."_marble",
|
||||
recipe = {
|
||||
{"building_blocks:slab_marble"},
|
||||
{"homedecor:kitchen_cabinet_colorable"},
|
||||
}
|
||||
})
|
||||
{cabinet},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:kitchen_cabinet_colorable_marble",
|
||||
recipe = {
|
||||
minetest.register_craft({
|
||||
output = cabinet.."_marble",
|
||||
recipe = {
|
||||
{"technic:slab_marble_1"},
|
||||
{"homedecor:kitchen_cabinet_colorable"},
|
||||
}
|
||||
})
|
||||
{cabinet},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:kitchen_cabinet_colorable_granite",
|
||||
recipe = {
|
||||
minetest.register_craft({
|
||||
output = cabinet.."_granite",
|
||||
recipe = {
|
||||
{"technic:slab_granite_1"},
|
||||
{"homedecor:kitchen_cabinet_colorable"},
|
||||
}
|
||||
})
|
||||
{cabinet},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
|
@ -241,7 +241,7 @@ for brightness_level = 0, 14 do
|
||||
}
|
||||
overlay = {
|
||||
{ name = "homedecor_glowlight_top_glare.png", color = "white"},
|
||||
"",
|
||||
{ name = "homedecor_glowlight_top_glare.png", color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
@ -275,7 +275,8 @@ for brightness_level = 0, 14 do
|
||||
wall_side = { -0.5, -0.5, -0.5, 0, 0.5, 0.5 }
|
||||
},
|
||||
node_box = glowlight_nodebox.half,
|
||||
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici, dig_glass=1 },
|
||||
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici, dig_glass=1, axey=5 },
|
||||
_mcl_hardness=1.6,
|
||||
light_source = brightness_level,
|
||||
_sound_def = {
|
||||
key = "node_sound_glass_defaults",
|
||||
@ -309,7 +310,7 @@ for brightness_level = 0, 14 do
|
||||
}
|
||||
overlay = {
|
||||
{ name = "homedecor_glowlight_top_glare.png", color = "white"},
|
||||
"",
|
||||
{ name = "homedecor_glowlight_top_glare.png", color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
@ -343,7 +344,8 @@ for brightness_level = 0, 14 do
|
||||
wall_side = { -0.5, -0.5, -0.5, -0.25, 0.5, 0.5 }
|
||||
},
|
||||
node_box = glowlight_nodebox.quarter,
|
||||
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici, dig_glass=1 },
|
||||
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici, dig_glass=1, axey=5 },
|
||||
_mcl_hardness=1.6,
|
||||
light_source = brightness_level,
|
||||
_sound_def = {
|
||||
key = "node_sound_glass_defaults",
|
||||
@ -378,7 +380,7 @@ for brightness_level = 0, 14 do
|
||||
}
|
||||
overlay = {
|
||||
{ name = "homedecor_glowlight_cube_top_glare.png", color = "white"},
|
||||
"",
|
||||
{ name = "homedecor_glowlight_cube_top_glare.png", color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
{ name = sides_glare, color = "white"},
|
||||
@ -412,7 +414,8 @@ for brightness_level = 0, 14 do
|
||||
wall_side = { -0.5, -0.25, -0.25, 0, 0.25, 0.25 }
|
||||
},
|
||||
node_box = glowlight_nodebox.small_cube,
|
||||
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici, dig_glass=1 },
|
||||
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici, dig_glass=1, axey=5 },
|
||||
_mcl_hardness=1.6,
|
||||
light_source = brightness_level,
|
||||
_sound_def = {
|
||||
key = "node_sound_glass_defaults",
|
||||
@ -865,7 +868,8 @@ for _, light_brightn_name in ipairs({"off", "on"}) do
|
||||
"homedecor:rope_light_on_floor_off",
|
||||
"group:mesecon_conductor_craftable"
|
||||
},
|
||||
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici_m},
|
||||
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici_m, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_stone_defaults",
|
||||
},
|
||||
@ -913,7 +917,8 @@ for _, light_brightn_name in ipairs({"off", "on"}) do
|
||||
"homedecor:rope_light_on_ceiling_off",
|
||||
"group:mesecon_conductor_craftable"
|
||||
},
|
||||
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici_m},
|
||||
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici_m, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_stone_defaults",
|
||||
},
|
||||
@ -1127,7 +1132,8 @@ minetest.register_node(":homedecor:chain_steel_top", {
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
inventory_image = "basic_materials_chain_steel_inv.png",
|
||||
groups = {cracky=3, dig_glass=1},
|
||||
groups = {cracky=3, dig_glass=1, pickaxey=5},
|
||||
_mcl_hardness=1.6,
|
||||
selection_box = topchains_sbox,
|
||||
})
|
||||
|
||||
@ -1141,7 +1147,8 @@ minetest.register_node(":homedecor:chain_brass_top", {
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
inventory_image = "basic_materials_chain_brass_inv.png",
|
||||
groups = {cracky=3, dig_glass=1},
|
||||
groups = {cracky=3, dig_glass=1, pickaxey=5},
|
||||
_mcl_hardness=1.6,
|
||||
selection_box = topchains_sbox,
|
||||
})
|
||||
|
||||
@ -1168,7 +1175,8 @@ minetest.register_node(":homedecor:chandelier_steel", {
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_chandelier.obj",
|
||||
use_texture_alpha = "clip",
|
||||
groups = {cracky=3, dig_glass=1},
|
||||
groups = {cracky=3, dig_glass=1, pickaxey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_stone_defaults",
|
||||
},
|
||||
@ -1197,7 +1205,8 @@ minetest.register_node(":homedecor:chandelier_brass", {
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_chandelier.obj",
|
||||
use_texture_alpha = "clip",
|
||||
groups = {cracky=3, dig_glass=1},
|
||||
groups = {cracky=3, dig_glass=1, pickaxey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_stone_defaults",
|
||||
},
|
||||
@ -1750,6 +1759,22 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:rope_light_on_floor_off",
|
||||
type= "shapeless",
|
||||
recipe = {
|
||||
"homedecor:rope_light_on_ceiling_off"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:rope_light_on_ceiling_off",
|
||||
type= "shapeless",
|
||||
recipe = {
|
||||
homedecor.materials.steel_ingot, "homedecor:ceiling_lamp"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:ceiling_lamp",
|
||||
recipe = {
|
||||
@ -1905,3 +1930,4 @@ if minetest.get_modpath("darkage") then
|
||||
end
|
||||
end
|
||||
|
||||
minetest.log("action", "[homedecor_lightning] loaded.")
|
||||
|
@ -290,6 +290,14 @@ homedecor.register("dvd_cd_cabinet", {
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
},
|
||||
crafts = {
|
||||
{
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"homedecor:dvd_player", "homedecor:kitchen_cabinet_colorable"
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
local pooltable_cbox = {
|
||||
@ -621,7 +629,8 @@ minetest.register_node(":homedecor:tatami_mat", {
|
||||
description = S("Japanese tatami"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
groups = {snappy=3},
|
||||
groups = {snappy=3, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -1020,7 +1029,8 @@ minetest.register_node(":homedecor:japanese_wall_top", {
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
groups = {snappy=3, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
selection_box = jp_cbox,
|
||||
collision_box = jp_cbox,
|
||||
_sound_def = {
|
||||
@ -1038,7 +1048,8 @@ minetest.register_node(":homedecor:japanese_wall_middle", {
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
groups = {snappy=3, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
selection_box = jp_cbox,
|
||||
collision_box = jp_cbox,
|
||||
_sound_def = {
|
||||
@ -1056,7 +1067,8 @@ minetest.register_node(":homedecor:japanese_wall_bottom", {
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=3},
|
||||
groups = {snappy=3, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
selection_box = jp_cbox,
|
||||
collision_box = jp_cbox,
|
||||
_sound_def = {
|
||||
|
@ -128,7 +128,7 @@ homedecor.register("calendar", {
|
||||
groups = {choppy=2,attached_node=1, dig_tree=2},
|
||||
legacy_wallmounted = true,
|
||||
_sound_def = {
|
||||
key = "node_sound_defaults",
|
||||
key = "node_sound_default",
|
||||
},
|
||||
infotext = S("Date (right-click to update):\n@1", os.date("%Y-%m-%d")), -- ISO 8601 format
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
|
@ -183,4 +183,6 @@ minetest.register_alias("plasmascreen:screen6", "air")
|
||||
minetest.register_alias("plasmascreen:screen5", "homedecor:tv")
|
||||
minetest.register_alias("plasmascreen:stand", "homedecor:tv_stand")
|
||||
minetest.register_alias("plasmascreen:tv", "homedecor:tv")
|
||||
minetest.register_alias("plasmascreen:tv_off", "homedecor:tv_off")
|
||||
minetest.register_alias("plasmascreen:tv_off", "homedecor:tv_off")
|
||||
|
||||
minetest.log("action", "[plasmascreen] loaded.")
|
||||
|
@ -8,12 +8,14 @@ minetest.register_node(":homedecor:skylight", {
|
||||
tiles = { homedecor.textures.glass },
|
||||
wield_image = homedecor.textures.glass,
|
||||
inventory_image = "homedecor_skylight_inv.png",
|
||||
groups = { snappy = 3, dig_tree = 2 },
|
||||
groups = { snappy = 3, dig_tree = 2 , axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
paramtype = "light",
|
||||
_sound_def = {
|
||||
key = "node_sound_glass_defaults",
|
||||
},
|
||||
selection_box = homedecor.nodebox.slab_y(0.1),
|
||||
collision_box = homedecor.nodebox.slab_y(0.1),
|
||||
})
|
||||
|
||||
minetest.register_node(":homedecor:skylight_frosted", {
|
||||
@ -23,12 +25,14 @@ minetest.register_node(":homedecor:skylight_frosted", {
|
||||
wield_image = "homedecor_skylight_frosted.png",
|
||||
inventory_image = "homedecor_skylight_frosted_inv.png",
|
||||
use_texture_alpha = "blend",
|
||||
groups = { snappy = 3, dig_tree = 2 },
|
||||
groups = { snappy = 3, dig_tree = 2, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
paramtype = "light",
|
||||
_sound_def = {
|
||||
key = "node_sound_glass_defaults",
|
||||
},
|
||||
selection_box = homedecor.nodebox.slab_y(0.1),
|
||||
collision_box = homedecor.nodebox.slab_y(0.1),
|
||||
})
|
||||
|
||||
for s, s_loc in pairs({ ["asphalt"] = S("asphalt"), ["terracotta"] = S("terracotta"), ["wood"] = S("wood") }) do
|
||||
@ -40,7 +44,8 @@ for s, s_loc in pairs({ ["asphalt"] = S("asphalt"), ["terracotta"] = S("terracot
|
||||
inventory_image = "homedecor_shingles_"..s.."_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
groups = { snappy = 3, dig_tree = 2 },
|
||||
groups = { snappy = 3, dig_tree = 2, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
},
|
||||
@ -87,6 +92,7 @@ homedecor_roofing.register_outer_corner = function(modname, subname, groups, slo
|
||||
if type(slope_image) ~= "table" then
|
||||
tiles = { "homedecor_slope_outer_corner_"..slope_image..".png" }
|
||||
end
|
||||
groups.axey=5
|
||||
|
||||
minetest.register_node(":"..modname..":shingle_outer_corner_" .. subname, {
|
||||
description = S("@1 (outer corner)", description),
|
||||
@ -98,6 +104,7 @@ homedecor_roofing.register_outer_corner = function(modname, subname, groups, slo
|
||||
selection_box = ocorner_cbox,
|
||||
collision_box = ocorner_cbox,
|
||||
groups = groups,
|
||||
_mcl_hardness=1.6,
|
||||
on_place = minetest.rotate_node,
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
@ -111,6 +118,7 @@ homedecor_roofing.register_inner_corner = function(modname, subname, groups, slo
|
||||
if type(slope_image) ~= "table" then
|
||||
tiles = { "homedecor_slope_outer_corner_"..slope_image..".png" }
|
||||
end
|
||||
groups.axey=5
|
||||
|
||||
minetest.register_node(":"..modname..":shingle_inner_corner_" .. subname, {
|
||||
description = S("@1 (inner corner)", description),
|
||||
@ -121,6 +129,7 @@ homedecor_roofing.register_inner_corner = function(modname, subname, groups, slo
|
||||
paramtype2 = "facedir",
|
||||
collision_box = icorner_cbox,
|
||||
groups = groups,
|
||||
_mcl_hardness=1.6,
|
||||
on_place = minetest.rotate_node,
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
@ -134,6 +143,7 @@ homedecor_roofing.register_slope = function(modname, subname, recipeitem, groups
|
||||
if type(slope_image) ~= "table" then
|
||||
tiles = { "homedecor_slope_outer_corner_"..slope_image..".png" }
|
||||
end
|
||||
groups.axey=5
|
||||
|
||||
minetest.register_node(":"..modname..":shingle_side_" .. subname, {
|
||||
description = description,
|
||||
@ -146,6 +156,7 @@ homedecor_roofing.register_slope = function(modname, subname, recipeitem, groups
|
||||
collision_box = slope_cbox,
|
||||
use_texture_alpha = "blend",
|
||||
groups = groups,
|
||||
_mcl_hardness=1.6,
|
||||
on_place = minetest.rotate_node,
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
|
@ -19,7 +19,8 @@ minetest.register_node(":lrfurn:armchair", {
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
inventory_image = "lrfurn_armchair_inv.png",
|
||||
groups = {snappy=3, ud_param2_colorable = 1, dig_tree=2},
|
||||
groups = {snappy=3, ud_param2_colorable = 1, dig_tree=2, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
},
|
||||
|
@ -121,7 +121,7 @@ function lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, seats)
|
||||
|
||||
--seat the player
|
||||
sit_pos.y = sit_pos.y-0.5
|
||||
clicker:setpos(sit_pos)
|
||||
clicker:set_pos(sit_pos)
|
||||
return itemstack
|
||||
end
|
||||
|
||||
@ -129,3 +129,5 @@ dofile(modpath.."/longsofas.lua")
|
||||
dofile(modpath.."/sofas.lua")
|
||||
dofile(modpath.."/armchairs.lua")
|
||||
dofile(modpath.."/misc.lua")
|
||||
|
||||
minetest.log("action", "[homedecor_seating] loaded.")
|
||||
|
@ -18,7 +18,8 @@ minetest.register_node(":lrfurn:longsofa", {
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
inventory_image = "lrfurn_longsofa_inv.png",
|
||||
wield_scale = { x = 0.6, y = 0.6, z = 0.6 },
|
||||
groups = {snappy=3, ud_param2_colorable = 1, dig_tree=2},
|
||||
groups = {snappy=3, ud_param2_colorable = 1, dig_tree=2, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
},
|
||||
|
@ -18,6 +18,9 @@ homedecor.register("deckchair", {
|
||||
selection_box = dc_cbox,
|
||||
collision_box = dc_cbox,
|
||||
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 1)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:deckchair_foot", "homedecor:deckchair")
|
||||
@ -35,6 +38,9 @@ homedecor.register("deckchair_striped_blue", {
|
||||
selection_box = dc_cbox,
|
||||
collision_box = dc_cbox,
|
||||
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 1)
|
||||
end
|
||||
})
|
||||
|
||||
homedecor.register("simple_bench", {
|
||||
@ -52,6 +58,9 @@ homedecor.register("simple_bench", {
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 1)
|
||||
end
|
||||
})
|
||||
|
||||
local bl1_sbox = {
|
||||
@ -142,9 +151,7 @@ homedecor.register("kitchen_chair_wood", {
|
||||
after_place_node = unifieddyes.fix_rotation_nsew,
|
||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
pos.y = pos.y+0 -- where do I put my ass ?
|
||||
homedecor.sit(pos, node, clicker)
|
||||
return itemstack
|
||||
return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 1)
|
||||
end
|
||||
})
|
||||
|
||||
@ -170,9 +177,7 @@ homedecor.register("kitchen_chair_padded", {
|
||||
on_dig = unifieddyes.on_dig,
|
||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
pos.y = pos.y+0 -- where do I put my ass ?
|
||||
homedecor.sit(pos, node, clicker)
|
||||
return itemstack
|
||||
return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 1)
|
||||
end
|
||||
})
|
||||
|
||||
@ -210,6 +215,9 @@ for _, c in pairs(chairs) do
|
||||
collision_box = ofchairs_cbox,
|
||||
expand = { top = "placeholder" },
|
||||
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 1)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -18,7 +18,8 @@ minetest.register_node(":lrfurn:sofa", {
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
inventory_image = "lrfurn_sofa_inv.png",
|
||||
wield_scale = { x = 0.6, y = 0.6, z = 0.6 },
|
||||
groups = {snappy=3, ud_param2_colorable = 1, dig_tree=2},
|
||||
groups = {snappy=3, ud_param2_colorable = 1, dig_tree=2, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
},
|
||||
|
@ -58,7 +58,8 @@ minetest.register_node(":lrfurn:coffeetable", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "blend",
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
},
|
||||
|
@ -16,7 +16,8 @@ minetest.register_node(":lrfurn:endtable", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "blend",
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
},
|
||||
|
@ -126,7 +126,7 @@ for i, mat in ipairs(tabletop_materials) do
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_alias('homedecor:'..m..'_table_large_b', 'homedecor:'..m..'_table_large')
|
||||
minetest.register_alias('homedecor:'..m..'_table_large_square_b', 'homedecor:'..m..'_table_large_square')
|
||||
minetest.register_alias('homedecor:'..m..'_table_small_square_b', 'homedecor:'..m..'_table_small_square')
|
||||
minetest.register_alias('homedecor:'..m..'_table_small_round_b', 'homedecor:'..m..'_table_small_round')
|
||||
minetest.register_alias('homedecor:'..m..'_table_large', 'homedecor:'..m..'_table_large_square')
|
||||
@ -187,7 +187,7 @@ minetest.register_craft( {
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:glass_table_large_b 2",
|
||||
output = "homedecor:glass_table_large_square_b 2",
|
||||
recipe = {
|
||||
{ "homedecor:glass_table_small_square", "homedecor:glass_table_small_square" },
|
||||
}
|
||||
@ -210,7 +210,7 @@ minetest.register_craft( {
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:wood_table_large_b 2",
|
||||
output = "homedecor:wood_table_large_square_b 2",
|
||||
recipe = {
|
||||
{ "homedecor:wood_table_small_square", "homedecor:wood_table_small_square" },
|
||||
}
|
||||
@ -232,7 +232,7 @@ minetest.register_craft({
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:wood_table_large_b",
|
||||
recipe = "homedecor:wood_table_large_square_b",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
|
@ -93,7 +93,8 @@ local def = {
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
|
||||
groups = {snappy = 3},
|
||||
groups = {snappy = 3, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
selection_box = wd_cbox,
|
||||
collision_box = wd_cbox,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
@ -199,7 +200,7 @@ end
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:wardrobe",
|
||||
recipe = {
|
||||
{ "homedecor:drawer_small", "homedecor:kitchen_cabinet" },
|
||||
{ "homedecor:drawer_small", "homedecor:kitchen_cabinet_colorable" },
|
||||
{ "homedecor:drawer_small", "group:wood" },
|
||||
{ "homedecor:drawer_small", "group:wood" }
|
||||
},
|
||||
|
@ -94,6 +94,10 @@ local update_item = function(pos, node)
|
||||
pos.z = pos.z + posad.z * 6.5 / 16
|
||||
elseif node.name == "itemframes:pedestal" then
|
||||
pos.y = pos.y + 12 / 16 + 0.33
|
||||
local n = meta:get_string("item")
|
||||
if string.match(n, "spears:spear_") then
|
||||
pos.y = pos.y + 0.2
|
||||
end
|
||||
end
|
||||
tmp.nodename = node.name
|
||||
tmp.texture = ItemStack(meta:get_string("item")):get_name()
|
||||
@ -135,7 +139,8 @@ minetest.register_node("itemframes:frame",{
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 2, dig_immediate = 2},
|
||||
groups = {choppy = 2, dig_immediate = 2, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
legacy_wallmounted = true,
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
@ -215,7 +220,8 @@ minetest.register_node("itemframes:pedestal",{
|
||||
--},
|
||||
tiles = {"itemframes_pedestal.png"},
|
||||
paramtype = "light",
|
||||
groups = {cracky = 3, dig_stone = 2},
|
||||
groups = {cracky = 3, dig_stone = 2, pickaxey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_stone_defaults",
|
||||
},
|
||||
@ -332,3 +338,4 @@ if minetest.get_modpath("mesecons_mvps") then
|
||||
mesecon.register_mvps_stopper("itemframes:pedestal")
|
||||
end
|
||||
|
||||
minetest.log("action", "[itemframes] loaded.")
|
||||
|
@ -4,6 +4,6 @@
|
||||
### init.lua ###
|
||||
|
||||
Item frame=Quadro de Item
|
||||
Item frame (owned by @1)=Quadro de item (pertence a @l)
|
||||
Item frame (owned by @1)=Quadro de item (pertence a @1)
|
||||
Pedestal=Pedestal
|
||||
Pedestal (owned by @1)=Pedestal (pertence a @l)
|
||||
Pedestal (owned by @1)=Pedestal (pertence a @1)
|
||||
|
@ -4,6 +4,6 @@
|
||||
### init.lua ###
|
||||
|
||||
Item frame=Quadro de Item
|
||||
Item frame (owned by @1)=Quadro de item (pertence a @l)
|
||||
Item frame (owned by @1)=Quadro de item (pertence a @1)
|
||||
Pedestal=Pedestal
|
||||
Pedestal (owned by @1)=Pedestal (pertence a @l)
|
||||
Pedestal (owned by @1)=Pedestal (pertence a @1)
|
||||
|
@ -34,7 +34,8 @@ minetest.register_node("lavalamp:lavalamp", {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.25, 0.25,0.5, 0.25 },
|
||||
},
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_glass_defaults",
|
||||
},
|
||||
@ -64,7 +65,8 @@ minetest.register_node("lavalamp:lavalamp_off", {
|
||||
type = "fixed",
|
||||
fixed = { -0.25, -0.5, -0.25, 0.25,0.5, 0.25 },
|
||||
},
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1},
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1, axey=5},
|
||||
_mcl_hardness=1.6,
|
||||
_sound_def = {
|
||||
key = "node_sound_glass_defaults",
|
||||
},
|
||||
|
Reference in New Issue
Block a user