forked from LizzyFleckenstein03/Memeclone
Add fire charge
This commit is contained in:
parent
1b76a91d6b
commit
18cd2be89b
|
@ -0,0 +1,26 @@
|
|||
-- Fire Charge
|
||||
minetest.register_craftitem("mcl_fire:fire_charge", {
|
||||
description = "Fire Charge",
|
||||
inventory_image = "mcl_fire_fire_charge.png",
|
||||
liquids_pointable = false,
|
||||
stack_max = 64,
|
||||
groups = { tool = 1 },
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.type == "node" then
|
||||
if minetest.get_node(pointed_thing.under).name == "mcl_tnt:tnt" then
|
||||
tnt.ignite(pointed_thing.under)
|
||||
itemstack:take_item()
|
||||
else
|
||||
mcl_core.set_fire(pointed_thing)
|
||||
itemstack:take_item()
|
||||
end
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'shapeless',
|
||||
output = 'mcl_fire:fire_charge 3',
|
||||
recipe = { 'mcl_mobitems:blaze_powder', 'group:coal', 'mcl_core:gunpowder' },
|
||||
})
|
Binary file not shown.
After Width: | Height: | Size: 307 B |
|
@ -27,6 +27,6 @@ minetest.register_tool("mcl_fire:flint_and_steel", {
|
|||
|
||||
minetest.register_craft({
|
||||
type = 'shapeless',
|
||||
output = 'mcl_core:flint_and_steel',
|
||||
output = 'mcl_fire:flint_and_steel',
|
||||
recipe = { 'mcl_core:steel_ingot', 'mcl_core:flint'},
|
||||
})
|
||||
|
|
|
@ -192,6 +192,7 @@ minetest.register_abm({
|
|||
})
|
||||
|
||||
dofile(minetest.get_modpath(minetest.get_current_modname()).."/flint_and_steel.lua")
|
||||
dofile(minetest.get_modpath(minetest.get_current_modname()).."/fire_charge.lua")
|
||||
|
||||
local time_to_load= os.clock() - init
|
||||
print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load))
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Loading…
Reference in New Issue