Viewing an inventory from another node

ashenk69
Member
 
Posts: 230
Joined: Tue Jul 03, 2012 00:08

Viewing an inventory from another node

by ashenk69 » Sun Apr 07, 2013 17:52

I've been trying to figure out how to get this one to work. I am trying to show another nodes inventory through another node's formspec. I get it to retrieve the inventory properly but I'm not sure how to set its size to display the grid.

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
on_construct = function(pos)
        local meta = minetest.env:get_meta(pos)
        meta:set_string("formspec",
                "size[8,9]"..
                "list[nodemeta:"..meta:get_int("x")..","..meta:get_int("y")..","..meta:get_int("z")..";source;0,0;8,4;]"..
                "list[current_player;main;0,5;8,4;]")
        meta:set_string("infotext", "Stockpile")
        --I'm not sure which list I'm supposed to set to get this to work
    end,
 

Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 21 guests

cron