diff --git a/README.md b/README.md index ec4143e..fbf763d 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ on an older map are enabled and growing properly. ### Changelog: -- 1.49 - Added {eatable=1} groups to food items with the value giving HP when eaten, improved mineclone support, separated foods from crop files., hoes can deal damage. +- 1.49 - Added {eatable=1} groups to food items with the value giving HP when eaten, improved mineclone support, separated foods from crop files, hoes can deal damage. Add weed and weed bale. - 1.48 - added 'farming_use_utensils' setting to enable/disable utensils in recipes, added mayonnaise (thx felfa), added gingerbread man, Added MineClone2 compatibility - 1.47 - Now blueberries can make blue dye, tweak soil types to work better with older 0.4.x clients and add spanish translation (thx mckaygerhard), add trellis setting to registered_crops and fix pea and soy crop names (thx nixnoxus), add strawberries if ethereal mod not active, added asparagus; spinach; eggplant (thx Atlante for new textures), Sugar Cube - 1.46 - Added min/max default light settings, added lettuce and blackberries with food items (thanks OgelGames), added soya, vanilla and sunflowers (thanks Felfa), added tofu, added salt crystals (thanks gorlock) diff --git a/compatibility.lua b/compatibility.lua index 6895326..06da9bd 100644 --- a/compatibility.lua +++ b/compatibility.lua @@ -34,12 +34,9 @@ else sunlight_propagates = true, walkable = false, selection_box = { - type = "fixed", - fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2} - }, - groups = { - food_banana = 1, fleshy = 3, dig_immediate = 3 + type = "fixed", fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2} }, + groups = {food_banana = 1, fleshy = 3, dig_immediate = 3}, is_ground_content = false, on_use = minetest.item_eat(2), sounds = farming.node_sound_leaves_defaults() @@ -101,12 +98,9 @@ else sunlight_propagates = true, walkable = false, selection_box = { - type = "fixed", - fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2} - }, - groups = { - food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2 + type = "fixed", fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2} }, + groups = {food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2}, is_ground_content = false, on_use = minetest.item_eat(4), sounds = farming.node_sound_leaves_defaults() @@ -165,7 +159,3 @@ alias("farming_plus:tomato_1", "farming:tomato_2") alias("farming_plus:tomato_2", "farming:tomato_4") alias("farming_plus:tomato_3", "farming:tomato_6") alias("farming_plus:tomato", "farming:tomato_8") - --- Weeds - -alias("farming:weed", "default:grass_2") diff --git a/item_non_food.lua b/item_non_food.lua index 99b4f3a..d118bf3 100644 --- a/item_non_food.lua +++ b/item_non_food.lua @@ -96,6 +96,42 @@ minetest.register_node("farming:straw", { _mcl_blast_resistance = 1 }) +-- weed + +minetest.register_node("farming:weed", { + description = S("Weed"), + drawtype = "plantlike", + tiles = {"farming_weed.png"}, + inventory_image = "farming_weed.png", + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 2, + sunlight_propagates = true, + walkable = false, + buildable_to = true, + waving = 1, + selection_box = farming.select, + groups = {snappy = 3, flammable = 4, plant = 1, attached_node = 1}, + _mcl_hardness = farming.mcl_hardness, + is_ground_content = false, + sounds = farming.node_sound_leaves_defaults() +}) + +-- weed bale + +minetest.register_node("farming:weed_bale", { + description = S("Weed Bale"), + tiles = { + "farming_weed_bale_top.png", "farming_weed_bale_top.png", + "farming_weed_bale_side.png" + }, + paramtype2 = "facedir", + groups = {handy = 1, snappy = 3, flammable = 4, fall_damage_add_percent = -30}, + sounds = farming.node_sound_leaves_defaults(), + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1 +}) + -- hemp oil minetest.register_node("farming:hemp_oil", { @@ -108,8 +144,7 @@ minetest.register_node("farming:hemp_oil", { is_ground_content = false, walkable = false, selection_box = { - type = "fixed", - fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + type = "fixed", fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} }, groups = { food_oil = 1, vessel = 1, dig_immediate = 3, attached_node = 1, @@ -161,8 +196,7 @@ minetest.register_node("farming:hemp_rope", { is_ground_content = false, sounds = farming.node_sound_leaves_defaults(), selection_box = { - type = "fixed", - fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7} + type = "fixed", fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7} }, _mcl_hardness = 0.8, _mcl_blast_resistance = 1 diff --git a/item_recipes.lua b/item_recipes.lua index 8cb77ad..69aa770 100644 --- a/item_recipes.lua +++ b/item_recipes.lua @@ -1253,6 +1253,25 @@ minetest.register_craft({ recipe = {{"farming:straw"}} }) + +-- weed bale + +local tmp = "farming:weed" + +minetest.register_craft({ + output = "farming:weed_bale", + recipe = { + {tmp, tmp, tmp}, + {tmp, tmp, tmp}, + {tmp, tmp, tmp} + } +}) + +minetest.register_craft({ + output = tmp .. " 9", + recipe = {{"farming:weed_bale"}} +}) + --= Recipes we shouldn't add when using Mineclonia/VoxeLibre if not farming.mcl then @@ -1400,6 +1419,8 @@ minetest.register_craft({output = a.dye_yellow, recipe = {{"group:food_onion"}}} minetest.register_craft({type = "fuel", recipe = "farming:straw", burntime = 3}) minetest.register_craft({type = "fuel", recipe = "farming:wheat", burntime = 1}) +minetest.register_craft({type = "fuel", recipe = "farming:weed_bale", burntime = 3}) +minetest.register_craft({type = "fuel", recipe = "farming:weed", burntime = 1}) minetest.register_craft({type = "fuel", recipe = "farming:bowl",burntime = 10}) minetest.register_craft({type = "fuel", recipe = "farming:string", burntime = 1}) minetest.register_craft({type = "fuel", recipe = "farming:cotton", burntime = 1}) diff --git a/lucky_block.lua b/lucky_block.lua index 5aa5f4c..5d5f724 100644 --- a/lucky_block.lua +++ b/lucky_block.lua @@ -105,5 +105,6 @@ lucky_block:add_blocks({ {name = "farming:grapebush", max = 5}, {name = "farming:asparagus", max = 7} }}, - {"dro", {"farming:chili_powder"}, 5} + {"dro", {"farming:chili_powder"}, 5}, + {"dro", {"farming:weed"}, 9}, }) diff --git a/soil.lua b/soil.lua index 7572d57..37acb02 100644 --- a/soil.lua +++ b/soil.lua @@ -194,3 +194,26 @@ minetest.register_abm({ end end }) + +-- those darn weeds + +minetest.register_abm({ + nodenames = {"group:field"}, + neighbors = {"air"}, + interval = 50, + chance = 15, + catch_up = false, + + action = function(pos, node) + + if minetest.find_node_near(pos, 4, {"farming:scarecrow_bottom"}) then + return + end + + pos.y = pos.y + 1 + + if minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "farming:weed", param2 = 2}) + end + end +}) diff --git a/textures/farming_weed.png b/textures/farming_weed.png new file mode 100644 index 0000000..8d65d18 Binary files /dev/null and b/textures/farming_weed.png differ diff --git a/textures/farming_weed_bale_side.png b/textures/farming_weed_bale_side.png new file mode 100644 index 0000000..7344c22 Binary files /dev/null and b/textures/farming_weed_bale_side.png differ diff --git a/textures/farming_weed_bale_top.png b/textures/farming_weed_bale_top.png new file mode 100644 index 0000000..29e6cf1 Binary files /dev/null and b/textures/farming_weed_bale_top.png differ