Page 1 of 1

A little bit of help, maybe?

PostPosted: Sat Nov 30, 2013 23:13
by Mito551
so, i've got these 3 questions. 2 are actually problems, not questions, but still.

Image

1 (as seen on the picture) - something f**ks up with inventory++. i asked on the thread, yes, no response followed whatsoever (nothing to be surprised with, actually). i looked into the code but i wasn't able to figure out anything useful. hope you guys can help me with that.
2 (same as before) - i accidentaly allowed stuff to be 2x2 f**cking up into a snake from snake game. i don't want 2x2 grid to work properly (that solution would work if you can deliver it), i would prefer to get my 3x3 grid back.

3 - what do I need to update in dwarves to make it up-to-date, up-to-0.4.8?

I attach the latest dwarves version, for you to help me.
Thanks to everyone who responds!

PostPosted: Sat Nov 30, 2013 23:43
by PilzAdam
re 2: Set the listsize to 9 again.

PostPosted: Sun Dec 01, 2013 17:03
by Mito551
PilzAdam wrote:re 2: Set the listsize to 9 again.


....how would I do that?
and more importantly - where?

PostPosted: Sun Dec 01, 2013 18:18
by PilzAdam
Mito551 wrote:
PilzAdam wrote:re 2: Set the listsize to 9 again.


....how would I do that?
and more importantly - where?

Depends in which inventory the list is located. You basically have to inv:set_size("listname", 9), where inv is a reference to the inventory.
If the list is in the player inv, then on_joinplayer() and player:get_inventory() is what you want.

PostPosted: Sun Dec 01, 2013 18:56
by Mito551
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_joinplayer(function(player)
        player:get_inventory():set_width("craft", 3)
        player:get_inventory():set_size("craft", 3*3)
    end)


like this?

PostPosted: Sun Dec 01, 2013 19:17
by PilzAdam
Mito551 wrote:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_joinplayer(function(player)
        player:get_inventory():set_width("craft", 3)
        player:get_inventory():set_size("craft", 3*3)
    end)


like this?

Yes.

PostPosted: Mon Dec 02, 2013 06:34
by Mito551
PilzAdam wrote:
Mito551 wrote:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_joinplayer(function(player)
        player:get_inventory():set_width("craft", 3)
        player:get_inventory():set_size("craft", 3*3)
    end)


like this?

Yes.

well, this doesn't work. i have this piece of code in init.lua of workbench mod and I still get the 2x2 (snake-ish) grid. i tried looking through other mods, but with no avail. am I missing something?
PS. I had this piece of code all along, it didn't work all along. I somewhat think that I wouldn't have gone asking for help about the issue otherwise.

PostPosted: Mon Dec 02, 2013 18:05
by PilzAdam
Mito551 wrote:
PilzAdam wrote:
Mito551 wrote:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_joinplayer(function(player)
        player:get_inventory():set_width("craft", 3)
        player:get_inventory():set_size("craft", 3*3)
    end)


like this?

Yes.

well, this doesn't work. i have this piece of code in init.lua of workbench mod and I still get the 2x2 (snake-ish) grid. i tried looking through other mods, but with no avail. am I missing something?
PS. I had this piece of code all along, it didn't work all along. I somewhat think that I wouldn't have gone asking for help about the issue otherwise.

Odd. The only thing I can say is that this code _should_ work, so maybe check the surroundings (e.g. is the code even executed? or is there other code that sets it to 4?).