This commit is contained in:
root 2020-12-14 15:12:06 +01:00
parent cab32fbda5
commit 9a1372cd6a
66 changed files with 662 additions and 87 deletions

View file

@ -29,7 +29,7 @@
**Recommends:** sfinv, unified_inventory or smart_inventory (use only one to avoid conflicts) **Recommends:** sfinv, unified_inventory or smart_inventory (use only one to avoid conflicts)
**Supports:** player_monoids and armor_monoid **Supports:** player_monoids, armor_monoid and POVA
Adds craftable armor that is visible to other players. Each armor item worn contributes to Adds craftable armor that is visible to other players. Each armor item worn contributes to
a player's armor group level making them less vulnerable to weapons. a player's armor group level making them less vulnerable to weapons.
@ -105,7 +105,13 @@ Override the following default settings by adding them to your ***minetest.conf*
armor_fire_protect = false armor_fire_protect = false
### Enable punch damage effects. ### Fire protection enabled, disable torch fire damage
**when fire protection is enabled allows you to disable fire damage from torches**
**defaults to true if using ethereal mod**
armor_fire_protect_torch = false
### Enable punch damage effects
armor_punch_damage = true armor_punch_damage = true
@ -322,11 +328,11 @@ The below Diamond chestplate has a 12% chance to completely block all damage (ar
### Physics ### Physics
The physics attributes supported by 3d_armor are ***physics_jump, physics_speed and physics_gravity***. Although 3d_armor supports the use of this with no other mods it is recommended that the mod [player_monoids](https://forum.minetest.net/viewtopic.php?t=14895) is used to help with intermod compatability. The physics attributes supported by 3d_armor are ***physics_jump, physics_speed and physics_gravity***. Although 3d_armor supports the use of this with no other mods it is recommended that the mod [player_monoids](https://forum.minetest.net/viewtopic.php?t=14895) is used to help with intermod compatability.
***physics_jump*** - Will increase/decrease the jump strength of the player so they can jump more/less. Done as a fractional so "physics_jump=1.5" will increase jump strength by 50%. ***physics_jump*** - Will increase/decrease the jump strength of the player so they can jump more/less. The base number is "1" and any value is added or subtracted, supports fractional so "physics_jump=1" will increase jump strength by 100%. "physics_jump= -0.5" will decrease jump by 50%.
***physics_speed*** - Will increase/decrease the walk speed of the player so they walk faster/slower. Done as a fractional so "physics_speed=1.5" will increase speed by 50%. ***physics_speed*** - Will increase/decrease the walk speed of the player so they walk faster/slower. The base number is "1" and any value is added or subtracted, supports fractional so "physics_speed=1.5" will increase speed by 150%, "physics_speed= -0.5" will decrease speed by 50%.
***physics_gravity*** - Will increase/decrease gravity the player experiences so it's higher/lower. Done as a fractional so "physics_gravity=1.5" will increase gravity by 50%. ***physics_gravity*** - Will increase/decrease gravity the player experiences so it's higher/lower. The base number is "1" and any value is added or subtracted, supports fractional so "physics_gravity=2" will increase gravity by 200%, "physics_gravity= -1" will decrease gravity by 100%.
*Note: The player physics modifications won't be applied via `set_physics_override` if `player_physics_locked` is set to 1 in the respective player's meta.* *Note: The player physics modifications won't be applied via `set_physics_override` if `player_physics_locked` is set to 1 in the respective player's meta.*

View file

@ -97,6 +97,7 @@ armor.config = {
material_crystal = true, material_crystal = true,
water_protect = true, water_protect = true,
fire_protect = minetest.get_modpath("ethereal") ~= nil, fire_protect = minetest.get_modpath("ethereal") ~= nil,
fire_protect_torch = minetest.get_modpath("ethereal") ~= nil,
punch_damage = true, punch_damage = true,
} }
@ -356,6 +357,9 @@ armor.punch = function(self, player, hitter, time_from_last_punch, tool_capabili
local groupcaps = tool_capabilities.groupcaps or {} local groupcaps = tool_capabilities.groupcaps or {}
local uses = 0 local uses = 0
damage = false damage = false
if next(groupcaps) == nil then
damage = true
end
for group, caps in pairs(groupcaps) do for group, caps in pairs(groupcaps) do
local maxlevel = caps.maxlevel or 0 local maxlevel = caps.maxlevel or 0
local diff = maxlevel - level local diff = maxlevel - level

View file

@ -62,6 +62,17 @@ for material, _ in pairs(armor.materials) do
end end
end end
-- Remove torch damage if fire_protect_torch == false
if armor.config.fire_protect_torch == false and armor.config.fire_protect == true then
for k,v in pairs(armor.fire_nodes) do
for k2,v2 in pairs(v) do
if string.find (v2,"torch") then
armor.fire_nodes[k] = nil
end
end
end
end
-- Mod Compatibility -- Mod Compatibility
if minetest.get_modpath("technic") then if minetest.get_modpath("technic") then

View file

@ -44,6 +44,9 @@ armor_water_protect (Enable water protection) bool true
# Enable fire protection (defaults true if using ethereal mod). # Enable fire protection (defaults true if using ethereal mod).
armor_fire_protect (Enable fire protection) bool false armor_fire_protect (Enable fire protection) bool false
# Enable fire damage from torches (defaults true if using ethereal mod).
armor_fire_protect_torch (Enable fire protection torch damage) bool false
# Enable punch damage effects. # Enable punch damage effects.
armor_punch_damage (Enable damage effects) bool true armor_punch_damage (Enable damage effects) bool true

View file

@ -181,7 +181,7 @@ local function check_sapling(pos, nodename)
if can_grow then if can_grow then
particle_effect(pos) particle_effect(pos)
grow_tree(pos, saplings[n][2]) grow_tree(pos, saplings[n][2])
return return true
end end
end end
end end
@ -216,7 +216,7 @@ local function check_crops(pos, nodename, strength)
particle_effect(pos) particle_effect(pos)
return return true
end end
end end
end end
@ -438,13 +438,13 @@ function bonemeal:on_use(pos, strength, node)
default.grow_papyrus(pos, node) default.grow_papyrus(pos, node)
particle_effect(pos) particle_effect(pos)
return return true
elseif node.name == "default:cactus" then elseif node.name == "default:cactus" then
default.grow_cactus(pos, node) default.grow_cactus(pos, node)
particle_effect(pos) particle_effect(pos)
return return true
end end
-- grow grass and flowers -- grow grass and flowers
@ -452,7 +452,7 @@ function bonemeal:on_use(pos, strength, node)
or minetest.get_item_group(node.name, "sand") > 0 or minetest.get_item_group(node.name, "sand") > 0
or minetest.get_item_group(node.name, "can_bonemeal") > 0 then or minetest.get_item_group(node.name, "can_bonemeal") > 0 then
check_soil(pos, node.name, strength) check_soil(pos, node.name, strength)
return return true
end end
-- light check depending on strength (strength of 4 = no light needed) -- light check depending on strength (strength of 4 = no light needed)
@ -464,11 +464,13 @@ function bonemeal:on_use(pos, strength, node)
if minetest.get_item_group(node.name, "sapling") > 0 if minetest.get_item_group(node.name, "sapling") > 0
and random(5 - strength) == 1 then and random(5 - strength) == 1 then
check_sapling(pos, node.name) check_sapling(pos, node.name)
return return true
end end
-- check for crop growth -- check for crop growth
check_crops(pos, node.name, strength) if check_crops(pos, node.name, strength) then
return true
end
end end
@ -494,13 +496,14 @@ minetest.register_craftitem("bonemeal:mulch", {
return return
end end
-- call global on_use function with strength of 1
if bonemeal:on_use(pointed_thing.under, 1) then
-- take item if not in creative -- take item if not in creative
if not bonemeal.is_creative(user:get_player_name()) then if not bonemeal.is_creative(user:get_player_name()) then
itemstack:take_item() itemstack:take_item()
end end
end
-- call global on_use function with strength of 1
bonemeal:on_use(pointed_thing.under, 1)
return itemstack return itemstack
end end
@ -524,13 +527,14 @@ minetest.register_craftitem("bonemeal:bonemeal", {
return return
end end
-- call global on_use function with strength of 2
if bonemeal:on_use(pointed_thing.under, 2) then
-- take item if not in creative -- take item if not in creative
if not bonemeal.is_creative(user:get_player_name()) then if not bonemeal.is_creative(user:get_player_name()) then
itemstack:take_item() itemstack:take_item()
end end
end
-- call global on_use function with strength of 2
bonemeal:on_use(pointed_thing.under, 2)
return itemstack return itemstack
end end
@ -554,13 +558,14 @@ minetest.register_craftitem("bonemeal:fertiliser", {
return return
end end
-- call global on_use function with strength of 3
if bonemeal:on_use(pointed_thing.under, 3) then
-- take item if not in creative -- take item if not in creative
if not bonemeal.is_creative(user:get_player_name()) then if not bonemeal.is_creative(user:get_player_name()) then
itemstack:take_item() itemstack:take_item()
end end
end
-- call global on_use function with strength of 3
bonemeal:on_use(pointed_thing.under, 3)
return itemstack return itemstack
end end

View file

@ -32,7 +32,7 @@ if farming and farming.mod and farming.mod == "redo" then
{"farming:chili_", 8}, {"farming:chili_", 8},
{"farming:garlic_", 5}, {"farming:garlic_", 5},
{"farming:onion_", 5}, {"farming:onion_", 5},
{"farming:pepper_", 5}, {"farming:pepper_", 7},
{"farming:pineapple_", 8}, {"farming:pineapple_", 8},
{"farming:pea_", 5}, {"farming:pea_", 5},
{"farming:beetroot_", 5}, {"farming:beetroot_", 5},
@ -40,7 +40,11 @@ if farming and farming.mod and farming.mod == "redo" then
{"farming:oat_", 8}, {"farming:oat_", 8},
{"farming:rice_", 8}, {"farming:rice_", 8},
{"farming:mint_", 4}, {"farming:mint_", 4},
{"farming:cabbage_", 6} {"farming:cabbage_", 6},
{"farming:lettuce_", 5},
{"farming:blackberry_", 4},
{"farming:vanilla_", 8},
{"farming:soy_", 7}
}) })
end end
@ -65,7 +69,9 @@ if minetest.get_modpath("ethereal") then
{"ethereal:orange_tree_sapling", ethereal.grow_orange_tree, "soil"}, {"ethereal:orange_tree_sapling", ethereal.grow_orange_tree, "soil"},
{"ethereal:bamboo_sprout", ethereal.grow_bamboo_tree, "soil"}, {"ethereal:bamboo_sprout", ethereal.grow_bamboo_tree, "soil"},
{"ethereal:birch_sapling", ethereal.grow_birch_tree, "soil"}, {"ethereal:birch_sapling", ethereal.grow_birch_tree, "soil"},
{"ethereal:sakura_sapling", ethereal.grow_sakura_tree, "soil"} {"ethereal:sakura_sapling", ethereal.grow_sakura_tree, "soil"},
{"ethereal:lemon_tree_sapling", ethereal.grow_lemon_tree, "soil"},
{"ethereal:olive_tree_sapling", ethereal.grow_olive_tree, "soil"}
}) })
local grass = {"default:grass_3", "default:grass_4", "default:grass_5", ""} local grass = {"default:grass_3", "default:grass_4", "default:grass_5", ""}

View file

@ -13,7 +13,8 @@ This mod works by adding your new plant to the {growing=1} group and numbering t
### Changelog: ### Changelog:
- 1.45 - Dirt and Hoes are more in line with default by using dry/wet/base, added cactus juice, added pasta, spaghetti, cabbage, korean bibimbap, code tidy, minmax light setting - 1.46 - Added min/max default light settings, added lettuce and blackberries with food items (thanks OgelGames), added soya and vanilla (thanks Felfa), added tofu
- 1.45 - Dirt and Hoes are more in line with default by using dry/wet/base, added cactus juice, added pasta, spaghetti, cabbage, korean bibimbap, code tidy
options, onion soup added (thanks edcrypt), Added apple pie, added wild cotton to savanna options, onion soup added (thanks edcrypt), Added apple pie, added wild cotton to savanna
- 1.44 - Added 'farming_stage_length' in mod settings for speed of crop growth, also thanks to TheDarkTiger for translation updates - 1.44 - Added 'farming_stage_length' in mod settings for speed of crop growth, also thanks to TheDarkTiger for translation updates
- 1.43 - Scythe works on use instead of right-click, added seed=1 groups to actual seeds and seed=2 group for plantable food items. - 1.43 - Scythe works on use instead of right-click, added seed=1 groups to actual seeds and seed=2 group for plantable food items.

View file

@ -0,0 +1,62 @@
local S = farming.intllib
-- blackberries
minetest.register_craftitem("farming:blackberry", {
description = S("Blackberries"),
inventory_image = "farming_blackberry.png",
groups = {seed = 2, food_blackberries = 1, food_blackberry = 1,
food_berry = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:blackberry_1")
end,
on_use = minetest.item_eat(1),
})
local def = {
drawtype = "plantlike",
tiles = {"farming_blackberry_1.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = "",
selection_box = farming.select,
groups = {
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
not_in_creative_inventory = 1, growing = 1
},
sounds = default.node_sound_leaves_defaults()
}
-- stage 1
minetest.register_node("farming:blackberry_1", table.copy(def))
-- stage 2
def.tiles = {"farming_blackberry_2.png"}
minetest.register_node("farming:blackberry_2", table.copy(def))
-- stage 3
def.tiles = {"farming_blackberry_3.png"}
minetest.register_node("farming:blackberry_3", table.copy(def))
-- stage 4
def.tiles = {"farming_blackberry_4.png"}
def.groups.growing = nil
def.drop = {
items = {
{items = {'farming:blackberry 2'}, rarity = 1},
{items = {'farming:blackberry'}, rarity = 2},
{items = {'farming:blackberry'}, rarity = 3},
}
}
minetest.register_node("farming:blackberry_4", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:blackberry"] = {
crop = "farming:blackberry",
seed = "farming:blackberry",
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 4
}

View file

@ -53,8 +53,8 @@ def.tiles = {"farming_cabbage_6.png"}
def.groups.growing = nil def.groups.growing = nil
def.drop = { def.drop = {
max_items = 2, items = { max_items = 2, items = {
{items = {"farming:cabbage"}, rarity = 1}, {items = {"farming:cabbage 2"}, rarity = 1},
{items = {"farming:cabbage"}, rarity = 2} {items = {"farming:cabbage 1"}, rarity = 2}
} }
} }
minetest.register_node("farming:cabbage_6", table.copy(def)) minetest.register_node("farming:cabbage_6", table.copy(def))

View file

@ -0,0 +1,63 @@
local S = farming.intllib
-- lettuce
minetest.register_craftitem("farming:lettuce", {
description = S("Lettuce"),
inventory_image = "farming_lettuce.png",
groups = {seed = 2, food_lettuce = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:lettuce_1")
end,
on_use = minetest.item_eat(2),
})
local def = {
drawtype = "plantlike",
tiles = {"farming_lettuce_1.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = "",
selection_box = farming.select,
groups = {
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
not_in_creative_inventory = 1, growing = 1
},
sounds = default.node_sound_leaves_defaults()
}
-- stage 1
minetest.register_node("farming:lettuce_1", table.copy(def))
-- stage 2
def.tiles = {"farming_lettuce_2.png"}
minetest.register_node("farming:lettuce_2", table.copy(def))
-- stage 3
def.tiles = {"farming_lettuce_3.png"}
minetest.register_node("farming:lettuce_3", table.copy(def))
-- stage 4
def.tiles = {"farming_lettuce_4.png"}
minetest.register_node("farming:lettuce_4", table.copy(def))
-- stage 5
def.tiles = {"farming_lettuce_5.png"}
def.groups.growing = nil
def.drop = {
items = {
{items = {'farming:lettuce 2'}, rarity = 1},
{items = {'farming:lettuce 1'}, rarity = 2},
}
}
minetest.register_node("farming:lettuce_5", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:lettuce"] = {
crop = "farming:lettuce",
seed = "farming:lettuce",
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 5
}

View file

@ -19,16 +19,32 @@ minetest.register_craftitem("farming:peppercorn", {
-- green pepper -- green pepper
minetest.register_craftitem("farming:pepper", { minetest.register_craftitem("farming:pepper", {
description = S("Pepper"), description = S("Green Pepper"),
inventory_image = "crops_pepper.png", inventory_image = "crops_pepper.png",
on_use = minetest.item_eat(2), on_use = minetest.item_eat(2),
groups = {food_pepper = 1, flammable = 3} groups = {food_pepper = 1, flammable = 3}
}) })
-- yellow pepper
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},
})
-- red pepper
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},
})
minetest.register_craft({ minetest.register_craft({
type = "shapeless", type = "shapeless",
output = "farming:peppercorn", output = "farming:peppercorn",
recipe = {"farming:pepper"} recipe = {"group:food_pepper"}
}) })
-- ground pepper -- ground pepper
@ -93,11 +109,10 @@ minetest.register_node("farming:pepper_3", table.copy(def))
def.tiles = {"crops_pepper_plant_4.png"} def.tiles = {"crops_pepper_plant_4.png"}
minetest.register_node("farming:pepper_4", table.copy(def)) minetest.register_node("farming:pepper_4", table.copy(def))
-- stage 5 -- stage 5 (green pepper)
def.tiles = {"crops_pepper_plant_5.png"} def.tiles = {"crops_pepper_plant_5.png"}
def.groups.growing = 0
def.drop = { def.drop = {
items = { max_items = 2, items = {
{items = {"farming:pepper 2"}, rarity = 1}, {items = {"farming:pepper 2"}, rarity = 1},
{items = {"farming:pepper"}, rarity = 2}, {items = {"farming:pepper"}, rarity = 2},
{items = {"farming:pepper"}, rarity = 3} {items = {"farming:pepper"}, rarity = 3}
@ -105,6 +120,29 @@ def.drop = {
} }
minetest.register_node("farming:pepper_5", table.copy(def)) minetest.register_node("farming:pepper_5", table.copy(def))
-- stage 6 (yellow pepper)
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},
}
}
minetest.register_node("farming:pepper_6", table.copy(def))
-- stage 7 (red pepper)
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},
}
}
minetest.register_node("farming:pepper_7", table.copy(def))
-- add to registered_plants -- add to registered_plants
farming.registered_plants["farming:pepper"] = { farming.registered_plants["farming:pepper"] = {
crop = "farming:pepper", crop = "farming:pepper",

171
mods/farming/crops/soy.lua Normal file
View file

@ -0,0 +1,171 @@
local S = farming.intllib
-- soy pod
minetest.register_craftitem("farming:soy_pod", {
description = S("Soy Pod"),
inventory_image = "farming_soy_pod.png",
groups = {seed = 2, food_soy_pod = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:soy_1")
end
})
minetest.register_craftitem("farming:soy_beans", {
description = S("Soy Beans"),
inventory_image = "farming_soy_beans.png",
groups = {food_soy = 1, flammable = 2},
on_use = minetest.item_eat(1)
})
minetest.register_craft({
type = "shapeless",
output = "farming:soy_beans",
recipe = {"farming:soy_pod"}
})
-- soy milk
minetest.register_node("farming:soy_milk", {
description = S("Soy Milk"),
drawtype = "plantlike",
tiles = {"farming_soy_milk_glass.png"},
inventory_image = "farming_soy_milk_glass.png",
wield_image = "farming_soy_milk_glass.png",
paramtype = "light",
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
},
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
groups = {
vessel = 1, food_milk_glass = 1, dig_immediate = 3,
attached_node = 1, drink = 1
},
sounds = default.node_sound_glass_defaults()
})
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"
},
replacements = {
{"bucket:bucket_water", "bucket:bucket_empty"},
{"farming:vanilla_extract", "vessels:glass_bottle"}
}
})
-- tofu
minetest.register_craftitem("farming:tofu", {
description = S("Tofu"),
inventory_image = "farming_tofu.png",
groups = {food_tofu = 1, food_meat_raw = 1, flammable = 2},
on_use = minetest.item_eat(3)
})
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",
},
replacements = {{"farming:baking_tray", "farming:baking_tray"}}
})
-- cooked tofu
minetest.register_craftitem("farming:tofu_cooked", {
description = S("Cooked Tofu"),
inventory_image = "farming_tofu_cooked.png",
groups = {food_meat = 1, flammable = 2},
on_use = minetest.item_eat(6)
})
minetest.register_craft({
type = "cooking",
output = "farming:tofu_cooked",
recipe = "farming:tofu",
cooktime = 5
})
-- crop definition
local def = {
drawtype = "plantlike",
tiles = {"farming_soy_1.png"},
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
sunlight_propagates = true,
waving = 1,
walkable = false,
buildable_to = true,
drop = "",
selection_box = farming.select,
groups = {
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
not_in_creative_inventory = 1, growing = 1
},
sounds = default.node_sound_leaves_defaults()
}
-- stage 1
minetest.register_node("farming:soy_1", table.copy(def))
-- stage 2
def.tiles = {"farming_soy_2.png"}
minetest.register_node("farming:soy_2", table.copy(def))
-- stage 3
def.tiles = {"farming_soy_3.png"}
minetest.register_node("farming:soy_3", table.copy(def))
-- stage 4
def.tiles = {"farming_soy_4.png"}
minetest.register_node("farming:soy_4", table.copy(def))
-- stage 5
def.tiles = {"farming_soy_5.png"}
def.drop = {
max_items = 1, items = {
{items = {'farming:soy_pod'}, rarity = 1},
}
}
minetest.register_node("farming:soy_5", table.copy(def))
-- stage 6
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},
}
}
minetest.register_node("farming:soy_6", table.copy(def))
-- stage 7
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}
}
}
minetest.register_node("farming:soy_7", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:soy_pod"] = {
crop = "farming:soy",
seed = "farming:soy_pod",
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 7
}

View file

@ -0,0 +1,122 @@
local S = farming.intllib
-- vanilla
minetest.register_craftitem("farming:vanilla", {
description = S("Vanilla"),
inventory_image = "farming_vanilla.png",
groups = {seed = 2, food_vanilla = 1, flammable = 2},
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),
})
-- crop definition
local def = {
drawtype = "plantlike",
tiles = {"farming_vanilla_1.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = "",
selection_box = farming.select,
groups = {
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
not_in_creative_inventory = 1, growing = 1
},
sounds = default.node_sound_leaves_defaults()
}
-- vanilla extract
minetest.register_node("farming:vanilla_extract", {
description = S("Vanilla Extract"),
drawtype = "plantlike",
tiles = {"farming_vanilla_extract.png"},
inventory_image = "farming_vanilla_extract.png",
wield_image = "farming_vanilla_extract.png",
paramtype = "light",
is_ground_content = false,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
},
groups = {vessel = 1, dig_immediate = 3, attached_node = 1},
sounds = default.node_sound_glass_defaults(),
})
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"},
},
replacements = {
{"bucket:bucket_water", "bucket:bucket_empty"},
}
})
minetest.register_craft({
type = "fuel",
recipe = "farming:vanilla_extract",
burntime = 25,
replacements = {{ "farming:vanilla_extract", "vessels:glass_bottle" }}
})
-- stage 1
minetest.register_node("farming:vanilla_1", table.copy(def))
-- stage 2
def.tiles = {"farming_vanilla_2.png"}
minetest.register_node("farming:vanilla_2", table.copy(def))
-- stage 3
def.tiles = {"farming_vanilla_3.png"}
minetest.register_node("farming:vanilla_3", table.copy(def))
-- stage 4
def.tiles = {"farming_vanilla_4.png"}
minetest.register_node("farming:vanilla_4", table.copy(def))
-- stage 5
def.tiles = {"farming_vanilla_5.png"}
minetest.register_node("farming:vanilla_5", table.copy(def))
-- stage 6
def.tiles = {"farming_vanilla_6.png"}
def.visual_scale = 1.9
minetest.register_node("farming:vanilla_6", table.copy(def))
-- stage 7
def.tiles = {"farming_vanilla_7.png"}
def.drop = {
items = {
{items = {'farming:vanilla'}, rarity = 1},
{items = {'farming:vanilla'}, rarity = 2},
{items = {'farming:vanilla'}, rarity = 3}
}
}
minetest.register_node("farming:vanilla_7", table.copy(def))
-- stage 8 (final)
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}
}
}
minetest.register_node("farming:vanilla_8", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:vanilla"] = {
crop = "farming:vanilla",
seed = "farming:vanilla",
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 8
}

View file

@ -31,6 +31,10 @@ farming.peas = 0.001
farming.beetroot = 0.001 farming.beetroot = 0.001
farming.mint = 0.005 farming.mint = 0.005
farming.cabbage = 0.001 farming.cabbage = 0.001
farming.blackberry = 0.002
farming.lettuce = 0.001
farming.soy = 0.001
farming.vanilla = 0.001
farming.grains = true -- true or false only farming.grains = true -- true or false only
-- default rarety of crops on map (higher number = more crops) -- default rarety of crops on map (higher number = more crops)

View file

@ -181,44 +181,18 @@ minetest.register_craftitem("farming:porridge", {
on_use = minetest.item_eat(6, "farming:bowl") on_use = minetest.item_eat(6, "farming:bowl")
}) })
minetest.after(0, function()
local fluid = "group:water_bucket"
local fluid_return = {
{"group:water_bucket", "bucket:bucket_empty"},
{"group:water_bucket_wooden", "bucket:bucket_empty"}
}
if minetest.get_modpath("mobs") and mobs and mobs.mod == "redo" then
fluid = "group:food_milk"
fluid_return = {
{"mobs:bucket_milk", "bucket:bucket_empty"}
}
else
minetest.register_craft({ minetest.register_craft({
type = "shapeless", type = "shapeless",
output = "farming:porridge", output = "farming:porridge",
recipe = { recipe = {
"group:food_oats", "group:food_oats", "group:food_oats", "group:food_oats", "group:food_oats", "group:food_oats",
"group:food_oats", "group:food_bowl", "group:water_bucket_wooden" "group:food_oats", "group:food_bowl", "group:food_milk_glass"
}, },
replacements = fluid_return replacements = {
{"mobs:glass_milk", "vessels:drinking_glass"},
{"farming:soy_milk", "vessels:drinking_glass"}
}
}) })
end
minetest.register_craft({
type = "shapeless",
output = "farming:porridge",
recipe = {
"group:food_oats", "group:food_oats", "group:food_oats",
"group:food_oats", "group:food_bowl", fluid
},
replacements = fluid_return
})
if minetest.get_modpath("bucket_wooden") then
end
end)
--= Jaffa Cake --= Jaffa Cake
@ -373,3 +347,57 @@ minetest.register_craft({
replacements = {{"group:food_skillet", "farming:skillet"}} replacements = {{"group:food_skillet", "farming:skillet"}}
}) })
end end
-- Burger
minetest.register_craftitem("farming:burger", {
description = S("Burger"),
inventory_image = "farming_burger.png",
on_use = minetest.item_eat(16),
})
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"
}
})
-- Salad
minetest.register_craftitem("farming:salad", {
description = S("Salad"),
inventory_image = "farming_salad.png",
on_use = minetest.item_eat(8, "farming:bowl")
})
minetest.register_craft({
output = "farming:salad",
type = "shapeless",
recipe = {
"group:food_bowl", "group:food_tomato", "group:food_cucumber",
"group:food_lettuce", "group:food_oil"
},
})
-- Triple Berry Smoothie
minetest.register_craftitem("farming:smoothie_berry", {
description = S("Triple Berry Smoothie"),
inventory_image = "farming_berry_smoothie.png",
on_use = minetest.item_eat(6, "vessels:drinking_glass"),
groups = {vessel = 1, drink = 1}
})
minetest.register_craft({
output = "farming:smoothie_berry",
type = "shapeless",
recipe = {
"group:food_raspberries", "group:food_blackberries",
"group:food_strawberry", "group:food_banana",
"vessels:drinking_glass"
}
})

View file

@ -7,7 +7,7 @@
farming = { farming = {
mod = "redo", mod = "redo",
version = "20201209", version = "20201213",
path = minetest.get_modpath("farming"), path = minetest.get_modpath("farming"),
select = { select = {
type = "fixed", type = "fixed",
@ -629,6 +629,10 @@ farming.peas = 0.001
farming.beetroot = 0.001 farming.beetroot = 0.001
farming.mint = 0.005 farming.mint = 0.005
farming.cabbage = 0.001 farming.cabbage = 0.001
farming.blackberry = 0.002
farming.soy = 0.001
farming.vanilla = 0.001
farming.lettuce = 0.001
farming.grains = true farming.grains = true
farming.rarety = 0.002 farming.rarety = 0.002
@ -695,6 +699,10 @@ ddoo("chili.lua", farming.chili)
ddoo("ryeoatrice.lua", farming.grains) ddoo("ryeoatrice.lua", farming.grains)
ddoo("mint.lua", farming.mint) ddoo("mint.lua", farming.mint)
ddoo("cabbage.lua", farming.cabbage) ddoo("cabbage.lua", farming.cabbage)
ddoo("blackberry.lua", farming.blackberry)
ddoo("soy.lua", farming.soy)
ddoo("vanilla.lua", farming.vanilla)
ddoo("lettuce.lua", farming.lettuce)
dofile(farming.path .. "/food.lua") dofile(farming.path .. "/food.lua")
dofile(farming.path .. "/mapgen.lua") dofile(farming.path .. "/mapgen.lua")

View file

@ -128,6 +128,7 @@ Created by TenPlus1 (CC BY 3.0)
farming_rhubarb.png farming_rhubarb.png
farming_rhubarb_pie.png farming_rhubarb_pie.png
farming_hemp*.png farming_hemp*.png
farming_tofu*.png
Created by ademant (CC-BY-3.0) Created by ademant (CC-BY-3.0)
farming_rye*.png farming_rye*.png
@ -142,3 +143,15 @@ Created by VanessaE and edited by SpaghettiToastBook (CC0):
Created by mDiyo (Natura), modified by TenPlus1 (License: CC BY-SA 3.0): Created by mDiyo (Natura), modified by TenPlus1 (License: CC BY-SA 3.0):
farming_barley.png farming_barley.png
Created by OgelGames (CC BY-SA 4.0)
farming_berry_smoothie.png
farming_cactus_juice.png
farming_salad.png
Created by Felfa
farming_blackberry*.png
farming_lettuce*.png
farming_burger.png
farming_soy*.png
farming_vanilla*.png

View file

@ -50,6 +50,12 @@ register_plant("beetroot_5", 1, 15, nil, "", -1, farming.beetroot)
register_plant("mint_4", 1, 75, {"default:dirt_with_grass", register_plant("mint_4", 1, 75, {"default:dirt_with_grass",
"default:dirt_with_coniferous_litter"}, "group:water", 1, farming.mint) "default:dirt_with_coniferous_litter"}, "group:water", 1, farming.mint)
register_plant("cabbage_6", 2, 10, nil, "", -1, farming.cabbage) register_plant("cabbage_6", 2, 10, nil, "", -1, farming.cabbage)
register_plant("lettuce_5", 5, 30, nil, "", -1, farming.lettuce)
register_plant("blackberry_4", 3, 10, nil, "", -1, farming.blackberry)
register_plant("soy_6", 20, 50, {"default:dirt_with_dry_grass",
"default:dirt_with_rainforest_litter",
"default:dry_dirt_with_dry_grass"}, "", -1, farming.soy)
register_plant("vanilla_7", 5, 35, nil, "", -1, farming.vanilla)
if minetest.get_mapgen_setting("mg_name") == "v6" then if minetest.get_mapgen_setting("mg_name") == "v6" then
@ -124,7 +130,7 @@ minetest.register_decoration({
}, },
y_min = 5, y_min = 5,
y_max = 35, y_max = 35,
decoration = {"farming:pepper_5"}, decoration = {"farming:pepper_5", "farming:pepper_6", "farming:pepper_7"},
spawn_by = "group:tree", spawn_by = "group:tree",
num_spawn_by = 1 num_spawn_by = 1
}) })

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

View file

@ -6,7 +6,7 @@ local S = minetest.get_translator and minetest.get_translator("mob_horse") or
-- 0.4.17 or 5.0 check -- 0.4.17 or 5.0 check
local y_off = 20 local y_off = 20
if minetest.registered_nodes["default:permafrost"] then if minetest.features.object_independent_selectionbox then
y_off = 10 y_off = 10
end end
@ -104,6 +104,14 @@ mobs:register_mob("mob_horse:horse", {
end, end,
do_punch = function(self, hitter)
-- don't cut the branch you're... ah, that's not about that
if hitter ~= self.driver then
return true
end
end,
on_rightclick = function(self, clicker) on_rightclick = function(self, clicker)
-- make sure player is clicking -- make sure player is clicking
@ -121,8 +129,10 @@ mobs:register_mob("mob_horse:horse", {
return return
end end
local player_name = clicker:get_player_name()
-- make sure tamed horse is being clicked by owner only -- make sure tamed horse is being clicked by owner only
if self.tamed and self.owner == clicker:get_player_name() then if self.tamed and self.owner == player_name then
local inv = clicker:get_inventory() local inv = clicker:get_inventory()
local tool = clicker:get_wielded_item() local tool = clicker:get_wielded_item()
@ -184,13 +194,15 @@ mobs:register_mob("mob_horse:horse", {
end end
-- show horse speed and jump stats with shoes fitted -- show horse speed and jump stats with shoes fitted
minetest.chat_send_player(clicker:get_player_name(), minetest.chat_send_player(player_name,
S("Horse shoes fitted -") S("Horse shoes fitted -")
.. S(" speed: ") .. speed .. S(" speed: ") .. speed
.. S(" , jump height: ") .. jump .. S(" , jump height: ") .. jump
.. S(" , stop speed: ") .. reverse) .. S(" , stop speed: ") .. reverse)
tool:take_item() ; clicker:set_wielded_item(tool) tool:take_item()
clicker:set_wielded_item(tool)
return return
end end

View file

@ -0,0 +1,3 @@
Bald Man
El_Naso
CC BY-SA 4.0

View file

@ -0,0 +1,3 @@
annotatemyfaith
annotatemyfaith
CC BY-SA 3.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -342,8 +342,13 @@ if minetest.global_exists("unified_inventory") then
width = 2, width = 2,
height = 2, height = 2,
}) })
local leaves_table = {}
for i = 1, NUM_LEAVES do
table.insert(leaves_table, "group:leaves")
end
unified_inventory.register_craft({ unified_inventory.register_craft({
items = {"group:leaves", "group:leaves"}, items = leaves_table,
output = "tubelib_addons1:biogas", output = "tubelib_addons1:biogas",
type = "fermenting" type = "fermenting"
}) })

View file

@ -215,7 +215,8 @@ local function quarry_next_node(pos, meta)
meta:set_string("quarry_pos", P2S(quarry_pos)) meta:set_string("quarry_pos", P2S(quarry_pos))
if minetest.is_protected(quarry_pos, owner) then if minetest.is_protected(quarry_pos, owner) then
minetest.chat_send_player(owner, S("[Tubelib Quarry] Area is protected!")) minetest.chat_send_player(owner, S("[Tubelib Quarry] Area is protected!") ..
" " .. minetest.pos_to_string(quarry_pos) )
State:fault(pos, meta) State:fault(pos, meta)
return return
end end

View file

@ -58,7 +58,7 @@ function tubelib2.get_node_lvm(pos)
local data = vm:get_data() local data = vm:get_data()
local param2_data = vm:get_param2_data() local param2_data = vm:get_param2_data()
local area = VoxelArea:new({MinEdge = MinEdge, MaxEdge = MaxEdge}) local area = VoxelArea:new({MinEdge = MinEdge, MaxEdge = MaxEdge})
local idx = area:index(pos.x, pos.y, pos.z) local idx = area:indexp(pos)
node = { node = {
name = minetest.get_name_from_content_id(data[idx]), name = minetest.get_name_from_content_id(data[idx]),
param2 = param2_data[idx] param2 = param2_data[idx]