[Mod] Inventory Check [1.0] [inventorycheck]

User avatar
thefamilygrog66
Member
 
Posts: 170
Joined: Mon Jul 09, 2012 19:08
Location: Ontario, Canada

[Mod] Inventory Check [1.0] [inventorycheck]

by thefamilygrog66 » Sun Feb 15, 2015 18:19

This is a simple mod that allows admins/moderators to view the inventories for players by using the /inv <player> command. I'd previously written an even simpler version that uses formspecs, but there is a bug in the Minetest engine that doesn't allow it to work for other players' inventories. So, in the meantime, this is a text version.

Download: https://github.com/thefamilygrog66/inventorycheck/archive/master.zip

Browse code: https://github.com/thefamilygrog66/inventorycheck
 

User avatar
Krock
Developer
 
Posts: 4147
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: [Mod] Inventory Check [1.0] [inventorycheck]

by Krock » Sun Feb 15, 2015 18:55

You could do a workaround with a temporary detached inventory, fill it stack by stack.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
Napiophelios
Member
 
Posts: 940
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Inventory Check [1.0] [inventorycheck]

by Napiophelios » Sun Feb 15, 2015 22:04

I dont know if it works, but Zeg9 has something similar on github, maybe it can help.
it uses minetest.register_privilege("invsee","See other's inventories")

https://github.com/Zeg9/minetest-invsee
 

User avatar
thefamilygrog66
Member
 
Posts: 170
Joined: Mon Jul 09, 2012 19:08
Location: Ontario, Canada

Re: [Mod] Inventory Check [1.0] [inventorycheck]

by thefamilygrog66 » Mon Feb 16, 2015 01:20

Krock wrote:You could do a workaround with a temporary detached inventory, fill it stack by stack.


Napiophelios wrote:I dont know if it works, but Zeg9 has something similar on github, maybe it can help.
it uses minetest.register_privilege("invsee","See other's inventories")


Thanks for the suggestions -- I really want to keep it as simple as possible, and haven't been able to figure out how to use detached inventories. Here's my original code, to see what I mean:

Code: Select all
minetest.register_chatcommand("inv", {
   params = "<name>",
   description = "Shows inventory of <name>",
   func = function(name, param)
      local str = "size[8,6]"..
         "label[3.5,4;"..param.."]"..
         "list[player:"..param..";main;0,0;8,4;]"..
         "button_exit[3,5;2,1;button;Done]"
      minetest.show_formspec(name, "inventory", str)         
   end,
})
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 0 guests