A little bit of help, maybe?

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

A little bit of help, maybe?

by Mito551 » Sat Nov 30, 2013 23:13

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!
Attachments
dwarves_game.zip
(6.5 MiB) Downloaded 115 times
dwarves_game.zip
(6.5 MiB) Downloaded 118 times
 

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

by PilzAdam » Sat Nov 30, 2013 23:43

re 2: Set the listsize to 9 again.
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Sun Dec 01, 2013 17:03

PilzAdam wrote:re 2: Set the listsize to 9 again.


....how would I do that?
and more importantly - where?
Last edited by Mito551 on Sun Dec 01, 2013 17:06, edited 1 time in total.
 

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

by PilzAdam » Sun Dec 01, 2013 18:18

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.
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Sun Dec 01, 2013 18:56

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?
 

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

by PilzAdam » Sun Dec 01, 2013 19:17

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.
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Mon Dec 02, 2013 06:34

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.
Last edited by Mito551 on Mon Dec 02, 2013 06:35, edited 1 time in total.
 

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

by PilzAdam » Mon Dec 02, 2013 18:05

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?).
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 13 guests

cron