gunslinger/init.lua
Elkien3 6ddb4a2fab Big Update
api.lua:
58: made reload work for mutliple types of ammunition.
76: made fire function take spread and pellet value.
89: fixed bullets falling being slightly above the crosshair.
100: fire bullets for every pellet, and do spread. doing mutiple bullets here instead of mutiple fire() keeps the sound from sounding multiple times.
165: fixed burst guns getting destroyed when empty.
159: remove splash_fire, use mutliple pellets in gun def.
198-212: pass pellet and spread defs.
205: not sure what this was, it isn't an actual method and causes crash. works fine without.
236: non-automatic weapons would only shoot once, as their interval[name] would not increase with time.
remaining lines: passing defs and giving default values.

I think the other files are fairily readable, so I won't document those changes unless needed.
2019-03-13 11:51:30 -05:00

13 lines
324 B
Lua

local modpath = minetest.get_modpath("gunslinger") .. "/"
-- Import API
dofile(modpath .. "api.lua")
if not minetest.settings:get_bool("gunslinger.disable_builtin") then
dofile(modpath .. "guns.lua")
end
minetest.register_craftitem("gunslinger:ammo", {
description = "Ammo",
inventory_image = "gunslinger_ammo.png",
})