Page 1 of 1

Scripting the player inventory "hand" slot.

Posted: Tue Oct 22, 2019 2:13 pm
by eradicator
handslot.png
handslot.png (18.5 KiB) Viewed 1861 times

What
I've been staring at the doc for too long now and i don't see any methods to:
  1. Given a LuaPlayer -> putting a LuaItemStack into their cursor_stack and properly marking the source slot as "hand slot".
  2. Given a LuaPlayer -> get the index of the "hand slot" of their main inventory.
  3. Given a LuaItemStack -> determine if it currently is the hand slot. (Most important to me - i want to know if a given slot is empty)
Am i being blind, or is there no way to do any of this?

Re: Scripting the player inventory "hand" slot.

Posted: Tue Oct 22, 2019 2:23 pm
by Bilka
From what I know, there is no way (currently).

Re: Scripting the player inventory "hand" slot.

Posted: Tue Oct 22, 2019 5:11 pm
by eradicator
Bilka wrote: Tue Oct 22, 2019 2:23 pm From what I know, there is no way (currently).
Would you mind moving it to interface requests then?

Re: Scripting the player inventory "hand" slot.

Posted: Wed Jan 22, 2020 3:30 pm
by robot256
I would like to express my support for this interface request. It would be very helpful when trying to make a "re-usable capsule" and for other things. The topic came up again recently in this forum thread, which I found today because I have the same need.

Re: Scripting the player inventory "hand" slot.

Posted: Fri Feb 21, 2020 6:05 pm
by eradicator
Cross-linking similar request: viewtopic.php?f=28&t=65304