improved craft rezieps and item for burning and exploding ball

This commit is contained in:
adrido 2013-11-16 00:01:52 +01:00
parent d8362efdbc
commit 922c1eaeff
2 changed files with 87 additions and 12 deletions

@ -1,7 +1,7 @@
--++++++++++++++++++++++++++++++++++++ --++++++++++++++++++++++++++++++++++++
--+ Meseball + --+ Meseball +
--++++++++++++++++++++++++++++++++++++ --++++++++++++++++++++++++++++++++++++
local mese={ local exploding={
physical = false, physical = false,
timer=0, timer=0,
textures = {"default_mese_block.png","default_mese_block.png","default_mese_block.png","default_mese_block.png","default_mese_block.png","default_mese_block.png"}, textures = {"default_mese_block.png","default_mese_block.png","default_mese_block.png","default_mese_block.png","default_mese_block.png","default_mese_block.png"},
@ -12,7 +12,7 @@ local mese={
range=1, range=1,
gravity=10, gravity=10,
velocity=30, velocity=30,
name="cannons:mese_bullet", name="cannons:exploding_bullet",
collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25}, collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25},
on_player_hit = function(self,pos,player) on_player_hit = function(self,pos,player)
local playername = player:get_player_name() local playername = player:get_player_name()
@ -38,10 +38,9 @@ local mese={
} }
if cannons.enable_explosion then if cannons.enable_explosion then
cannons.register_muni("default:mese",mese) cannons.register_muni("cannons:ball_exploding",exploding)
end end
local fire={
local tree={
physical = false, physical = false,
timer=0, timer=0,
textures = {"default_tree.png","default_tree.png","default_tree.png","default_tree.png","default_tree.png","default_tree.png"}, textures = {"default_tree.png","default_tree.png","default_tree.png","default_tree.png","default_tree.png","default_tree.png"},
@ -52,7 +51,7 @@ local tree={
range=2, range=2,
gravity=8, gravity=8,
velocity=35, velocity=35,
name="cannons:tree_bullet", name="cannons:fire_bullet",
collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25}, collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25},
on_player_hit = function(self,pos,player) on_player_hit = function(self,pos,player)
local playername = player:get_player_name() local playername = player:get_player_name()
@ -75,7 +74,7 @@ local tree={
} }
if cannons.enable_fire then if cannons.enable_fire then
cannons.register_muni("default:tree",tree) cannons.register_muni("cannons:ball_fire",fire)
end end
--++++++++++++++++++++++++++++++++++++ --++++++++++++++++++++++++++++++++++++

@ -114,9 +114,11 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
output = 'cannons:ball_wood 2', output = 'cannons:ball_wood 5',
recipe = { recipe = {
{"default:wood","default:wood"}, {"","default:wood",""},
{"default:wood","default:wood","default:wood"},
{"","default:wood",""},
}, },
}) })
@ -133,8 +135,26 @@ minetest.register_craft({
{"default:steelblock"} {"default:steelblock"}
}, },
}) })
if cannons.enable_explosion then
minetest.register_craft({
output = 'cannons:ball_exploding 2',
recipe = {
{"","default:mese",""},
{"default:mese","cannons:gunpowder","default:mese"},
{"","default:mese",""},
},
})
end
if cannons.enable_fire then
minetest.register_craft({
output = 'cannons:ball_fire 2',
recipe = {
{"","default:wood",""},
{"default:wood","default:torch","default:wood"},
{"","default:wood",""},
},
})
end
--++++++++++++++++++++++++++++++++++++ --++++++++++++++++++++++++++++++++++++
--+ cannon stuff + --+ cannon stuff +
--++++++++++++++++++++++++++++++++++++ --++++++++++++++++++++++++++++++++++++
@ -249,6 +269,9 @@ minetest.register_node("cannons:stand_wood", {
}, },
} }
}) })
--++++++++++++++++++++++++++++++++++++
--+ cannon balls +
--++++++++++++++++++++++++++++++++++++
minetest.register_node("cannons:ball_wood", { minetest.register_node("cannons:ball_wood", {
description = "Cannon Ball Wood", description = "Cannon Ball Wood",
@ -327,7 +350,60 @@ minetest.register_node("cannons:ball_steel", {
}, },
}, },
}) })
if cannons.enable_explosion then
minetest.register_node("cannons:ball_exploding", {
description = "Exploding Cannon Ball",
stack_max = 99,
tiles = {"default_mese.png"},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=2},
sounds = default.node_sound_wood_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.2, -0.5, -0.2, 0.2, -0.1, 0.2},
-- side , top , side , side , bottom, side,
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.2, -0.5, -0.2, 0.2, -0.1, 0.2},
},
},
})
end
if cannons.enable_fire then
minetest.register_node("cannons:ball_fire", {
description = "Burning Cannon Ball",
stack_max = 99,
tiles = {"default_tree.png"},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=2},
sounds = default.node_sound_wood_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.2, -0.5, -0.2, 0.2, -0.1, 0.2},
-- side , top , side , side , bottom, side,
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.2, -0.5, -0.2, 0.2, -0.1, 0.2},
},
},
})
end
minetest.register_node("cannons:ball_wood_stack", { minetest.register_node("cannons:ball_wood_stack", {
description = "Cannon Ball Wood Stack", description = "Cannon Ball Wood Stack",
stack_max = 99, stack_max = 99,