Add recipes for guns
This commit is contained in:
parent
0f7f9a7fbb
commit
b294ba6197
@ -34,7 +34,7 @@ PyuTest.make_gun = function(name, desc, texture, cooldown, damage)
|
||||
}, {
|
||||
on_hit_node = function(self, pos, node) end,
|
||||
on_hit_object = function(self, object)
|
||||
if not self._owner:is_valid() then
|
||||
if self._owner == nil or not self._owner:is_valid() then
|
||||
return
|
||||
end
|
||||
PyuTest.deal_damage(object, damage, {
|
||||
|
@ -4,5 +4,26 @@ dofile(modpath .. "/api.lua")
|
||||
|
||||
PyuTest.make_gun("pyutest_guns:flintlock", "Flintlock",
|
||||
"pyutest-flintlock.png", 2, 6)
|
||||
|
||||
PyuTest.make_gun("pyutest_guns:blunderbuss", "Blunderbuss", "pyutest-blunderbuss.png",
|
||||
5, 12)
|
||||
|
||||
core.register_craft({
|
||||
output = "pyutest_guns:flintlock",
|
||||
recipe = {
|
||||
"pyutest_tools:gunpowder",
|
||||
"pyutest_tools:flint",
|
||||
"pyutest_tools:stick"
|
||||
},
|
||||
type = "shapeless",
|
||||
})
|
||||
|
||||
core.register_craft({
|
||||
output = "pyutest_guns:blunderbuss",
|
||||
recipe = {
|
||||
"pyutest_tools:gunpowder",
|
||||
"pyutest_ores:iron_ingot",
|
||||
"pyutest_tools:stick"
|
||||
},
|
||||
type = "shapeless",
|
||||
})
|
||||
|
@ -1 +1 @@
|
||||
depends = pyutest_tools,pyutest_projectiles
|
||||
depends = pyutest_tools,pyutest_projectiles,pyutest_ores
|
||||
|
Loading…
x
Reference in New Issue
Block a user