From 48cfe6b6caf151e79713699536edd404f1a46df9 Mon Sep 17 00:00:00 2001 From: stujones11 Date: Thu, 4 Apr 2019 18:05:53 +0100 Subject: [PATCH] Fix automatic weapons disappearing when empty --- shooter/api.lua | 2 +- shooter_guns/init.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shooter/api.lua b/shooter/api.lua index a5684c0..44462c9 100644 --- a/shooter/api.lua +++ b/shooter/api.lua @@ -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 diff --git a/shooter_guns/init.lua b/shooter_guns/init.lua index 4654845..404cab0 100644 --- a/shooter_guns/init.lua +++ b/shooter_guns/init.lua @@ -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}},