Fix automatic weapons disappearing when empty

This commit is contained in:
stujones11 2019-04-04 18:05:53 +01:00
parent 4da4f8ecea
commit 48cfe6b6ca
2 changed files with 2 additions and 2 deletions

View file

@ -405,7 +405,7 @@ local function fire_weapon(player, itemstack, spec, extended)
if extended then
itemstack:add_wear(spec.wear)
if itemstack:get_count() == 0 then
local def = shooter.registered_weapons[spec.name] or {}
local def = minetest.registered_items[spec.name] or {}
if def.unloaded_item then
itemstack = def.unloaded_item.name or ""
end

View file

@ -87,7 +87,7 @@ shooter.register_weapon("shooter_guns:machine_gun", {
inventory_image = "shooter_smgun.png",
spec = {
automatic = true,
rounds = 10,
rounds = 20,
range = 160,
step = 20,
tool_caps = {full_punch_interval=0.1, damage_groups={fleshy=2}},