add inventory client statebags

This commit is contained in:
Luke committed 2022-11-30 19:18:01 +01:00
1 parent 59aef169cd
commit 0a7cb24a2a
3 files changed
+48

No files matched your search

@@ -0,0 +1,17 @@
---
title: invBusy
---
Returns whether the player's inventory is currently running an action (i.e. using an item)
* invBusy: `boolean`
```lua
local isInventoryBusy = LocalPlayer.state.invBusy
if isInventoryBusy then
-- Do stuff when busy
else
-- Do stuff when not busy
end
```
@@ -0,0 +1,15 @@
---
title: invHotkeys
---
Allows you to enable/disable a player's access to inventory hotkeys.
* invHotkeys: `boolean`
```lua
LocalPlayer.state.invHotkeys = false
```
```lua
LocalPlayer.state.invHotkeys = true
```
@@ -0,0 +1,16 @@
---
title: invOpen
---
Returns whether the player's inventory is currently open or not.
* invOpen: `boolean`
```lua
local isInventoryOpen = LocalPlayer.state.invOpen
if isInventoryOpen then
-- Do stuff when open
else
-- Do stuff when closed
end