add hud.is_paused and hud.is_inventory_open

This commit is contained in:
MihailRis
2024-07-10 10:12:07 +03:00
parent 7487c55e0c
commit adabe781c5
4 changed files with 37 additions and 0 deletions
+3
View File
@@ -3,6 +3,9 @@ local DROP_INIT_VEL = {0, 3, 0}
function on_hud_open()
input.add_callback("player.drop", function ()
if hud.is_paused() or hud.is_inventory_open() then
return
end
local pid = hud.get_player()
local invid, slot = player.get_inventory(pid)
local itemid, itemcount = inventory.get(invid, slot)