[Mod] Farming Plus [farming_plus]

User avatar
webdesigner97
Member
Posts: 1328
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97
Location: Cologne, Germany
Contact:

Re: [Mod] Farming Plus [farming_plus]

by webdesigner97 » Post

lotek wrote:Farming Plus not compatible with Minetest Next Game

If I running the minetest next game together with farming plus mod (always latest dev from git) I can't plant wheat (seed).. it's get removed after a few (milli)seconds. detail description are on the mintetest next game topic, see here viewtopic.php?f=15&t=9066&p=147230#p147230

Does anybody knows how to fix it? Thanx for any help.
My first guess would be conflicting ABMs.
Edit: Just saw BlockMen's comment. Ignore my idea ;)

RebelD
Member
Posts: 30
Joined: Mon Jul 07, 2014 21:34
In-game: Dielan

Re: [Mod] Farming Plus [farming_plus]

by RebelD » Post

Hi Adam and others.
Euhm I had a question, I'm using this mod for a few days now and I encountered something small and I wondered if it just occurs to me.

You see, when I harvest the stuff, it doesn't stack up. It just stays 1. So I need to run to a chest, put the item in it, then run back to harvest another one and keep repeating that.
Is this normal or am I the only one with this?

User avatar
markbe
Member
Posts: 23
Joined: Thu Jun 06, 2013 23:00
Location: Auckland, New Zealand

Re: [Mod] Farming Plus [farming_plus]

by markbe » Post

I'm trying to get string so I can craft a bow. Now when I harvest cotton, I get cotton and seed. It can be crafted into wool but not used as string in a bow. Must be a change with the default farming?

Any idea if string is still able to be gathered?

minetest-0.4.10-dev-win64-e69d660784
PilzAdam-farming_plus-94c261b
PilzAdam-throwing-90bcf43

p.s had to modify init.lua line 213 in farming_plus as below to allow planting due to change in default farming
function farming.place_seed(itemstack, placer, pointed_thing, plantname)

User avatar
webdesigner97
Member
Posts: 1328
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97
Location: Cologne, Germany
Contact:

Re: [Mod] Farming Plus [farming_plus]

by webdesigner97 » Post

markbe wrote:I'm trying to get string so I can craft a bow. Now when I harvest cotton, I get cotton and seed. It can be crafted into wool but not used as string in a bow. Must be a change with the default farming?

Any idea if string is still able to be gathered?

minetest-0.4.10-dev-win64-e69d660784
PilzAdam-farming_plus-94c261b
PilzAdam-throwing-90bcf43

p.s had to modify init.lua line 213 in farming_plus as below to allow planting due to change in default farming
function farming.place_seed(itemstack, placer, pointed_thing, plantname)
If I remember correctly, the string item was renamed...

lotek
Member
Posts: 22
Joined: Mon Jun 02, 2014 20:21
GitHub: LotekHeavy
IRC: lotek
In-game: lotek
Location: Switzerland
Contact:

Re: [Mod] Farming Plus [farming_plus]

by lotek » Post

@markbe could you post your changes, if I change only the function, then the seed get placed above the block... (well it works, but looks ugly).
----
Mine Heavy
http://mine.heavy.ch

User avatar
markbe
Member
Posts: 23
Joined: Thu Jun 06, 2013 23:00
Location: Auckland, New Zealand

Re: [Mod] Farming Plus [farming_plus]

by markbe » Post

I only changed the one line and got the same results as you did ... seed gets placed above but at least it grows. I don't know enough to fix properly; my change was just a work-around until someone who knew stuff did some testing and uploaded an update

lotek
Member
Posts: 22
Joined: Mon Jun 02, 2014 20:21
GitHub: LotekHeavy
IRC: lotek
In-game: lotek
Location: Switzerland
Contact:

Re: [Mod] Farming Plus [farming_plus]

by lotek » Post

*bump*

IMHO it doesn't work at all. if you change only the function "function farming.place_seed(itemstack, placer, pointed_thing, plantname)" then wheat from farming works again, but farming plus element's can not get seeded anymore.

I plea for a fix, that farming plus gets compatible with minetest 0.4.10 (to the new integrated default game), thanks :-)
----
Mine Heavy
http://mine.heavy.ch

User avatar
Krock
Developer
Posts: 4648
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Farming Plus [farming_plus]

by Krock » Post

lotek wrote:I plea for a fix, that farming plus gets compatible with minetest 0.4.10 (to the new integrated default game), thanks :-)
You also could use an other (sub-)game, where it works.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
webdesigner97
Member
Posts: 1328
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97
Location: Cologne, Germany
Contact:

Re: [Mod] Farming Plus [farming_plus]

by webdesigner97 » Post

Krock wrote:
lotek wrote:I plea for a fix, that farming plus gets compatible with minetest 0.4.10 (to the new integrated default game), thanks :-)
You also could use an other (sub-)game, where it works.
Maybe farming_plus should be merged with farming? The pros: More plants, and finally compatibility ^^

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

Re: [Mod] Farming Plus [farming_plus]

by PilzAdam » Post

lotek wrote:I plea for a fix, that farming plus gets compatible with minetest 0.4.10 (to the new integrated default game), thanks :-)
The minetest_game team needs to fix this, since it worked before they changed the farming API (for whatever reason).

lotek
Member
Posts: 22
Joined: Mon Jun 02, 2014 20:21
GitHub: LotekHeavy
IRC: lotek
In-game: lotek
Location: Switzerland
Contact:

Re: [Mod] Farming Plus [farming_plus]

by lotek » Post

Thanks for your answer.
PilzAdam wrote:
lotek wrote:I plea for a fix, that farming plus gets compatible with minetest 0.4.10 (to the new integrated default game), thanks :-)
The minetest_game team needs to fix this, since it worked before they changed the farming API (for whatever reason).
but @BlockMen from minetest_game told me the same :-(
Its easy fixable in farming_plus. The bug appears because farming_plus calls farming:place_seed() which causes trouble with the new API of farming in NeXt. If his mod would use farming.place_seed() it works fine. Ask PilzAdam to fix it ;)

viewtopic.php?f=15&t=9066&p=147230#p147230

Well I'm in no position to demand anything. But what I am supposed to do now? Bury the whole minetest_game crew in my backyard (six feet under) for changing the api :-p But honestly should not the mod follow the default game even if it's "not so nice"?
----
Mine Heavy
http://mine.heavy.ch

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

Re: [Mod] Farming Plus [farming_plus]

by BlockMen » Post

lotek wrote: [...]
But honestly should not the mod follow the default game even if it's "not so nice"?
Yes.
PilzAdam wrote: The minetest_game team needs to fix this, since it worked before they changed the farming API (for whatever reason).
No. Its your mod. If not able or willing to fix it should be moved to "Old mods", see viewtopic.php?f=13&t=2053

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

Re: [Mod] Farming Plus [farming_plus]

by PilzAdam » Post

BlockMen wrote:
PilzAdam wrote: The minetest_game team needs to fix this, since it worked before they changed the farming API (for whatever reason).
No. Its your mod. If not able or willing to fix it should be moved to "Old mods", see viewtopic.php?f=13&t=2053
I dont see anything about game compatibility there(?)

User avatar
webdesigner97
Member
Posts: 1328
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97
Location: Cologne, Germany
Contact:

Re: [Mod] Farming Plus [farming_plus]

by webdesigner97 » Post

PilzAdam wrote:
BlockMen wrote:
PilzAdam wrote: The minetest_game team needs to fix this, since it worked before they changed the farming API (for whatever reason).
No. Its your mod. If not able or willing to fix it should be moved to "Old mods", see viewtopic.php?f=13&t=2053
I dont see anything about game compatibility there(?)
I already thought about merging farming_plus into farming (at least important plants) to add more plants to minetest_game, but I don't have the time...

gsmanners
Member
Posts: 159
Joined: Fri Jan 10, 2014 21:37

Re: [Mod] Farming Plus [farming_plus]

by gsmanners » Post

A while ago, I changed this in my own game to be a little nicer about placing plants. I don't know if it has problems, but I haven't seen any so far...

Code: Select all

--- ./farming_plus-old/carrots.lua	2013-11-03 14:19:44.000000000 -0700
+++ ./farming_plus-new/carrots.lua	2014-05-16 22:53:48.000000000 -0600
@@ -2,13 +2,7 @@
 	description = "Carrot Seeds",
 	inventory_image = "farming_carrot_seed.png",
 	on_place = function(itemstack, placer, pointed_thing)
-		local above = minetest.env:get_node(pointed_thing.above)
-		if above.name == "air" then
-			above.name = "farming_plus:carrot_1"
-			minetest.env:set_node(pointed_thing.above, above)
-			itemstack:take_item(1)
-			return itemstack
-		end
+		return farming:place_plant(itemstack, pointed_thing, "farming_plus:carrot_1")
 	end
 })
 
--- ./farming_plus-old/init.lua	2013-11-03 14:19:44.000000000 -0700
+++ ./farming_plus-new/init.lua	2014-05-16 22:54:57.000000000 -0600
@@ -1,6 +1,19 @@
 
 farming.registered_plants = {}
 
+function farming:place_plant(itemstack, pointed_thing, plant_name)
+	if pointed_thing.type == "node" then
+		local above = minetest.env:get_node(pointed_thing.above)
+		local under = minetest.env:get_node(pointed_thing.under)
+		if above.name == "air" and minetest.env:get_item_group(under.name, "soil") > 1 then
+			above.name = plant_name
+			minetest.env:set_node(pointed_thing.above, above)
+			itemstack:take_item(1)
+		end
+	end
+	return itemstack
+end
+
 function farming:add_plant(full_grown, names, interval, chance)
 	minetest.register_abm({
 		nodenames = names,
--- ./farming_plus-old/oranges.lua	2013-11-03 14:19:44.000000000 -0700
+++ ./farming_plus-new/oranges.lua	2014-05-16 22:53:56.000000000 -0600
@@ -2,13 +2,7 @@
 	description = "Orange Seeds",
 	inventory_image = "farming_orange_seed.png",
 	on_place = function(itemstack, placer, pointed_thing)
-		local above = minetest.env:get_node(pointed_thing.above)
-		if above.name == "air" then
-			above.name = "farming_plus:orange_1"
-			minetest.env:set_node(pointed_thing.above, above)
-			itemstack:take_item(1)
-			return itemstack
-		end
+		return farming:place_plant(itemstack, pointed_thing, "farming_plus:orange_1")
 	end
 })
 
--- ./farming_plus-old/potatoes.lua	2013-11-03 14:19:44.000000000 -0700
+++ ./farming_plus-new/potatoes.lua	2014-05-16 22:54:03.000000000 -0600
@@ -2,13 +2,7 @@
 	description = "Potato Seeds",
 	inventory_image = "farming_potato_seed.png",
 	on_place = function(itemstack, placer, pointed_thing)
-		local above = minetest.env:get_node(pointed_thing.above)
-		if above.name == "air" then
-			above.name = "farming_plus:potato_1"
-			minetest.env:set_node(pointed_thing.above, above)
-			itemstack:take_item(1)
-			return itemstack
-		end
+		return farming:place_plant(itemstack, pointed_thing, "farming_plus:potato_1")
 	end
 })
 
--- ./farming_plus-old/pumpkin.lua	2013-11-03 14:19:44.000000000 -0700
+++ ./farming_plus-new/pumpkin.lua	2014-05-16 22:53:36.000000000 -0600
@@ -2,13 +2,7 @@
 	description = "Pumpkin Seed",
 	inventory_image = "farming_pumpkin_seed.png",
 	on_place = function(itemstack, placer, pointed_thing)
-		local above = minetest.env:get_node(pointed_thing.above)
-		if above.name == "air" then
-			above.name = "farming:pumpkin_1"
-			minetest.env:set_node(pointed_thing.above, above)
-			itemstack:take_item(1)
-			return itemstack
-		end
+		return farming:place_plant(itemstack, pointed_thing, "farming:pumpkin_1")
 	end
 })
 
@@ -68,8 +62,7 @@
 		if tool and tool == "default:sword_wood" or tool == "default:sword_stone" or tool == "default:sword_steel" then
 			node.name = "farming:pumpkin_face"
 			minetest.env:set_node(pos, node)
-			puncher:get_inventory():add_item("main", ItemStack("farming:pumpkin_seed"))
-			if math.random(1, 5) == 1 then
+			for i=1, math.random(1, 5) do
 				puncher:get_inventory():add_item("main", ItemStack("farming:pumpkin_seed"))
 			end
 		end
--- ./farming_plus-old/rhubarb.lua	2013-11-03 14:19:44.000000000 -0700
+++ ./farming_plus-new/rhubarb.lua	2014-05-16 22:54:12.000000000 -0600
@@ -2,13 +2,7 @@
 	description = "Rhubarb Seeds",
 	inventory_image = "farming_rhubarb_seed.png",
 	on_place = function(itemstack, placer, pointed_thing)
-		local above = minetest.env:get_node(pointed_thing.above)
-		if above.name == "air" then
-			above.name = "farming_plus:rhubarb_1"
-			minetest.env:set_node(pointed_thing.above, above)
-			itemstack:take_item(1)
-			return itemstack
-		end
+		return farming:place_plant(itemstack, pointed_thing, "farming_plus:rhubarb_1")
 	end
 })
 
--- ./farming_plus-old/strawberries.lua	2013-11-03 14:19:44.000000000 -0700
+++ ./farming_plus-new/strawberries.lua	2014-05-16 22:54:19.000000000 -0600
@@ -2,13 +2,7 @@
 	description = "Strawberry Seeds",
 	inventory_image = "farming_strawberry_seed.png",
 	on_place = function(itemstack, placer, pointed_thing)
-		local above = minetest.env:get_node(pointed_thing.above)
-		if above.name == "air" then
-			above.name = "farming_plus:strawberry_1"
-			minetest.env:set_node(pointed_thing.above, above)
-			itemstack:take_item(1)
-			return itemstack
-		end
+		return farming:place_plant(itemstack, pointed_thing, "farming_plus:strawberry_1")
 	end
 })
 
--- ./farming_plus-old/tomatoes.lua	2013-11-03 14:19:44.000000000 -0700
+++ ./farming_plus-new/tomatoes.lua	2014-05-16 22:54:26.000000000 -0600
@@ -2,13 +2,7 @@
 	description = "Tomato Seeds",
 	inventory_image = "farming_tomato_seed.png",
 	on_place = function(itemstack, placer, pointed_thing)
-		local above = minetest.env:get_node(pointed_thing.above)
-		if above.name == "air" then
-			above.name = "farming_plus:tomato_1"
-			minetest.env:set_node(pointed_thing.above, above)
-			itemstack:take_item(1)
-			return itemstack
-		end
+		return farming:place_plant(itemstack, pointed_thing, "farming_plus:tomato_1")
 	end
 })

User avatar
fireglow
Member
Posts: 93
Joined: Fri Mar 28, 2014 11:36
IRC: fireglow
In-game: fireglow
Location: Germany

Re: [Mod] Farming Plus [farming_plus]

by fireglow » Post

Devs fighting over little things, meanwhile players are the ones suffering because (aspects of) the game appear to be broken. Nice.
Get over your egos and fix it, please.

User avatar
crazyR
Member
Posts: 60
Joined: Thu Jun 19, 2014 14:41
Location: uk

Re: [Mod] Farming Plus [farming_plus]

by crazyR » Post

PilzAdam and BlockMen :

You are both official developers of minetest. so regardless of whether its the mod or the game that needs fixing the responsibility lie's on you. more so on PilzAdam due to it being your mod.

like fireglow said, all the fighting between you is ruining the game for everyone else, but then we should be used to it because it happens all to often on here, nearly every aspect of development hear is delayed due to silly bickering and fighting.

Please sort your differences out and find a fix one way or another.

swilde
Member
Posts: 20
Joined: Wed Apr 10, 2013 20:39
Location: Germany

Re: [Mod] Farming Plus [farming_plus]

by swilde » Post

FWIW, I ported farming plus to the new farming api for our server. The code can be found here:
http://hg.intevation.de/minetest/farming_plus_ng/

cheers,
sascha

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

Re: [Mod] Farming Plus [farming_plus]

by BlockMen » Post

fireglow wrote:Devs fighting over little things, meanwhile players are the ones suffering because (aspects of) the game appear to be broken. Nice.
Get over your egos and fix it, please.
Well, I'm definetly not responsible for fixing other peoples mods, but I can also understand that people want play with more farming-plants. So this is the only time I will do that.

Here a small fix, which everyone else could have done in 10 minutes: https://github.com/BlockMen/farming_plus

@PilzAdam, so you run your mod just with the engine and without any game?
@swilde, renaming everything is a bad idea in sense of Texture Pack support

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Farming Plus [farming_plus]

by ExeterDad » Post

Thanks BlockMen, I fixed about 2/3 of my copy already, but your patch shows I missed some. Cheers to both of you :)

User avatar
crazyR
Member
Posts: 60
Joined: Thu Jun 19, 2014 14:41
Location: uk

Re: [Mod] Farming Plus [farming_plus]

by crazyR » Post

thanks BlockMen

User avatar
fireglow
Member
Posts: 93
Joined: Fri Mar 28, 2014 11:36
IRC: fireglow
In-game: fireglow
Location: Germany

Re: [Mod] Farming Plus [farming_plus]

by fireglow » Post

Thank you, BlockMen :-)

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Farming Plus [farming_plus]

by 4aiman » Post

Are you sure the soil is suitable for wheat?
The fact it disappears means that you didn't really plant anything.
Try any of the protection mods to see what I mean.

User avatar
meldrian
Member
Posts: 46
Joined: Sat Jan 12, 2013 14:02
GitHub: meldrian
IRC: meldrian
In-game: meldrian
Location: Germany
Contact:

Re: [Mod] Farming Plus [farming_plus]

by meldrian » Post

+1 thx mate

User avatar
Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

Re: [Mod] Farming Plus [farming_plus]

by Minetestforfun » Post

Thank you blockmen, I had also this problem with wheat :)

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot], Nininik and 10 guests