From 4aab7d0dbd782cf6741bdbba94440faf0c5c2e61 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sat, 12 Aug 2017 20:37:50 -0400 Subject: updated several mods biome_lib, boost cart, homedecor modpack, plantlife modpack, cottages, currency, farming redo, gloopblocks, ilights, moreores, moretrees, pipeworks, plasticbox, replacer, signs_lib, streets, travelnet, unified dyes, and vines, and maybe one or two others that I didn't see in the list. :-) I fixed the misc_overrides component (it broke when I switched over to farming redo a while back), and also I've added the classic peaceful_npc mod back into the modpack, since it seems to work now. Be sure when you run a world for the first time after this update, that you "Configure" the world, *disable* all of Dreambuilder Modpack, then re-enable the whole thing. If you don't, a few mods will fail to load due to recent changes in their dependencies. --- farming/README.txt | 1 + farming/corn.lua | 2 +- farming/depends.txt | 3 ++- farming/hoes.lua | 45 +++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 47 insertions(+), 4 deletions(-) (limited to 'farming') diff --git a/farming/README.txt b/farming/README.txt index 95c8154..00c2dda 100644 --- a/farming/README.txt +++ b/farming/README.txt @@ -13,6 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t Changelog: +1.26 - Added support for [toolranks] mod when using hoe's 1.25 - Added check for farming.conf setting file to disable specific crops globally (inside mod folder) or world specific (inside world folder) 1.24 - Added Hemp which can be crafted into fibre, paper, string, rope and oil. 1.23 - Huge code tweak and tidy done and added barley seeds to be found in dry grass, barley can make flour for bread also. diff --git a/farming/corn.lua b/farming/corn.lua index 402ec82..1149a00 100644 --- a/farming/corn.lua +++ b/farming/corn.lua @@ -59,7 +59,7 @@ minetest.register_craft( { minetest.register_craft({ type = "fuel", recipe = "farming:bottle_ethanol", - burntime = 240, + burntime = 80, --240, replacements = {{ "farming:bottle_ethanol", "vessels:glass_bottle"}} }) diff --git a/farming/depends.txt b/farming/depends.txt index 8a8d2a2..9a747d1 100644 --- a/farming/depends.txt +++ b/farming/depends.txt @@ -1,3 +1,4 @@ default intllib? -lucky_block? \ No newline at end of file +lucky_block? +toolranks? diff --git a/farming/hoes.lua b/farming/hoes.lua index dab2ac9..dd7a11c 100644 --- a/farming/hoes.lua +++ b/farming/hoes.lua @@ -1,5 +1,6 @@ local S = farming.intllib +local tr = minetest.get_modpath("toolranks") -- Hoe registration function @@ -101,8 +102,20 @@ function farming.hoe_on_use(itemstack, user, pointed_thing, uses) minetest.sound_play("default_dig_crumbly", {pos = pt.under, gain = 0.5}) - if not minetest.setting_getbool("creative_mode") then - itemstack:add_wear(65535/(uses-1)) + local wear = 65535 / (uses -1) + + if minetest.setting_getbool("creative_mode") then + if tr then + wear = 1 + else + wear = 0 + end + end + + if tr then + itemstack = toolranks.new_afteruse(itemstack, user, under, {wear = wear}) + else + itemstack:add_wear(wear) end return itemstack @@ -151,3 +164,31 @@ farming.register_hoe(":farming:hoe_diamond", { max_uses = 500, material = "default:diamond" }) + +-- Toolranks support +if tr then + +minetest.override_item("farming:hoe_wood", { + original_description = "Wood Hoe", + description = toolranks.create_description("Wood Hoe")}) + +minetest.override_item("farming:hoe_stone", { + original_description = "Stone Hoe", + description = toolranks.create_description("Stone Hoe")}) + +minetest.override_item("farming:hoe_steel", { + original_description = "Steel Hoe", + description = toolranks.create_description("Steel Hoe")}) + +minetest.override_item("farming:hoe_bronze", { + original_description = "Bronze Hoe", + description = toolranks.create_description("Bronze Hoe")}) + +minetest.override_item("farming:hoe_mese", { + original_description = "Mese Hoe", + description = toolranks.create_description("Mese Hoe")}) + +minetest.override_item("farming:hoe_diamond", { + original_description = "Diamond Hoe", + description = toolranks.create_description("Diamond Hoe")}) +end -- cgit v1.2.3