[Mod] Workbench (3x3,4x4,5x5) [workbench]
- GloopMaster
- Member
- Posts: 213
- Joined: Wed Aug 01, 2012 18:03
- Location: http://minetest.net/forum/
- LolManKuba
- Member
- Posts: 939
- Joined: Fri Feb 10, 2012 22:36
- Location: Ontario, Canada
- Contact:
- MirceaKitsune
- Member
- Posts: 924
- Joined: Sat May 21, 2011 22:31
- GitHub: MirceaKitsune
- IRC: Taoki
- In-game: MirceaKitsune
- Location: Romania, Bucharest
- GloopMaster
- Member
- Posts: 213
- Joined: Wed Aug 01, 2012 18:03
- Location: http://minetest.net/forum/
There's now a some code (commented out by default) in the git version of the mod that will do this.MirceaKitsune wrote:Haven't tried the mod yet, but one question: Does this also make the default (inventory) crafting grid 2 x 2? Or can LUA not modify the size of the inventory craft area yet? A 3 x 3 workbench sounds useless until this is possible as well, but hopefully it is now.
It works when I try it.GloopMaster wrote:Unfortunately, it still does not support large shapeless recipes. Fix please?
-
- Member
- Posts: 211
- Joined: Tue Jul 31, 2012 20:37
This makes sense. Imagine the default crafting area grid like this:PilzAdam wrote:Did you try to craft a torch in this 2x2 grid? For me this dont work (tried it in another mod).darkrose wrote:There's now a some code (commented out by default) in the git version of the mod that will do this.
0|1|2
------
3|4|5
------
6|7|8
The torch recipe expects the coal to be on the stick.position - 3. So if you put your stick in 7, the coal has to go in 4.
Now, with the revamped crafting area grid you have something like this:
0|1
----
2|3
So to make a torch, the recipe remains; hence, you'd have to put your stick in the bottom right hand corner (3) and the other one in stick.position - 3 which happens to be the upper left hand corner. This obviously breaks the recipe. I'm not sure how to fix this issue with the API or if it is even possible. However, a grid of 3x2 "solves" this and it has pretty much the same [limited] functionality than the 2x2 grid (eg., you can't craft tools).
So, basically, something like this: list[current_player;craft;3,1;3,2;]
There's another workbench written in C++ that works exactly in the way the MC one does, by the way, but using mods is better, in my opinion.
I haven't tried the bigger workbenches yet, but I'm guessing they might have the same problem I described for the 2x2 craft area. I hope I'm wrong.
EDIT: I just tried the 4x4 workbench and it works just fine, destroying my whole theory o.o Meh... well, 3x2 still works fine.
Last edited by leo_rockway on Thu Aug 09, 2012 07:26, edited 1 time in total.
Hi!
I belvieve that I found a bug: If you craft anything on workbench and then place resulting item to inventory slot which is already occupied, item from that slot just disappears.
// edit:
Also, there is possible to take only half of stack produced in workbench, what causes other half to disappear.
I belvieve that I found a bug: If you craft anything on workbench and then place resulting item to inventory slot which is already occupied, item from that slot just disappears.
// edit:
Also, there is possible to take only half of stack produced in workbench, what causes other half to disappear.
Last edited by kozec on Fri Aug 10, 2012 16:57, edited 1 time in total.
-
- Member
- Posts: 211
- Joined: Tue Jul 31, 2012 20:37
Ok, I think I workarounded that half of stack disappearing problem. I took a look on how is this solved in minecraft and it's simply not possible to take half of crafted stack there - both buttons take it all.
And although I don't know if its possible to modify what is being picked up, it's possible to disallow taking only part of stack simply by modifiing allow_metadata_inventory_take functions in this way:
And although I don't know if its possible to modify what is being picked up, it's possible to disallow taking only part of stack simply by modifiing allow_metadata_inventory_take functions in this way:
Code: Select all
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
if listname == "dst" and stack:get_count() then
local meta = minetest.env:get_meta(pos)
local inv = meta:get_inventory()
if stack:get_count() < inv:get_stack("dst", 1):get_count() then
-- User tries to take only part of crafted stack. Bad thing.
return 0
end
end
return stack:get_count()
end,
Last edited by kozec on Fri Aug 10, 2012 21:07, edited 1 time in total.
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
i really like this mod, i might port it into an inventory_plus mod so you can have your bigger craft table with you
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
darkrose does not seem to be around so I have forked this mod and updated it to work with 0.4.3:
https://github.com/cornernote/minetest-workbench
If you notice any issues let me know by replying here.
https://github.com/cornernote/minetest-workbench
If you notice any issues let me know by replying here.
- MirceaKitsune
- Member
- Posts: 924
- Joined: Sat May 21, 2011 22:31
- GitHub: MirceaKitsune
- IRC: Taoki
- In-game: MirceaKitsune
- Location: Romania, Bucharest
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
-
- Member
- Posts: 211
- Joined: Tue Jul 31, 2012 20:37
- MirceaKitsune
- Member
- Posts: 924
- Joined: Sat May 21, 2011 22:31
- GitHub: MirceaKitsune
- IRC: Taoki
- In-game: MirceaKitsune
- Location: Romania, Bucharest
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
yeah, i fixed that last night (just forgot to tell anyone about it). in minetest.conf add this line:
Code: Select all
inventory_craft_small=true
Who is online
Users browsing this forum: No registered users and 4 guests