prevent it from duplicating
This commit is contained in:
parent
4067683794
commit
cab493267c
1
api.lua
1
api.lua
@ -302,6 +302,7 @@ end
|
|||||||
|
|
||||||
local function on_q(itemstack, dropper, pos)
|
local function on_q(itemstack, dropper, pos)
|
||||||
local name = itemstack:get_name()
|
local name = itemstack:get_name()
|
||||||
|
if dropper:get_wielded_item():get_name() ~= name then return end
|
||||||
local def = gunslinger.get_def(name)
|
local def = gunslinger.get_def(name)
|
||||||
local inv = dropper:get_inventory()
|
local inv = dropper:get_inventory()
|
||||||
if inv:room_for_item("main", {name = def.ammo}) then
|
if inv:room_for_item("main", {name = def.ammo}) then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user