Merge remote-tracking branch 'upstream/master'

This commit is contained in:
bri cassa 2023-12-13 20:58:45 +01:00
commit 501e9e302e
12 changed files with 64 additions and 32 deletions

View File

@ -31,7 +31,7 @@ else
}, },
groups = {food_banana = 1, fleshy = 3, dig_immediate = 3, flammable = 2}, groups = {food_banana = 1, fleshy = 3, dig_immediate = 3, flammable = 2},
on_use = minetest.item_eat(2), on_use = minetest.item_eat(2),
sounds = default.node_sound_leaves_defaults() sounds = farming.sounds.node_sound_leaves_defaults()
}) })
minetest.register_node(":ethereal:bananaleaves", { minetest.register_node(":ethereal:bananaleaves", {
@ -42,7 +42,7 @@ else
paramtype = "light", paramtype = "light",
waving = 1, waving = 1,
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
sounds = default.node_sound_leaves_defaults() sounds = farming.sounds.node_sound_leaves_defaults()
}) })
alias("farming_plus:banana_sapling", "default:sapling") alias("farming_plus:banana_sapling", "default:sapling")
@ -89,7 +89,7 @@ else
}, },
groups = {food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2}, groups = {food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2},
on_use = minetest.item_eat(4), on_use = minetest.item_eat(4),
sounds = default.node_sound_leaves_defaults() sounds = farming.sounds.node_sound_leaves_defaults()
}) })
alias("farming_plus:orange_item", "ethereal:orange") alias("farming_plus:orange_item", "ethereal:orange")

View File

@ -9,7 +9,10 @@ minetest.register_node("farming:seed_barley", {
inventory_image = "farming_barley_seed.png", inventory_image = "farming_barley_seed.png",
wield_image = "farming_barley_seed.png", wield_image = "farming_barley_seed.png",
drawtype = "signlike", drawtype = "signlike",
groups = {compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1}, groups = {
handy = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1,
growing = 1
},
paramtype = "light", paramtype = "light",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
walkable = false, walkable = false,

View File

@ -14,7 +14,9 @@ minetest.register_node("farming:cotton_wild", {
sunlight_propagates = true, sunlight_propagates = true,
walkable = false, walkable = false,
buildable_to = true, buildable_to = true,
groups = {handy = 1, snappy = 3, attached_node = 1, flammable = 4, compostability = 60}, groups = {
handy = 1, snappy = 3, attached_node = 1, flammable = 4, compostability = 60
},
drop = { drop = {
items = { items = {
{items = {"farming:cotton"}, rarity = 2}, {items = {"farming:cotton"}, rarity = 2},

View File

@ -9,7 +9,10 @@ minetest.register_node("farming:seed_hemp", {
inventory_image = "farming_hemp_seed.png", inventory_image = "farming_hemp_seed.png",
wield_image = "farming_hemp_seed.png", wield_image = "farming_hemp_seed.png",
drawtype = "signlike", drawtype = "signlike",
groups = {compostability = 38, seed = 1, snappy = 3, attached_node = 1, growing = 1}, groups = {
handy = 1, compostability = 38, seed = 1, snappy = 3, attached_node = 1,
growing = 1
},
paramtype = "light", paramtype = "light",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
walkable = false, walkable = false,
@ -91,7 +94,7 @@ minetest.register_craft( {
{"farming:hemp_leaf", "group:water_bucket", "farming:hemp_leaf"}, {"farming:hemp_leaf", "group:water_bucket", "farming:hemp_leaf"},
{"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"} {"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"}
}, },
replacements = {{a.bucket_water, a.bucket_empty}} replacements = {{"group:water_bucket", a.bucket_empty}}
}) })
if minetest.get_modpath("bucket_wooden") then if minetest.get_modpath("bucket_wooden") then
@ -112,10 +115,12 @@ minetest.register_node("farming:hemp_block", {
tiles = {"farming_hemp_block.png"}, tiles = {"farming_hemp_block.png"},
paramtype = "light", paramtype = "light",
groups = { groups = {
handy = 1, snappy = 2, oddly_breakable_by_hand = 1, flammable = 2, axey = 1, handy = 1, snappy = 2, oddly_breakable_by_hand = 1, flammable = 2,
compostability = 85 compostability = 85
}, },
sounds = farming.sounds.node_sound_leaves_defaults() sounds = farming.sounds.node_sound_leaves_defaults(),
_mcl_hardness = 0.8,
_mcl_blast_resistance = 1
}) })
minetest.register_craft( { minetest.register_craft( {
@ -178,13 +183,16 @@ minetest.register_node("farming:hemp_rope", {
inventory_image = "farming_hemp_rope.png", inventory_image = "farming_hemp_rope.png",
drawtype = "plantlike", drawtype = "plantlike",
groups = { groups = {
flammable = 2, choppy = 3, oddly_breakable_by_hand = 3, compostability = 55 handy = 1, axey = 1, swordy = 1, flammable = 2, choppy = 3,
oddly_breakable_by_hand = 3, compostability = 55
}, },
sounds = farming.sounds.node_sound_leaves_defaults(), sounds = farming.sounds.node_sound_leaves_defaults(),
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7} fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}
} },
_mcl_hardness = 0.8,
_mcl_blast_resistance = 1
}) })
-- string -- string

View File

@ -86,7 +86,9 @@ minetest.register_node("farming:melon_8", {
drop = "farming:melon_8", drop = "farming:melon_8",
sounds = farming.sounds.node_sound_wood_defaults(), sounds = farming.sounds.node_sound_wood_defaults(),
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = minetest.rotate_node on_place = minetest.rotate_node,
_mcl_hardness = 0.8,
_mcl_blast_resistance = 1
}) })
-- add to registered_plants -- add to registered_plants

View File

@ -11,7 +11,7 @@ minetest.register_node("farming:seed_mint", {
drawtype = "signlike", drawtype = "signlike",
groups = { groups = {
compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1,
flammable = 2 handy = 1, flammable = 2
}, },
paramtype = "light", paramtype = "light",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",

View File

@ -49,7 +49,9 @@ minetest.register_node("farming:jackolantern", {
if minetest.is_protected(pos, name) then return end if minetest.is_protected(pos, name) then return end
node.name = "farming:jackolantern_on" node.name = "farming:jackolantern_on"
minetest.swap_node(pos, node) minetest.swap_node(pos, node)
end end,
_mcl_hardness = 0.8,
_mcl_blast_resistance = 1
}) })
minetest.register_node("farming:jackolantern_on", { minetest.register_node("farming:jackolantern_on", {
@ -74,7 +76,9 @@ minetest.register_node("farming:jackolantern_on", {
if minetest.is_protected(pos, name) then return end if minetest.is_protected(pos, name) then return end
node.name = "farming:jackolantern" node.name = "farming:jackolantern"
minetest.swap_node(pos, node) minetest.swap_node(pos, node)
end end,
_mcl_hardness = 0.8,
_mcl_blast_resistance = 1
}) })
minetest.register_craft({ minetest.register_craft({
@ -100,7 +104,9 @@ minetest.register_node("farming:scarecrow_bottom", {
{-12/16, 4/16, -1/16, 12/16, 2/16, 1/16}, {-12/16, 4/16, -1/16, 12/16, 2/16, 1/16},
} }
}, },
groups = {handy = 1, snappy = 3, flammable = 2} groups = {axey = 1, handy = 1, snappy = 3, flammable = 2},
_mcl_hardness = 0.8,
_mcl_blast_resistance = 1
}) })
minetest.register_craft({ minetest.register_craft({
@ -194,12 +200,14 @@ minetest.register_node("farming:pumpkin_8", {
}, },
groups = { groups = {
food_pumpkin = 1, snappy = 3, choppy = 3, oddly_breakable_by_hand = 2, food_pumpkin = 1, snappy = 3, choppy = 3, oddly_breakable_by_hand = 2,
flammable = 2, plant = 1 flammable = 2, plant = 1, handy = 1
}, },
drop = "farming:pumpkin_8", drop = "farming:pumpkin_8",
sounds = farming.sounds.node_sound_wood_defaults(), sounds = farming.sounds.node_sound_wood_defaults(),
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = minetest.rotate_node on_place = minetest.rotate_node,
_mcl_hardness = 0.8,
_mcl_blast_resistance = 1
}) })
minetest.register_alias("farming:pumpkin", "farming:pumpkin_8") minetest.register_alias("farming:pumpkin", "farming:pumpkin_8")

View File

@ -10,7 +10,7 @@ minetest.register_node("farming:seed_rice", {
wield_image = "farming_rice_seed.png", wield_image = "farming_rice_seed.png",
drawtype = "signlike", drawtype = "signlike",
groups = { groups = {
compostability = 48, seed = 1, snappy = 3, attached_node = 1, handy = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1,
flammable = 4, growing = 1 flammable = 4, growing = 1
}, },
paramtype = "light", paramtype = "light",

View File

@ -18,7 +18,7 @@ minetest.register_node("farming:seed_sunflower", {
drawtype = "signlike", drawtype = "signlike",
groups = { groups = {
compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1,
food_sunflower_seeds = 1, flammable = 2 handy = 1, food_sunflower_seeds = 1, flammable = 2
}, },
paramtype = "light", paramtype = "light",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",

View File

@ -9,7 +9,9 @@ minetest.register_node("farming:seed_wheat", {
inventory_image = "farming_wheat_seed.png", inventory_image = "farming_wheat_seed.png",
wield_image = "farming_wheat_seed.png", wield_image = "farming_wheat_seed.png",
drawtype = "signlike", drawtype = "signlike",
groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1}, groups = {
handy = 1, seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1
},
paramtype = "light", paramtype = "light",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
walkable = false, walkable = false,
@ -36,8 +38,10 @@ minetest.register_node("farming:straw", {
description = S("Straw"), description = S("Straw"),
tiles = {"farming_straw.png"}, tiles = {"farming_straw.png"},
is_ground_content = false, is_ground_content = false,
groups = {snappy = 3, flammable = 4, fall_damage_add_percent = -30}, groups = {handy = 1, snappy = 3, flammable = 4, fall_damage_add_percent = -30},
sounds = farming.sounds.node_sound_leaves_defaults() sounds = farming.sounds.node_sound_leaves_defaults(),
_mcl_hardness = 0.8,
_mcl_blast_resistance = 1
}) })
minetest.register_craft({ minetest.register_craft({

View File

@ -135,9 +135,11 @@ end
minetest.register_node("farming:sugar_cube", { minetest.register_node("farming:sugar_cube", {
description = S("Sugar Cube"), description = S("Sugar Cube"),
tiles = {"farming_sugar_cube.png"}, tiles = {"farming_sugar_cube.png"},
groups = {crumbly = 2}, groups = {shovely = 1, handy = 1, crumbly = 2},
floodable = true, floodable = true,
sounds = farming.sounds.node_sound_gravel_defaults() sounds = farming.sounds.node_sound_gravel_defaults(),
_mcl_hardness = 0.8,
_mcl_blast_resistance = 1
}) })
minetest.register_craft({ minetest.register_craft({
@ -248,12 +250,14 @@ minetest.register_node("farming:salt_crystal", {
paramtype = "light", paramtype = "light",
light_source = 1, light_source = 1,
tiles = {"farming_salt_crystal.png"}, tiles = {"farming_salt_crystal.png"},
groups = { dig_immediate = 3, attached_node = 1}, groups = {dig_immediate = 3, attached_node = 1},
sounds = farming.sounds.node_sound_defaults(), sounds = farming.sounds.node_sound_defaults(),
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
} },
_mcl_hardness = 0.8,
_mcl_blast_resistance = 1
}) })
minetest.register_craft({ minetest.register_craft({

View File

@ -7,7 +7,7 @@
farming = { farming = {
mod = "redo", mod = "redo",
version = "20230915", version = "20231206",
path = minetest.get_modpath("farming"), path = minetest.get_modpath("farming"),
select = { select = {
type = "fixed", type = "fixed",
@ -29,10 +29,11 @@ farming = {
-- default sound functions just incase -- default sound functions just incase
function farming.sounds.node_sound_defaults() end function farming.sounds.node_sound_defaults() end
function farming.sounds.node_sound_leaves_defaults() end
function farming.sounds.node_sound_glass_defaults() end function farming.sounds.node_sound_glass_defaults() end
function farming.sounds.node_sound_wood_defaults() end
function farming.sounds.node_sound_gravel_defaults() end function farming.sounds.node_sound_gravel_defaults() end
function farming.sounds.node_sound_leaves_defaults() end
function farming.sounds.node_sound_stone_defaults() end
function farming.sounds.node_sound_wood_defaults() end
-- sounds check -- sounds check
if farming.mtg then farming.sounds = default end if farming.mtg then farming.sounds = default end
@ -586,7 +587,7 @@ farming.register_plant = function(name, def)
drawtype = "signlike", drawtype = "signlike",
groups = { groups = {
seed = 1, snappy = 3, attached_node = 1, flammable = 2, growing = 1, seed = 1, snappy = 3, attached_node = 1, flammable = 2, growing = 1,
compostability = 65 compostability = 65, handy = 1
}, },
paramtype = "light", paramtype = "light",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
@ -755,7 +756,7 @@ end
dofile(farming.path .. "/items.lua") dofile(farming.path .. "/items.lua")
-- important items -- important items
if not farming.mcl then if minetest.get_modpath("default") then
dofile(farming.path .. "/soil.lua") dofile(farming.path .. "/soil.lua")
dofile(farming.path .. "/hoes.lua") dofile(farming.path .. "/hoes.lua")
end end