update ambience, bonemeal, cblocks, digilines, farming redo, home

workshop, homedecor, mesecons, pipeworks, technic, unified inventory,
and worldedit
master
Vanessa Dannenberg 2021-05-22 04:39:42 -04:00
parent 7733e18ac3
commit 08df6ac157
72 changed files with 616 additions and 495 deletions

View File

@ -1 +1 @@
20210423-1848
20210522-0439

View File

@ -7,6 +7,7 @@ minetest.override_item("default:water_flowing", { sounds = {} })
minetest.override_item("default:river_water_source", { sounds = {} })
minetest.override_item("default:river_water_flowing", { sounds = {} })
-- settings
local SOUNDVOLUME = 1.0
local MUSICVOLUME = 1.0
@ -19,8 +20,6 @@ local sound_set_order = {} -- needed because pairs loops randomly through tables
local set_nodes = {} -- all the nodes needed for sets
-- global functions
-- add set to list
ambience.add_set = function(set_name, def)
@ -73,10 +72,7 @@ end
-- return set from list using name
ambience.get_set = function(set_name)
if sound_sets[set_name] then
return sound_sets[set_name]
end
return sound_sets[set_name]
end
@ -100,11 +96,22 @@ ambience.del_set = function(set_name)
end
-- setup table when player joins
minetest.register_on_joinplayer(function(player)
playing[player:get_player_name()] = {}
end)
-- remove table when player leaves
minetest.register_on_leaveplayer(function(player)
playing[player:get_player_name()] = nil
end)
-- plays music and selects sound set
local get_ambience = function(player, tod, name)
-- play server or local music if available
if play_music and playing[name] then
if play_music then
-- play at midnight
if tod >= 0.0 and tod <= 0.01 then
@ -112,7 +119,7 @@ local get_ambience = function(player, tod, name)
if not playing[name].music then
playing[name].music = minetest.sound_play("ambience_music", {
to_player = player:get_player_name(),
to_player = name,
gain = MUSICVOLUME
})
end
@ -123,19 +130,18 @@ local get_ambience = function(player, tod, name)
end
end
-- get foot and head level nodes at player position
local pos = player:get_pos() ; if not pos then return end
pos.y = pos.y + 1.4 -- head level
local nod_head = pplus and name and playerplus[name].nod_head or
minetest.get_node(pos).name
local nod_head = pplus and name and playerplus[name]
and playerplus[name].nod_head or minetest.get_node(pos).name
pos.y = pos.y - 1.2 -- foot level
local nod_feet = pplus and name and playerplus[name].nod_feet or
minetest.get_node(pos).name
local nod_feet = pplus and name and playerplus[name]
and playerplus[name].nod_feet or minetest.get_node(pos).name
pos.y = pos.y - 0.2 -- reset pos
@ -168,6 +174,8 @@ local get_ambience = function(player, tod, name)
end
end
end
return nil, nil -- ADDED
end
@ -198,11 +206,10 @@ minetest.register_globalstep(function(dtime)
--print(string.format("elapsed time: %.4f\n", os.clock() - t1))
ok = true -- everything starts off ok
ok = playing[player_name] -- everything starts off ok if player around
-- are we playing something already?
if playing[player_name]
and playing[player_name].handler then
if ok and playing[player_name].handler then
-- stop current sound if another set active or gain changed
if playing[player_name].set ~= set_name
@ -213,8 +220,8 @@ minetest.register_globalstep(function(dtime)
minetest.sound_stop(playing[player_name].handler)
playing[player_name].set = nil
playing[player_name].handler = nil
playing[player_name].gain = nil
playing[player_name].handler = nil
else
ok = false -- sound set still playing, skip new sound
end
@ -246,9 +253,9 @@ minetest.register_globalstep(function(dtime)
--print("-- current handler", handler)
-- set what player is currently listening to
playing[player_name] = {
set = set_name, gain = MORE_GAIN, handler = handler
}
playing[player_name].set = set_name
playing[player_name].gain = MORE_GAIN
playing[player_name].handler = handler
-- set timer to stop sound
minetest.after(ambience.length, function()
@ -264,10 +271,10 @@ minetest.register_globalstep(function(dtime)
minetest.sound_stop(handler)
-- reset player variables and backup handler
playing[player_name] = {
set = nil, gain = nil, handler = nil
}
-- reset player variables
playing[player_name].set = nil
playing[player_name].gain = nil
playing[player_name].handler = nil
end
end)
end
@ -290,7 +297,7 @@ minetest.register_chatcommand("svol", {
if SOUNDVOLUME > 1.0 then SOUNDVOLUME = 1.0 end
return true, "Sound volume set to " .. SOUNDVOLUME
end,
end
})
@ -313,7 +320,7 @@ minetest.register_chatcommand("mvol", {
if MUSICVOLUME > 1.0 then MUSICVOLUME = 1.0 end
return true, "Music volume set to " .. MUSICVOLUME
end,
end
})

View File

@ -32,7 +32,7 @@ ambience.add_set("splash", {
frequency = 1000,
sounds = {
{name = "swim_splashing", length = 3},
{name = "swim_splashing", length = 3}
},
sound_check = function(def)

View File

@ -618,51 +618,51 @@ minetest.register_craft({
-- bonemeal (from bone)
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "bonemeal:bonemeal 2",
recipe = {"group:bone"}
recipe = {{"group:bone"}}
})
-- bonemeal (from player bones)
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "bonemeal:bonemeal 4",
recipe = {"bones:bones"}
recipe = {{"bones:bones"}}
})
-- bonemeal (from coral skeleton)
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "bonemeal:bonemeal 2",
recipe = {"default:coral_skeleton"}
recipe = {{"default:coral_skeleton"}}
})
-- mulch
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "bonemeal:mulch 4",
recipe = {
"group:tree", "group:leaves", "group:leaves",
"group:leaves", "group:leaves", "group:leaves",
"group:leaves", "group:leaves", "group:leaves"
{"group:tree", "group:leaves", "group:leaves"},
{"group:leaves", "group:leaves", "group:leaves"},
{"group:leaves", "group:leaves", "group:leaves"}
}
})
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "bonemeal:mulch",
recipe = {
"group:seed", "group:seed", "group:seed",
"group:seed", "group:seed", "group:seed",
"group:seed", "group:seed", "group:seed"
{"group:seed", "group:seed", "group:seed"},
{"group:seed", "group:seed", "group:seed"},
{"group:seed", "group:seed", "group:seed"}
}
})
-- fertiliser
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "bonemeal:fertiliser 2",
recipe = {"bonemeal:bonemeal", "bonemeal:mulch"}
recipe = {{"bonemeal:bonemeal", "bonemeal:mulch"}}
})

View File

@ -1,197 +1,199 @@
local stairs_mod = minetest.get_modpath("stairs")
local stairsplus_mod = minetest.global_exists("stairsplus")
local ethereal_mod = minetest.get_modpath("ethereal")
local colours = {
{"black", "Black", "#000000b0"},
{"blue", "Blue", "#015dbb70"},
{"brown", "Brown", "#a78c4570"},
{"cyan", "Cyan", "#01ffd870"},
{"dark_green", "Dark Green", "#005b0770"},
{"dark_grey", "Dark Grey", "#303030b0"},
{"green", "Green", "#61ff0170"},
{"grey", "Grey", "#5b5b5bb0"},
{"magenta", "Magenta", "#ff05bb70"},
{"orange", "Orange", "#ff840170"},
{"pink", "Pink", "#ff65b570"},
{"red", "Red", "#ff000070"},
{"violet", "Violet", "#2000c970"},
{"white", "White", "#abababc0"},
{"yellow", "Yellow", "#e3ff0070"},
}
local function cblocks_stairs(nodename, def)
minetest.register_node(nodename, def)
if stairs_mod or stairsplus_mod then
local mod, name = nodename:match("(.*):(.*)")
for groupname, value in pairs(def.groups) do
if groupname ~= "cracky"
and groupname ~= "choppy"
and groupname ~="flammable"
and groupname ~="crumbly"
and groupname ~="snappy" then
def.groups.groupname = nil
end
end
if stairsplus_mod then
stairsplus:register_all(mod, name, nodename, {
description = def.description,
tiles = def.tiles,
groups = def.groups,
sounds = def.sounds,
})
elseif stairs_mod and stairs
and stairs.mod and stairs.mod == "redo" then
stairs.register_all(name, nodename,
def.groups,
def.tiles,
def.description,
def.sounds
)
elseif stairs_mod and not stairs.mod then
stairs.register_stair_and_slab(name, nodename,
def.groups,
def.tiles,
("%s Stair"):format(def.description),
("%s Slab"):format(def.description),
def.sounds
)
end
end
end
local function set_alias(col, name)
minetest.register_alias("stairs:stair_" .. col .. "_" .. name,
"stairs:stair_" .. name .. "_" .. col)
minetest.register_alias("stairs:slab_" .. col .. "_" .. name,
"stairs:slab_" .. name .. "_" .. col)
minetest.register_alias("stairs:stair_inner_" .. col .. "_" .. name,
"stairs:stair_inner_" .. name .. "_" .. col)
minetest.register_alias("stairs:stair_outer_" .. col .. "_" .. name,
"stairs:stair_outer_" .. name .. "_" .. col)
minetest.register_alias("stairs:slope_" .. col .. "_" .. name,
"stairs:slope_" .. name .. "_" .. col)
end
for i = 1, #colours, 1 do
-- stone brick
cblocks_stairs("cblocks:stonebrick_" .. colours[i][1], {
description = colours[i][2] .. " Stone Brick",
tiles = {"default_stone_brick.png^[colorize:" .. colours[i][3]},
paramtype = "light",
is_ground_content = false,
groups = {cracky = 2, stone = 1},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
output = "cblocks:stonebrick_".. colours[i][1] .. " 2",
recipe = {
{"default:stonebrick","default:stonebrick", "dye:" .. colours[i][1]},
}
})
-- glass (no stairs unless stairs redo active because default stairs mod
-- does not support transparent stairs)
if stairs_mod and stairs and stairs.mod and stairs.mod == "redo" then
cblocks_stairs("cblocks:glass_" .. colours[i][1], {
description = colours[i][2] .. " Glass",
tiles = {"cblocks.png^[colorize:" .. colours[i][3]},
drawtype = "glasslike",
paramtype = "light",
sunlight_propagates = true,
use_texture_alpha = true,
is_ground_content = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
})
set_alias(colours[i][1], "glass")
else
minetest.register_node("cblocks:glass_" .. colours[i][1], {
description = colours[i][2] .. " Glass",
tiles = {"cblocks.png^[colorize:" .. colours[i][3]},
drawtype = "glasslike",
paramtype = "light",
sunlight_propagates = true,
use_texture_alpha = true,
is_ground_content = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
})
end
minetest.register_craft({
output = "cblocks:glass_".. colours[i][1] .. " 2",
recipe = {
{"default:glass","default:glass", "dye:" .. colours[i][1]},
}
})
-- wood
local col = colours[i][1]
-- ethereal already has yellow wood so rename to yellow2
if ethereal_mod and col == "yellow" then
col = "yellow2"
end
cblocks_stairs("cblocks:wood_" .. col, {
description = colours[i][2] .. " Wooden Planks",
tiles = {"default_wood.png^[colorize:" .. colours[i][3]},
paramtype = "light",
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
sounds = default.node_sound_wood_defaults(),
})
set_alias(colours[i][1], "wood")
minetest.register_craft({
output = "cblocks:wood_".. col .. " 2",
recipe = {
{"group:wood","group:wood", "dye:" .. colours[i][1]},
}
})
end
-- add lucky blocks
if minetest.get_modpath("lucky_block") then
lucky_block:add_blocks({
{"dro", {"cblocks:wood_"}, 10, true},
{"dro", {"cblocks:stonebrick_"}, 10, true},
{"dro", {"cblocks:glass_"}, 10, true},
{"exp"},
})
end
print ("[MOD] Cblocks loaded")
local stairs_mod = minetest.get_modpath("stairs")
local stairsplus_mod = minetest.global_exists("stairsplus")
local ethereal_mod = minetest.get_modpath("ethereal")
local colours = {
{"black", "Black", "#000000b0"},
{"blue", "Blue", "#015dbb70"},
{"brown", "Brown", "#a78c4570"},
{"cyan", "Cyan", "#01ffd870"},
{"dark_green", "Dark Green", "#005b0770"},
{"dark_grey", "Dark Grey", "#303030b0"},
{"green", "Green", "#61ff0170"},
{"grey", "Grey", "#5b5b5bb0"},
{"magenta", "Magenta", "#ff05bb70"},
{"orange", "Orange", "#ff840170"},
{"pink", "Pink", "#ff65b570"},
{"red", "Red", "#ff000070"},
{"violet", "Violet", "#2000c970"},
{"white", "White", "#abababc0"},
{"yellow", "Yellow", "#e3ff0070"}
}
local function cblocks_stairs(nodename, def)
minetest.register_node(nodename, def)
if stairs_mod or stairsplus_mod then
local mod, name = nodename:match("(.*):(.*)")
for groupname, value in pairs(def.groups) do
if groupname ~= "cracky"
and groupname ~= "choppy"
and groupname ~="flammable"
and groupname ~="crumbly"
and groupname ~="snappy" then
def.groups.groupname = nil
end
end
if stairsplus_mod then
stairsplus:register_all(mod, name, nodename, {
description = def.description,
tiles = def.tiles,
groups = def.groups,
sounds = def.sounds
})
elseif stairs_mod and stairs
and stairs.mod and stairs.mod == "redo" then
stairs.register_all(name, nodename,
def.groups,
def.tiles,
def.description,
def.sounds
)
elseif stairs_mod and not stairs.mod then
stairs.register_stair_and_slab(name, nodename,
def.groups,
def.tiles,
("%s Stair"):format(def.description),
("%s Slab"):format(def.description),
def.sounds
)
end
end
end
local function set_alias(col, name)
minetest.register_alias("stairs:stair_" .. col .. "_" .. name,
"stairs:stair_" .. name .. "_" .. col)
minetest.register_alias("stairs:slab_" .. col .. "_" .. name,
"stairs:slab_" .. name .. "_" .. col)
minetest.register_alias("stairs:stair_inner_" .. col .. "_" .. name,
"stairs:stair_inner_" .. name .. "_" .. col)
minetest.register_alias("stairs:stair_outer_" .. col .. "_" .. name,
"stairs:stair_outer_" .. name .. "_" .. col)
minetest.register_alias("stairs:slope_" .. col .. "_" .. name,
"stairs:slope_" .. name .. "_" .. col)
end
for i = 1, #colours, 1 do
-- stone brick
cblocks_stairs("cblocks:stonebrick_" .. colours[i][1], {
description = colours[i][2] .. " Stone Brick",
tiles = {"default_stone_brick.png^[colorize:" .. colours[i][3]},
paramtype = "light",
use_texture_alpha = "opaque",
is_ground_content = false,
groups = {cracky = 2, stone = 1},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
output = "cblocks:stonebrick_".. colours[i][1] .. " 2",
recipe = {
{"default:stonebrick","default:stonebrick", "dye:" .. colours[i][1]}
}
})
-- glass (no stairs unless stairs redo active because default stairs mod
-- does not support transparent stairs)
if stairs_mod and stairs and stairs.mod and stairs.mod == "redo" then
cblocks_stairs("cblocks:glass_" .. colours[i][1], {
description = colours[i][2] .. " Glass",
tiles = {"cblocks.png^[colorize:" .. colours[i][3]},
drawtype = "glasslike",
paramtype = "light",
sunlight_propagates = true,
use_texture_alpha = "blend",
is_ground_content = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults()
})
set_alias(colours[i][1], "glass")
else
minetest.register_node("cblocks:glass_" .. colours[i][1], {
description = colours[i][2] .. " Glass",
tiles = {"cblocks.png^[colorize:" .. colours[i][3]},
drawtype = "glasslike",
paramtype = "light",
sunlight_propagates = true,
use_texture_alpha = "blend",
is_ground_content = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults()
})
end
minetest.register_craft({
output = "cblocks:glass_".. colours[i][1] .. " 2",
recipe = {
{"default:glass","default:glass", "dye:" .. colours[i][1]},
}
})
-- wood
local col = colours[i][1]
-- ethereal already has yellow wood so rename to yellow2
if ethereal_mod and col == "yellow" then
col = "yellow2"
end
cblocks_stairs("cblocks:wood_" .. col, {
description = colours[i][2] .. " Wooden Planks",
tiles = {"default_wood.png^[colorize:" .. colours[i][3]},
paramtype = "light",
use_texture_alpha = "opaque",
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
sounds = default.node_sound_wood_defaults()
})
set_alias(colours[i][1], "wood")
minetest.register_craft({
output = "cblocks:wood_".. col .. " 2",
recipe = {
{"group:wood","group:wood", "dye:" .. colours[i][1]}
}
})
end
-- add lucky blocks
if minetest.get_modpath("lucky_block") then
lucky_block:add_blocks({
{"dro", {"cblocks:wood_"}, 10, true},
{"dro", {"cblocks:stonebrick_"}, 10, true},
{"dro", {"cblocks:glass_"}, 10, true},
{"exp"}
})
end
print ("[MOD] Cblocks loaded")

View File

@ -61,3 +61,11 @@ minetest.register_node("digilines:lightsensor", {
end
end,
})
minetest.register_craft({
output = "digilines:lightsensor",
recipe = {
{"default:glass","default:glass","default:glass"},
{"default:steel_ingot", "digilines:wire_std_00000000", "default:steel_ingot"},
}
})

View File

@ -57,3 +57,12 @@ minetest.register_node("digilines:rtc", {
end
end,
})
minetest.register_craft({
output = "digilines:rtc",
recipe = {
{"", "dye:black", ""},
{"default:steel_ingot", "default:mese_crystal_fragment", "default:steel_ingot"},
{"", "digilines:wire_std_00000000", ""}
}
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

After

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 B

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 B

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 B

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 132 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

After

Width:  |  Height:  |  Size: 143 B

View File

@ -28,11 +28,10 @@ minetest.register_craftitem("farming:barley", {
-- flour
minetest.register_craft({
type = "shapeless",
output = "farming:flour",
recipe = {
"farming:barley", "farming:barley", "farming:barley",
"farming:barley", "farming:mortar_pestle"
{"farming:barley", "farming:barley", "farming:barley"},
{"farming:barley", "farming:mortar_pestle", ""}
},
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
})

View File

@ -81,9 +81,7 @@ minetest.register_craftitem("farming:beans", {
-- beans can be used for green dye
minetest.register_craft({
output = "dye:green",
recipe = {
{"farming:beans"}
}
recipe = {{"farming:beans"}}
})
-- beanpole

View File

@ -21,20 +21,17 @@ minetest.register_craftitem("farming:beetroot_soup", {
})
minetest.register_craft({
type = "shapeless",
output = "farming:beetroot_soup",
recipe = {
"group:food_beetroot", "group:food_beetroot",
"group:food_beetroot", "group:food_beetroot",
"group:food_beetroot", "group:food_beetroot","group:food_bowl"
{"group:food_beetroot", "group:food_beetroot", "group:food_beetroot"},
{"group:food_beetroot", "group:food_bowl", "group:food_beetroot"}
}
})
-- red dye
minetest.register_craft({
type = "shapeless",
output = "dye:red",
recipe = {"group:food_beetroot"}
recipe = {{"group:food_beetroot"}}
})
local def = {

View File

@ -36,10 +36,9 @@ minetest.register_craftitem("farming:blueberry_pie", {
minetest.register_craft({
output = "farming:blueberry_pie",
type = "shapeless",
recipe = {
"group:food_flour", "group:food_sugar",
"group:food_blueberries", "group:food_baking_tray"
{"group:food_flour", "group:food_sugar", "group:food_blueberries"},
{"group:food_baking_tray", "", ""}
},
replacements = {{"group:food_baking_tray", "farming:baking_tray"}}
})
@ -79,7 +78,7 @@ def.drop = {
items = {
{items = {"farming:blueberries 2"}, rarity = 1},
{items = {"farming:blueberries"}, rarity = 2},
{items = {"farming:blueberries"}, rarity = 3},
{items = {"farming:blueberries"}, rarity = 3}
}
}
minetest.register_node("farming:blueberry_4", table.copy(def))

View File

@ -27,9 +27,10 @@ minetest.register_craftitem("farming:carrot_juice", {
minetest.register_craft({
output = "farming:carrot_juice",
type = "shapeless",
recipe = {
"vessels:drinking_glass", "group:food_carrot", "farming:juicer"
{"group:food_carrot"},
{"farming:juicer"},
{"vessels:drinking_glass"}
},
replacements = {
{"group:food_juicer", "farming:juicer"}

View File

@ -20,20 +20,17 @@ minetest.register_craftitem("farming:chili_bowl", {
})
minetest.register_craft({
type = "shapeless",
output = "farming:chili_bowl",
recipe = {
"group:food_chili_pepper", "group:food_barley",
"group:food_tomato", "group:food_beans", "group:food_bowl"
{"group:food_chili_pepper", "group:food_rice", "group:food_tomato"},
{"group:food_beans", "group:food_bowl", ""}
}
})
-- chili can be used for red dye
minetest.register_craft({
output = "dye:red",
recipe = {
{"farming:chili_pepper"}
}
recipe = {{"farming:chili_pepper"}}
})
-- chili definition

View File

@ -75,9 +75,7 @@ minetest.register_craftitem("farming:cocoa_beans", {
minetest.register_craft( {
output = "dye:brown 2",
recipe = {
{ "farming:cocoa_beans" }
}
recipe = {{"farming:cocoa_beans"}}
})
-- chocolate cookie
@ -128,9 +126,7 @@ minetest.register_craft({
minetest.register_craft({
output = "farming:chocolate_dark 9",
recipe = {
{"farming:chocolate_block"}
}
recipe = {{"farming:chocolate_block"}}
})
-- cocoa definition

View File

@ -34,10 +34,10 @@ minetest.register_alias("farming:drinking_cup", "vessels:drinking_glass")
minetest.register_craft( {
output = "farming:coffee_cup",
type = "shapeless",
recipe = {
"vessels:drinking_glass", "group:food_coffee",
"group:water_bucket", "group:food_saucepan"},
{"group:food_saucepan", "group:food_coffee", "group:water_bucket"},
{"", "vessels:drinking_glass", ""}
},
replacements = {
{"group:water_bucket", "bucket:bucket_empty"},
{"group:food_saucepan", "farming:saucepan"}
@ -47,10 +47,10 @@ minetest.register_craft( {
if minetest.get_modpath("bucket_wooden") then
minetest.register_craft( {
output = "farming:coffee_cup",
type = "shapeless",
recipe = {
"vessels:drinking_glass", "group:food_coffee",
"group:water_bucket_wooden", "group:food_saucepan"},
{"group:food_saucepan", "group:food_coffee", "group:water_bucket_wooden"},
{"", "vessels:drinking_glass", ""}
},
replacements = {
{"group:water_bucket_wooden", "bucket_wooden:bucket_empty"},
{"group:food_saucepan", "farming:saucepan"}

View File

@ -47,7 +47,7 @@ minetest.register_craft({
},
replacements = {
{"group:food_mortar_pestle", "farming:mortar_pestle"},
{"group:food_baking_tray", "farming:baking_tray"},
{"group:food_baking_tray", "farming:baking_tray"}
}
})
@ -72,9 +72,9 @@ minetest.register_node("farming:bottle_ethanol", {
minetest.register_craft( {
output = "farming:bottle_ethanol",
recipe = {
{ "vessels:glass_bottle", "group:food_corn", "group:food_corn"},
{ "group:food_corn", "group:food_corn", "group:food_corn"},
{ "group:food_corn", "group:food_corn", "group:food_corn"}
{"group:food_corn", "group:food_corn", "group:food_corn"},
{"group:food_corn", "vessels:glass_bottle", "group:food_corn"},
{"group:food_corn", "group:food_corn", "group:food_corn"}
}
})
@ -82,7 +82,7 @@ minetest.register_craft({
type = "fuel",
recipe = "farming:bottle_ethanol",
burntime = 80,
replacements = {{ "farming:bottle_ethanol", "vessels:glass_bottle"}}
replacements = {{"farming:bottle_ethanol", "vessels:glass_bottle"}}
})
-- corn definition

View File

@ -76,9 +76,7 @@ minetest.register_craftitem("farming:grapes", {
-- grapes can be used for violet dye
minetest.register_craft({
output = "dye:violet",
recipe = {
{"farming:grapes"}
}
recipe = {{"farming:grapes"}}
})
-- trellis

View File

@ -65,7 +65,7 @@ minetest.register_craft({
type = "fuel",
recipe = "farming:hemp_oil",
burntime = 20,
replacements = {{ "farming:hemp_oil", "vessels:glass_bottle"}}
replacements = {{"farming:hemp_oil", "vessels:glass_bottle"}}
})
-- hemp fibre

View File

@ -48,7 +48,7 @@ def.groups.growing = nil
def.drop = {
items = {
{items = {'farming:lettuce 2'}, rarity = 1},
{items = {'farming:lettuce 1'}, rarity = 2},
{items = {'farming:lettuce 1'}, rarity = 2}
}
}
minetest.register_node("farming:lettuce_5", table.copy(def))

View File

@ -21,9 +21,8 @@ minetest.register_craft({
})
minetest.register_craft({
type = "shapeless",
output = "farming:melon_slice 4",
recipe = {"farming:melon_8", "farming:cutting_board"},
recipe = {{"farming:cutting_board", "farming:melon_8"}},
replacements = {{"farming:cutting_board", "farming:cutting_board"}}
})
@ -74,14 +73,19 @@ minetest.register_node("farming:melon_7", table.copy(def))
-- stage 8 (final)
def.drawtype = "nodebox"
def.description = S("Melon")
def.tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png"}
def.tiles = {
"farming_melon_top.png", "farming_melon_bottom.png", "farming_melon_side.png"
}
def.selection_box = {-.5, -.5, -.5, .5, .5, .5}
def.walkable = true
def.buildable_to = false
def.paramtype2 = "facedir"
def.groups = {
food_melon = 1, snappy = 2, oddly_breakable_by_hand = 1,
flammable = 2, plant = 1
}
def.drop = "farming:melon_8"
def.on_place = minetest.rotate_node
minetest.register_node("farming:melon_8", table.copy(def))
-- add to registered_plants

View File

@ -29,11 +29,9 @@ minetest.register_craftitem("farming:mint_tea", {
minetest.register_craft({
output = "farming:mint_tea",
type = "shapeless",
recipe = {
"vessels:drinking_glass", "group:food_mint",
"group:food_mint", "group:food_mint",
"farming:juicer", "group:water_bucket"
{"group:food_mint", "group:food_mint", "group:food_mint"},
{"group:water_bucket", "farming:juicer", "vessels:drinking_glass"}
},
replacements = {
{"group:food_juicer", "farming:juicer"},
@ -44,11 +42,9 @@ minetest.register_craft({
if minetest.get_modpath("bucket_wooden") then
minetest.register_craft({
output = "farming:mint_tea",
type = "shapeless",
recipe = {
"vessels:drinking_glass", "group:food_mint",
"group:food_mint", "group:food_mint",
"farming:juicer", "group:water_bucket_wooden"
{"group:food_mint", "group:food_mint", "group:food_mint"},
{"group:water_bucket_wooden", "farming:juicer", "vessels:drinking_glass"}
},
replacements = {
{"group:food_juicer", "farming:juicer"},
@ -92,7 +88,7 @@ def.drop = {
{items = {"farming:mint_leaf 2"}, rarity = 1},
{items = {"farming:mint_leaf 2"}, rarity = 2},
{items = {"farming:seed_mint 1"}, rarity = 1},
{items = {"farming:seed_mint 2"}, rarity = 2},
{items = {"farming:seed_mint 2"}, rarity = 2}
}
}
minetest.register_node("farming:mint_4", table.copy(def))

View File

@ -27,12 +27,11 @@ minetest.register_craftitem("farming:onion_soup", {
})
minetest.register_craft({
type = "shapeless",
output = "farming:onion_soup",
recipe = {
"group:food_onion", "group:food_onion", "group:food_pot",
"group:food_onion", "group:food_onion",
"group:food_onion", "group:food_onion", "group:food_bowl"
{"group:food_onion", "group:food_onion", "group:food_onion"},
{"group:food_onion", "group:food_pot", "group:food_onion"},
{"", "group:food_bowl", ""}
},
replacements = {{"farming:pot", "farming:pot"}}
})
@ -81,7 +80,7 @@ def.drop = {
{items = {"farming:onion"}, rarity = 1},
{items = {"farming:onion"}, rarity = 2},
{items = {"farming:onion"}, rarity = 2},
{items = {"farming:onion"}, rarity = 5},
{items = {"farming:onion"}, rarity = 5}
}
}
minetest.register_node("farming:onion_5", table.copy(def))

View File

@ -21,9 +21,8 @@ minetest.register_craftitem("farming:peas", {
})
minetest.register_craft({
type = "shapeless",
output = "farming:peas",
recipe = {"farming:pea_pod"}
recipe = {{"farming:pea_pod"}}
})
-- pea soup
@ -35,9 +34,12 @@ minetest.register_craftitem("farming:pea_soup", {
})
minetest.register_craft({
type = "shapeless",
output = "farming:pea_soup",
recipe = {"group:food_peas", "group:food_peas", "group:food_bowl"}
recipe = {
{"group:food_peas"},
{"group:food_peas"},
{"group:food_bowl"}
}
})
local def = {

View File

@ -30,7 +30,7 @@ minetest.register_craftitem("farming:pepper_yellow", {
description = S("Yellow Pepper"),
inventory_image = "crops_pepper_yellow.png",
on_use = minetest.item_eat(3),
groups = {food_pepper = 1, flammable = 3},
groups = {food_pepper = 1, flammable = 3}
})
-- red pepper
@ -38,13 +38,12 @@ minetest.register_craftitem("farming:pepper_red", {
description = S("Red Pepper"),
inventory_image = "crops_pepper_red.png",
on_use = minetest.item_eat(4),
groups = {food_pepper = 1, flammable = 3},
groups = {food_pepper = 1, flammable = 3}
})
minetest.register_craft({
type = "shapeless",
output = "farming:peppercorn",
recipe = {"group:food_pepper"}
recipe = {{"group:food_pepper"}}
})
-- ground pepper
@ -69,8 +68,11 @@ minetest.register_node("farming:pepper_ground", {
minetest.register_craft( {
output = "farming:pepper_ground",
type = "shapeless",
recipe = {"group:food_peppercorn", "vessels:glass_bottle", "farming:mortar_pestle"},
recipe = {
{"group:food_peppercorn"},
{"farming:mortar_pestle"},
{"vessels:glass_bottle"}
},
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
})
@ -124,9 +126,9 @@ minetest.register_node("farming:pepper_5", table.copy(def))
def.tiles = {"crops_pepper_plant_6.png"}
def.drop = {
max_items = 2, items = {
{items = {'farming:pepper_yellow 2'}, rarity = 1},
{items = {'farming:pepper_yellow'}, rarity = 2},
{items = {'farming:pepper_yellow'}, rarity = 3},
{items = {"farming:pepper_yellow 2"}, rarity = 1},
{items = {"farming:pepper_yellow"}, rarity = 2},
{items = {"farming:pepper_yellow"}, rarity = 3}
}
}
minetest.register_node("farming:pepper_6", table.copy(def))
@ -136,9 +138,9 @@ def.tiles = {"crops_pepper_plant_7.png"}
def.groups.growing = nil
def.drop = {
max_items = 2, items = {
{items = {'farming:pepper_red 2'}, rarity = 1},
{items = {'farming:pepper_red'}, rarity = 2},
{items = {'farming:pepper_red'}, rarity = 3},
{items = {"farming:pepper_red 2"}, rarity = 1},
{items = {"farming:pepper_red"}, rarity = 2},
{items = {"farming:pepper_red"}, rarity = 3}
}
}
minetest.register_node("farming:pepper_7", table.copy(def))

View File

@ -38,8 +38,7 @@ minetest.register_craftitem("farming:pineapple_ring", {
minetest.register_craft( {
output = "farming:pineapple_ring 5",
type = "shapeless",
recipe = {"group:food_pineapple"},
recipe = {{"group:food_pineapple"}},
replacements = {{"farming:pineapple", "farming:pineapple_top"}}
})
@ -53,11 +52,12 @@ minetest.register_craftitem("farming:pineapple_juice", {
minetest.register_craft({
output = "farming:pineapple_juice",
type = "shapeless",
recipe = {
"vessels:drinking_glass", "group:food_pineapple_ring",
"group:food_pineapple_ring", "group:food_pineapple_ring",
"farming:juicer"},
{"group:food_pineapple_ring", "group:food_pineapple_ring",
"group:food_pineapple_ring"},
{"", "farming:juicer", ""},
{"", "vessels:drinking_glass", ""}
},
replacements = {
{"group:food_juicer", "farming:juicer"}
}
@ -65,10 +65,10 @@ minetest.register_craft({
minetest.register_craft({
output = "farming:pineapple_juice 2",
type = "shapeless",
recipe = {
"vessels:drinking_glass", "vessels:drinking_glass",
"group:food_pineapple", "farming:juicer"
{"group:food_pineapple", ""},
{"farming:juicer", ""},
{"vessels:drinking_glass", "vessels:drinking_glass"}
},
replacements = {
{"group:food_juicer", "farming:juicer"}

View File

@ -25,9 +25,8 @@ minetest.register_craft({
})
minetest.register_craft({
type = "shapeless",
output = "farming:pumpkin_slice 4",
recipe = {"farming:pumpkin", "farming:cutting_board"},
recipe = {{"farming:cutting_board", "farming:pumpkin"}},
replacements = {{"farming:cutting_board", "farming:cutting_board"}}
})
@ -122,8 +121,9 @@ minetest.register_craftitem("farming:pumpkin_dough", {
minetest.register_craft({
output = "farming:pumpkin_dough",
type = "shapeless",
recipe = {"group:food_flour", "group:food_pumpkin_slice", "group:food_pumpkin_slice"}
recipe = {
{"group:food_pumpkin_slice", "group:food_flour", "group:food_pumpkin_slice"}
}
})
minetest.register_craft({

View File

@ -45,7 +45,7 @@ local def = {
},
sounds = default.node_sound_leaves_defaults(),
minlight = 10,
maxlight = 12,
maxlight = 12
}
-- stage 1

View File

@ -19,11 +19,10 @@ minetest.override_item("farming:rye", {
})
minetest.register_craft({
type = "shapeless",
output = "farming:flour",
recipe = {
"farming:rye", "farming:rye", "farming:rye", "farming:rye",
"farming:mortar_pestle"
{"farming:rye", "farming:rye", "farming:rye"},
{"farming:rye", "farming:mortar_pestle", ""}
},
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
})
@ -44,11 +43,10 @@ minetest.override_item("farming:oat", {
})
minetest.register_craft({
type = "shapeless",
output = "farming:flour",
recipe = {
"farming:oat", "farming:oat", "farming:oat", "farming:oat",
"farming:mortar_pestle"
{"farming:oat", "farming:oat", "farming:oat"},
{"farming:oat", "farming:mortar_pestle", ""}
},
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
})
@ -82,11 +80,10 @@ minetest.register_craftitem("farming:rice_flour", {
})
minetest.register_craft({
type = "shapeless",
output = "farming:rice_flour",
recipe = {
"farming:rice", "farming:rice", "farming:rice", "farming:rice",
"farming:mortar_pestle"
{"farming:rice", "farming:rice", "farming:rice"},
{"farming:rice", "farming:mortar_pestle", ""}
},
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
})

View File

@ -19,9 +19,8 @@ minetest.register_craftitem("farming:soy_beans", {
})
minetest.register_craft({
type = "shapeless",
output = "farming:soy_beans",
recipe = {"farming:soy_pod"}
recipe = {{"farming:soy_pod"}}
})
-- soy sauce
@ -44,11 +43,11 @@ minetest.register_node("farming:soy_sauce", {
})
minetest.register_craft( {
type = "shapeless",
output = "farming:soy_sauce",
recipe = {
"group:food_soy", "group:food_soy", "group:food_juicer",
"bucket:bucket_river_water", "vessels:glass_bottle", "group:food_salt"
{"group:food_soy", "group:food_salt", "group:food_soy"},
{"", "group:food_juicer", ""},
{"", "bucket:bucket_river_water", "vessels:glass_bottle"}
},
replacements = {
{"bucket:bucket_river_water", "bucket:bucket_empty"},
@ -78,11 +77,10 @@ minetest.register_node("farming:soy_milk", {
})
minetest.register_craft( {
type = "shapeless",
output = "farming:soy_milk",
recipe = {
"group:food_soy", "group:food_soy", "group:food_soy",
"farming:vanilla_extract", "bucket:bucket_water", "vessels:drinking_glass"
{"group:food_soy", "group:food_soy", "group:food_soy"},
{"farming:vanilla_extract", "bucket:bucket_water", "vessels:drinking_glass"}
},
replacements = {
{"bucket:bucket_water", "bucket:bucket_empty"},
@ -100,10 +98,9 @@ minetest.register_craftitem("farming:tofu", {
minetest.register_craft({
output = "farming:tofu",
type = "shapeless",
recipe = {
"farming:baking_tray", "group:food_soy", "group:food_soy",
"group:food_soy", "group:food_soy", "group:food_soy",
{"farming:baking_tray", "group:food_soy", "group:food_soy"},
{"group:food_soy", "group:food_soy", "group:food_soy"}
},
replacements = {{"farming:baking_tray", "farming:baking_tray"}}
})
@ -163,7 +160,7 @@ minetest.register_node("farming:soy_4", table.copy(def))
def.tiles = {"farming_soy_5.png"}
def.drop = {
max_items = 1, items = {
{items = {'farming:soy_pod'}, rarity = 1},
{items = {"farming:soy_pod"}, rarity = 1},
}
}
minetest.register_node("farming:soy_5", table.copy(def))
@ -172,9 +169,9 @@ minetest.register_node("farming:soy_5", table.copy(def))
def.tiles = {"farming_soy_6.png"}
def.drop = {
max_items = 3, items = {
{items = {'farming:soy_pod'}, rarity = 1},
{items = {'farming:soy_pod'}, rarity = 2},
{items = {'farming:soy_pod'}, rarity = 3},
{items = {"farming:soy_pod"}, rarity = 1},
{items = {"farming:soy_pod"}, rarity = 2},
{items = {"farming:soy_pod"}, rarity = 3},
}
}
minetest.register_node("farming:soy_6", table.copy(def))
@ -184,11 +181,11 @@ def.tiles = {"farming_soy_7.png"}
def.groups.growing = nil
def.drop = {
max_items = 5, items = {
{items = {'farming:soy_pod'}, rarity = 1},
{items = {'farming:soy_pod'}, rarity = 2},
{items = {'farming:soy_pod'}, rarity = 3},
{items = {'farming:soy_pod'}, rarity = 4},
{items = {'farming:soy_pod'}, rarity = 5}
{items = {"farming:soy_pod"}, rarity = 1},
{items = {"farming:soy_pod"}, rarity = 2},
{items = {"farming:soy_pod"}, rarity = 3},
{items = {"farming:soy_pod"}, rarity = 4},
{items = {"farming:soy_pod"}, rarity = 5}
}
}
minetest.register_node("farming:soy_7", table.copy(def))

View File

@ -17,6 +17,23 @@ minetest.register_craftitem("farming:tomato", {
on_use = minetest.item_eat(4)
})
-- tomato soup
minetest.register_craftitem("farming:tomato_soup", {
description = S("Tomato Soup"),
inventory_image = "farming_tomato_soup.png",
groups = {flammable = 2},
on_use = minetest.item_eat(8, "farming:bowl")
})
minetest.register_craft({
output = "farming:tomato_soup",
recipe = {
{"group:food_tomato"},
{"group:food_tomato"},
{"group:food_bowl"}
}
})
-- tomato definition
local def = {
drawtype = "plantlike",

View File

@ -8,7 +8,7 @@ minetest.register_craftitem("farming:vanilla", {
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:vanilla_1")
end,
on_use = minetest.item_eat(1),
on_use = minetest.item_eat(1)
})
-- crop definition
@ -49,8 +49,8 @@ minetest.register_node("farming:vanilla_extract", {
minetest.register_craft( {
output = "farming:vanilla_extract",
recipe = {
{ "group:food_vanilla", "group:food_vanilla", "group:food_vanilla"},
{ "group:food_vanilla", "farming:bottle_ethanol", "bucket:bucket_water"},
{"group:food_vanilla", "group:food_vanilla", "group:food_vanilla"},
{"group:food_vanilla", "farming:bottle_ethanol", "bucket:bucket_water"},
},
replacements = {
{"bucket:bucket_water", "bucket:bucket_empty"},
@ -61,7 +61,7 @@ minetest.register_craft({
type = "fuel",
recipe = "farming:vanilla_extract",
burntime = 25,
replacements = {{ "farming:vanilla_extract", "vessels:glass_bottle" }}
replacements = {{"farming:vanilla_extract", "vessels:glass_bottle"}}
})
-- stage 1
@ -92,9 +92,9 @@ minetest.register_node("farming:vanilla_6", table.copy(def))
def.tiles = {"farming_vanilla_7.png"}
def.drop = {
items = {
{items = {'farming:vanilla'}, rarity = 1},
{items = {'farming:vanilla'}, rarity = 2},
{items = {'farming:vanilla'}, rarity = 3}
{items = {"farming:vanilla"}, rarity = 1},
{items = {"farming:vanilla"}, rarity = 2},
{items = {"farming:vanilla"}, rarity = 3}
}
}
minetest.register_node("farming:vanilla_7", table.copy(def))
@ -104,10 +104,10 @@ def.tiles = {"farming_vanilla_8.png"}
def.groups.growing = nil
def.drop = {
items = {
{items = {'farming:vanilla 2'}, rarity = 1},
{items = {'farming:vanilla 2'}, rarity = 2},
{items = {'farming:vanilla 2'}, rarity = 2},
{items = {'farming:vanilla 2'}, rarity = 3}
{items = {"farming:vanilla 2"}, rarity = 1},
{items = {"farming:vanilla 2"}, rarity = 2},
{items = {"farming:vanilla 2"}, rarity = 2},
{items = {"farming:vanilla 2"}, rarity = 3}
}
}
minetest.register_node("farming:vanilla_8", table.copy(def))

View File

@ -46,9 +46,7 @@ minetest.register_craft({
minetest.register_craft({
output = "farming:wheat 3",
recipe = {
{"farming:straw"}
}
recipe = {{"farming:straw"}}
})
-- check and register stairs
@ -80,11 +78,10 @@ minetest.register_craftitem("farming:flour", {
})
minetest.register_craft({
type = "shapeless",
output = "farming:flour",
recipe = {
"farming:wheat", "farming:wheat", "farming:wheat",
"farming:wheat", "farming:mortar_pestle"
{"farming:wheat", "farming:wheat", "farming:wheat"},
{"farming:wheat", "farming:mortar_pestle", ""}
},
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
})
@ -113,9 +110,8 @@ minetest.register_craftitem("farming:bread_slice", {
})
minetest.register_craft({
type = "shapeless",
output = "farming:bread_slice 5",
recipe = {"farming:bread", "group:food_cutting_board"},
recipe = {{"group:food_cutting_board", "farming:bread"}},
replacements = {{"group:food_cutting_board", "farming:cutting_board"}}
})

View File

@ -117,9 +117,11 @@ minetest.register_node("farming:salt_crystal", {
},
})
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "farming:salt 9",
recipe = {"farming:salt_crystal", "farming:mortar_pestle"},
recipe = {
{"farming:salt_crystal", "farming:mortar_pestle"}
},
replacements = {{"farming:mortar_pestle", "farming:mortar_pestle"}}
})
@ -211,9 +213,11 @@ minetest.register_craftitem("farming:garlic_bread", {
})
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "farming:garlic_bread",
recipe = {"group:food_toast", "group:food_garlic_clove", "group:food_garlic_clove"}
recipe = {
{"group:food_toast", "group:food_garlic_clove", "group:food_garlic_clove"}
}
})
--= Donuts (thanks to Bockwurst for making the donut images)
@ -270,11 +274,11 @@ minetest.register_craftitem("farming:porridge", {
})
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "farming:porridge",
recipe = {
"group:food_oats", "group:food_oats", "group:food_oats",
"group:food_oats", "group:food_bowl", "group:food_milk_glass"
{"group:food_oats", "group:food_oats", "group:food_oats"},
{"group:food_oats", "group:food_bowl", "group:food_milk_glass"}
},
replacements = {
{"mobs:glass_milk", "vessels:drinking_glass"},
@ -291,12 +295,12 @@ minetest.register_craftitem("farming:jaffa_cake", {
})
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "farming:jaffa_cake",
recipe = {
"farming:baking_tray", "group:food_egg", "group:food_sugar",
"group:food_flour", "group:food_cocoa", "group:food_orange",
"group:food_milk"
{"farming:baking_tray", "group:food_egg", "group:food_sugar"},
{"group:food_flour", "group:food_cocoa", "group:food_orange"},
{"group:food_milk", "", ""}
},
replacements = {
{"farming:baking_tray", "farming:baking_tray"},
@ -314,10 +318,9 @@ minetest.register_craftitem("farming:apple_pie", {
minetest.register_craft({
output = "farming:apple_pie",
type = "shapeless",
recipe = {
"group:food_flour", "group:food_sugar",
"group:food_apple", "group:food_baking_tray"
{"group:food_flour", "group:food_sugar", "group:food_apple"},
{"", "group:food_baking_tray", ""}
},
replacements = {{"group:food_baking_tray", "farming:baking_tray"}}
})
@ -342,11 +345,11 @@ minetest.register_craftitem("farming:cactus_juice", {
})
minetest.register_craft({
output = "farming:cactus_juice 2",
type = "shapeless",
output = "farming:cactus_juice",
recipe = {
"vessels:drinking_glass", "vessels:drinking_glass",
"default:cactus", "farming:juicer"
{"default:cactus"},
{"farming:juicer"},
{"vessels:drinking_glass"}
},
replacements = {
{"group:food_juicer", "farming:juicer"}
@ -363,20 +366,16 @@ minetest.register_craftitem("farming:pasta", {
minetest.register_craft({
output = "farming:pasta",
type = "shapeless",
recipe = {
"group:food_flour", "group:food_mixing_bowl",
"group:food_butter"
{"group:food_flour", "group:food_butter", "group:food_mixing_bowl"}
},
replacements = {{"group:food_mixing_bowl", "farming:mixing_bowl"}}
})
minetest.register_craft({
output = "farming:pasta",
type = "shapeless",
recipe = {
"group:food_flour", "group:food_mixing_bowl",
"group:food_oil"
{"group:food_flour", "group:food_oil", "group:food_mixing_bowl"}
},
replacements = {
{"group:food_mixing_bowl", "farming:mixing_bowl"},
@ -394,10 +393,9 @@ minetest.register_craftitem("farming:spaghetti", {
minetest.register_craft({
output = "farming:spaghetti",
type = "shapeless",
recipe = {
"group:food_pasta", "group:food_saucepan",
"group:food_tomato", "group:food_garlic_clove", "group:food_garlic_clove"
{"group:food_pasta", "group:food_saucepan", "group:food_tomato"},
{"group:food_garlic_clove", "group:food_garlic_clove", ""}
},
replacements = {{"group:food_saucepan", "farming:saucepan"}}
})
@ -412,11 +410,10 @@ minetest.register_craftitem("farming:bibimbap", {
minetest.register_craft({
output = "farming:bibimbap",
type = "shapeless",
recipe = {
"group:food_skillet", "group:food_bowl", "group:food_egg", "group:food_rice",
"group:food_chicken_raw", "group:food_cabbage", "group:food_carrot",
"group:food_chili_pepper"
{"group:food_skillet", "group:food_bowl", "group:food_egg"},
{"group:food_rice", "group:food_chicken_raw", "group:food_cabbage"},
{"group:food_carrot", "group:food_chili_pepper", ""}
},
replacements = {{"group:food_skillet", "farming:skillet"}}
})
@ -441,12 +438,11 @@ minetest.register_craftitem("farming:burger", {
})
minetest.register_craft({
type = "shapeless",
output = "farming:burger",
recipe = {
"farming:bread", "group:food_meat", "group:food_cheese",
"group:food_tomato", "group:food_cucumber", "group:food_onion",
"group:food_lettuce"
{"farming:bread", "group:food_meat", "group:food_cheese"},
{"group:food_tomato", "group:food_cucumber", "group:food_onion"},
{"group:food_lettuce", "", ""}
}
})
@ -464,7 +460,7 @@ minetest.register_craft({
recipe = {
"group:food_bowl", "group:food_tomato", "group:food_cucumber",
"group:food_lettuce", "group:food_oil"
},
}
})
-- Triple Berry Smoothie
@ -510,7 +506,7 @@ minetest.register_craft({
minetest.register_craftitem("farming:potato_omelet", {
description = S("Potato omelet"),
inventory_image = "farming_potato_omelet.png",
on_use = minetest.item_eat(6, "farming:bowl"),
on_use = minetest.item_eat(6, "farming:bowl")
})
minetest.register_craft({
@ -549,11 +545,10 @@ minetest.register_craftitem("farming:flan", {
})
minetest.register_craft({
type = "shapeless",
output = "farming:flan",
recipe = {
"group:food_sugar", "group:food_milk", "farming:caramel",
"group:food_egg", "group:food_egg", "farming:vanilla_extract"
{"group:food_sugar", "group:food_milk", "farming:caramel"},
{"group:food_egg", "group:food_egg", "farming:vanilla_extract"}
},
replacements = {
{"cucina_vegana:soy_milk", "vessels:drinking_glass"},
@ -568,17 +563,16 @@ minetest.register_craftitem("farming:cheese_vegan", {
description = S("Vegan Cheese"),
inventory_image = "farming_cheese_vegan.png",
on_use = minetest.item_eat(2),
groups = {food_cheese = 1, flammable = 2},
groups = {food_cheese = 1, flammable = 2}
})
minetest.register_craft({
type = "shapeless",
output = "farming:cheese_vegan",
recipe = {
"farming:soy_milk", "farming:soy_milk", "farming:soy_milk",
"group:food_salt", "group:food_peppercorn", "farming:bottle_ethanol",
"group:food_gelatin", "group:food_pot"
{"farming:soy_milk", "farming:soy_milk", "farming:soy_milk"},
{"group:food_salt", "group:food_peppercorn", "farming:bottle_ethanol"},
{"group:food_gelatin", "group:food_pot", ""}
},
replacements = {
{"farming:soy_milk", "vessels:drinking_glass 3"},
@ -588,16 +582,15 @@ minetest.register_craft({
})
minetest.register_craft({
type = "shapeless",
output = "farming:cheese_vegan",
recipe = {
"farming:soy_milk", "farming:soy_milk", "farming:soy_milk",
"group:food_salt", "group:food_peppercorn", "group:food_lemon",
"group:food_gelatin", "group:food_pot"
{"farming:soy_milk", "farming:soy_milk", "farming:soy_milk"},
{"group:food_salt", "group:food_peppercorn", "group:food_lemon"},
{"group:food_gelatin", "group:food_pot", ""}
},
replacements = {
{"farming:soy_milk", "vessels:drinking_glass 3"},
{"farming:pot", "farming:pot"},
{"farming:pot", "farming:pot"}
}
})
@ -607,14 +600,14 @@ minetest.register_craftitem("farming:onigiri", {
description = S("Onirigi"),
inventory_image = "farming_onigiri.png",
on_use = minetest.item_eat(2),
groups = {flammable = 2},
groups = {flammable = 2}
})
minetest.register_craft({
type = "shapeless",
output = "farming:onigiri",
recipe = {
"group:food_rice", "group:food_rice", "group:food_seaweed", "group:food_salt"
{"group:food_rice", "group:food_salt", "group:food_rice"},
{"", "group:food_seaweed", ""}
}
})
@ -624,18 +617,40 @@ minetest.register_craftitem("farming:gyoza", {
description = S("Gyoza"),
inventory_image = "farming_gyoza.png",
on_use = minetest.item_eat(4),
groups = {flammable = 2},
groups = {flammable = 2}
})
minetest.register_craft({
type = "shapeless",
output = "farming:gyoza 4",
recipe = {
"group:food_cabbage", "group:food_garlic_clove", "group:food_onion",
"group:food_meat_raw", "group:food_salt", "group:food_skillet",
"group:food_flour"
{"group:food_cabbage", "group:food_garlic_clove", "group:food_onion"},
{"group:food_meat_raw", "group:food_salt", "group:food_flour"},
{"", "group:food_skillet", ""}
},
replacements = {
{"group:food_skillet", "farming:skillet"}
}
})
-- Mochi
minetest.register_craftitem("farming:mochi", {
description = S("Mochi"),
inventory_image = "farming_mochi.png",
on_use = minetest.item_eat(3),
groups = {flammable = 2}
})
minetest.register_craft({
output = "farming:mochi",
recipe = {
{"group:food_rice", "group:food_sugar", "group:food_rice"},
{"", "group:food_mortar_pestle", ""},
{"", "bucket:bucket_river_water", ""}
},
replacements = {
{"group:food_mortar_pestle", "farming:mortar_pestle"},
{"bucket:bucket_river_water", "bucket:bucket_empty"}
}
})

View File

@ -63,6 +63,11 @@ Created by VanessaE (License: CC BY 3.0):
farming_cotton_7.png
farming_cotton_8.png
Created by 7eventy7 (https://www.planetminecraft.com/member/7eventy7/)
farming_melon_top.png
farming_melon_side.png
farming_melon_bottom.png
Created by Doc (License: CC BY 3.0):
farming_cucumber.png
farming_cucumber_1.png
@ -164,3 +169,7 @@ Created by Felfa (CC0)
Created by gorlock (CC0)
farming_salt_crystal.png
Created by sirrobzeroone (CC0)
farming_gyoza.png
farming_pineapple_ring.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 603 B

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 B

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

View File

@ -20,7 +20,7 @@ minetest.register_craft({
minetest.register_craft({
type = "fuel",
recipe = "farming:bowl",
burntime = 10,
burntime = 10
})
-- saucepan
@ -155,9 +155,6 @@ minetest.register_craft({
})
minetest.register_craft( {
type = "shapeless",
output = "vessels:glass_fragments",
recipe = {
"farming:mixing_bowl"
}
recipe = {{"farming:mixing_bowl"}}
})

View File

@ -14,6 +14,7 @@ minetest.register_node("home_workshop_misc:tool_cabinet", {
"home_workshop_common_generic_metal_bright.png",
"home_workshop_misc_tool_cabinet_misc.png",
},
paramtype = "light",
paramtype2="facedir",
inventory_image = "home_workshop_misc_tool_cabinet_inv.png",
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
@ -33,6 +34,7 @@ minetest.register_node("home_workshop_misc:beer_tap", {
{ name = "home_workshop_common_generic_metal.png", color = 0xff303030 }
},
inventory_image = "home_workshop_misc_beertap_inv.png",
paramtype = "light",
paramtype2 = "facedir",
groups = { snappy=3 },
walkable = false,
@ -70,6 +72,7 @@ minetest.register_node("home_workshop_misc:beer_mug", {
mesh = "home_workshop_misc_beer_mug.obj",
tiles = { "home_workshop_misc_beer_mug.png" },
inventory_image = "home_workshop_misc_beer_mug_inv.png",
paramtype = "light",
paramtype2 = "facedir",
groups = { snappy=3, oddly_breakable_by_hand=3 },
walkable = false,
@ -93,6 +96,7 @@ minetest.register_node("home_workshop_misc:soda_machine", {
drawtype = "mesh",
mesh = "home_workshop_misc_soda_machine.obj",
tiles = {"home_workshop_misc_soda_machine.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy=3},
selection_box = svm_cbox,

View File

@ -570,7 +570,7 @@ minetest.register_craft({
})
minetest.register_craft({
output = "homedecor:kitchen_cabinet",
output = "homedecor:kitchen_cabinet_colorable",
recipe = {
{"group:wood", "group:stick", "group:wood", },
{"group:wood", "group:stick", "group:wood", },
@ -579,53 +579,53 @@ minetest.register_craft({
})
minetest.register_craft({
output = "homedecor:kitchen_cabinet_steel",
output = "homedecor:kitchen_cabinet_colorable_steel",
recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"", "homedecor:kitchen_cabinet", ""},
{"", "homedecor:kitchen_cabinet_colorable", ""},
}
})
minetest.register_craft({
output = "homedecor:kitchen_cabinet_steel",
output = "homedecor:kitchen_cabinet_colorable_steel",
recipe = {
{"moreblocks:slab_steelblock_1"},
{ "homedecor:kitchen_cabinet" },
{ "homedecor:kitchen_cabinet_colorable" },
}
})
minetest.register_craft({
output = "homedecor:kitchen_cabinet_marble",
output = "homedecor:kitchen_cabinet_colorable_marble",
recipe = {
{"building_blocks:slab_marble"},
{"homedecor:kitchen_cabinet"},
{"homedecor:kitchen_cabinet_colorable"},
}
})
minetest.register_craft({
output = "homedecor:kitchen_cabinet_marble",
output = "homedecor:kitchen_cabinet_colorable_marble",
recipe = {
{"technic:slab_marble_1"},
{"homedecor:kitchen_cabinet"},
{"homedecor:kitchen_cabinet_colorable"},
}
})
minetest.register_craft({
output = "homedecor:kitchen_cabinet_granite",
output = "homedecor:kitchen_cabinet_colorable_granite",
recipe = {
{"technic:slab_granite_1"},
{"homedecor:kitchen_cabinet"},
{"homedecor:kitchen_cabinet_colorable"},
}
})
minetest.register_craft({
type = "shapeless",
output = "homedecor:kitchen_cabinet_half 2",
recipe = { "homedecor:kitchen_cabinet" }
output = "homedecor:kitchen_cabinet_colorable_half 2",
recipe = { "homedecor:kitchen_cabinet_colorable" }
})
minetest.register_craft({
output = "homedecor:kitchen_cabinet_with_sink",
output = "homedecor:kitchen_cabinet_colorable_with_sink",
recipe = {
{"group:wood", "default:steel_ingot", "group:wood", },
{"group:wood", "default:steel_ingot", "group:wood", },

View File

@ -13,16 +13,19 @@ mesecon.button_turnoff = function (pos)
mesecon.receptor_off(pos, rules)
end
local use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or nil
minetest.register_node("mesecons_button:button_off", {
drawtype = "nodebox",
tiles = {
"jeija_wall_button_sides.png",
"jeija_wall_button_sides.png",
"jeija_wall_button_sides.png",
"jeija_wall_button_sides.png",
"jeija_wall_button_sides.png",
"jeija_wall_button_off.png"
"jeija_wall_button_sides.png",
"jeija_wall_button_sides.png",
"jeija_wall_button_sides.png",
"jeija_wall_button_sides.png",
"jeija_wall_button_sides.png",
"jeija_wall_button_off.png"
},
use_texture_alpha = use_texture_alpha,
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
@ -66,7 +69,8 @@ minetest.register_node("mesecons_button:button_on", {
"jeija_wall_button_sides.png",
"jeija_wall_button_sides.png",
"jeija_wall_button_on.png"
},
},
use_texture_alpha = use_texture_alpha,
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,

View File

@ -54,6 +54,7 @@ local boxes = {
-- Delayer definition defaults
local def = {
drawtype = "nodebox",
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or nil,
walkable = true,
selection_box = {
type = "fixed",

View File

@ -12,6 +12,7 @@ minetest.register_node("mesecons_hydroturbine:hydro_turbine_off", {
"jeija_hydro_turbine_turbine_top_bottom_off.png",
"jeija_hydro_turbine_turbine_misc_off.png"
},
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or nil,
inventory_image = "jeija_hydro_turbine_inv.png",
is_ground_content = false,
wield_scale = {x=0.75, y=0.75, z=0.75},
@ -42,6 +43,7 @@ minetest.register_node("mesecons_hydroturbine:hydro_turbine_on", {
{ name = "jeija_hydro_turbine_turbine_misc_on.png",
animation = {type = "vertical_frames", aspect_w = 256, aspect_h = 32, length = 0.4} }
},
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or nil,
inventory_image = "jeija_hydro_turbine_inv.png",
drop = "mesecons_hydroturbine:hydro_turbine_off 1",
groups = {dig_immediate=2,not_in_creative_inventory=1},

View File

@ -9,9 +9,12 @@ local mesecon_lamp_box = {
wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125},
}
local use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or nil
minetest.register_node("mesecons_lamp:lamp_on", {
drawtype = "nodebox",
tiles = {"jeija_meselamp_on.png"},
use_texture_alpha = use_texture_alpha,
paramtype = "light",
paramtype2 = "wallmounted",
is_ground_content = false,
@ -36,6 +39,7 @@ minetest.register_node("mesecons_lamp:lamp_on", {
minetest.register_node("mesecons_lamp:lamp_off", {
drawtype = "nodebox",
tiles = {"jeija_meselamp_off.png"},
use_texture_alpha = use_texture_alpha,
inventory_image = "jeija_meselamp.png",
wield_image = "jeija_meselamp.png",
paramtype = "light",

View File

@ -276,7 +276,10 @@ minetest.register_node("pipeworks:autocrafter", {
update_meta(meta, false)
end,
on_receive_fields = function(pos, formname, fields, sender)
if not pipeworks.may_configure(pos, sender) then return end
if (fields.quit and not fields.key_enter_field)
or not pipeworks.may_configure(pos, sender) then
return
end
local meta = minetest.get_meta(pos)
if fields.on then
update_meta(meta, false)

View File

@ -151,7 +151,7 @@ minetest.register_alias("pipeworks:pipe", "pipeworks:pipe_110000_empty")
-- Unified Inventory categories integration
if unified_inventory and unified_inventory.registered_categories then
if minetest.global_exists("unified_inventory") and unified_inventory.registered_categories then
if not unified_inventory.registered_categories["automation"] then
unified_inventory.register_category("automation", {
symbol = "pipeworks:lua_tube000000",

View File

@ -666,6 +666,7 @@ local function reset_formspec(meta, code, errmsg)
code = minetest.formspec_escape(code or "")
errmsg = minetest.formspec_escape(tostring(errmsg or ""))
meta:set_string("formspec", "size[12,10]"
.."style_type[label,textarea;font=mono]"
.."background[-0.2,-0.25;12.4,10.75;jeija_luac_background.png]"
.."label[0.1,8.3;"..errmsg.."]"
.."textarea[0.2,0.2;12.2,9.5;code;;"..code.."]"

View File

@ -110,9 +110,22 @@ if pipeworks.enable_mese_tube then
update_formspec(pos)
meta:set_string("infotext", S("Sorting pneumatic tube"))
end,
after_place_node = function(pos, placer, itemstack, pointed_thing)
if placer and placer:is_player() and placer:get_player_control().aux1 then
local meta = minetest.get_meta(pos)
for i = 1, 6 do
meta:set_int("l"..tostring(i).."s", 0)
end
update_formspec(pos)
end
return pipeworks.after_place(pos, placer, itemstack, pointed_thing)
end,
on_punch = update_formspec,
on_receive_fields = function(pos, formname, fields, sender)
if not pipeworks.may_configure(pos, sender) then return end
if (fields.quit and not fields.key_enter_field)
or not pipeworks.may_configure(pos, sender) then
return
end
fs_helpers.on_receive_fields(pos, fields)
update_formspec(pos)
end,

View File

@ -1,14 +0,0 @@
default
pipeworks
technic_worldgen
basic_materials
bucket?
screwdriver?
mesecons?
mesecons_mvps?
digilines?
digiline_remote?
intllib?
unified_inventory?
vector_extras?
dye?

View File

@ -1,4 +1,6 @@
local have_ui = minetest.get_modpath("unified_inventory")
local have_cg = minetest.get_modpath("craftguide")
local have_i3 = minetest.get_modpath("i3")
technic.recipes = { cooking = { input_size = 1, output_size = 1 } }
function technic.register_recipe_type(typename, origdata)
@ -6,12 +8,24 @@ function technic.register_recipe_type(typename, origdata)
for k, v in pairs(origdata) do data[k] = v end
data.input_size = data.input_size or 1
data.output_size = data.output_size or 1
if have_ui and unified_inventory.register_craft_type and data.output_size == 1 then
unified_inventory.register_craft_type(typename, {
description = data.description,
width = data.input_size,
height = 1,
})
if data.output_size == 1 then
if have_ui and unified_inventory.register_craft_type then
unified_inventory.register_craft_type(typename, {
description = data.description,
width = data.input_size,
height = 1,
})
end
if have_cg and craftguide.register_craft_type then
craftguide.register_craft_type(typename, {
description = data.description,
})
end
if have_i3 then
i3.register_craft_type(typename, {
description = data.description,
})
end
end
data.recipes = {}
technic.recipes[typename] = data
@ -59,6 +73,27 @@ local function register_recipe(typename, data)
width = 0,
})
end
if (have_cg or have_i3) and technic.recipes[typename].output_size == 1 then
local result = data.output
if (type(result)=="table") then
result = result[1]
end
local items = table.concat(data.input, ", ")
if have_cg and craftguide.register_craft then
craftguide.register_craft({
type = typename,
result = result,
items = {items},
})
end
if have_i3 then
i3.register_craft({
type = typename,
result = result,
items = {items},
})
end
end
end
function technic.register_recipe(typename, data)

View File

@ -1,3 +1,3 @@
name = technic
depends = dreambuilder_theme_settings, default, pipeworks, technic_worldgen, basic_materials
optional_depends = bucket, screwdriver, mesecons, mesecons_mvps, digilines, digiline_remote, intllib, unified_inventory, vector_extras, dye
optional_depends = bucket, screwdriver, mesecons, mesecons_mvps, digilines, digiline_remote, intllib, unified_inventory, vector_extras, dye, craftguide,i3

View File

@ -177,8 +177,14 @@ load_home()
function ui.set_home(player, pos)
local player_name = player:get_player_name()
ui.home_pos[player_name] = vector.round(pos)
-- save the home data from the table to the file
local output = io.open(ui.home_filename, "w")
if not output then
minetest.log("warning", "[unified_inventory] Failed to save file: "
.. ui.home_filename)
return
end
for k, v in pairs(ui.home_pos) do
output:write(v.x.." "..v.y.." "..v.z.." "..k.."\n")
end

View File

@ -640,10 +640,34 @@ function worldedit.clear_objects(pos1, pos2)
worldedit.keep_loaded(pos1, pos2)
local function should_delete(obj)
-- Avoid players and WorldEdit entities
if obj:is_player() then
return false
end
local entity = obj:get_luaentity()
return not entity or not entity.name:find("^worldedit:")
end
-- Offset positions to include full nodes (positions are in the center of nodes)
local pos1x, pos1y, pos1z = pos1.x - 0.5, pos1.y - 0.5, pos1.z - 0.5
local pos2x, pos2y, pos2z = pos2.x + 0.5, pos2.y + 0.5, pos2.z + 0.5
local count = 0
if minetest.get_objects_in_area then
local objects = minetest.get_objects_in_area({x=pos1x, y=pos1y, z=pos1z},
{x=pos2x, y=pos2y, z=pos2z})
for _, obj in pairs(objects) do
if should_delete(obj) then
obj:remove()
count = count + 1
end
end
return count
end
-- Fallback implementation via get_objects_inside_radius
-- Center of region
local center = {
x = pos1x + ((pos2x - pos1x) / 2),
@ -655,12 +679,8 @@ function worldedit.clear_objects(pos1, pos2)
(center.x - pos1x) ^ 2 +
(center.y - pos1y) ^ 2 +
(center.z - pos1z) ^ 2)
local count = 0
for _, obj in pairs(minetest.get_objects_inside_radius(center, radius)) do
local entity = obj:get_luaentity()
-- Avoid players and WorldEdit entities
if not obj:is_player() and (not entity or
not entity.name:find("^worldedit:")) then
if should_delete(obj) then
local pos = obj:get_pos()
if pos.x >= pos1x and pos.x <= pos2x and
pos.y >= pos1y and pos.y <= pos2y and