Viewing an inventory from another node

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

Viewing an inventory from another node

by ashenk69 » Post

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.

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,

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests