mirror of
https://bitbucket.org/kingarthursteam/cannons.git
synced 2024-08-19 20:04:06 +02:00
improved craft rezieps and item for burning and exploding ball
This commit is contained in:
parent
d8362efdbc
commit
922c1eaeff
@ -1,7 +1,7 @@
|
||||
--++++++++++++++++++++++++++++++++++++
|
||||
--+ Meseball +
|
||||
--++++++++++++++++++++++++++++++++++++
|
||||
local mese={
|
||||
local exploding={
|
||||
physical = false,
|
||||
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"},
|
||||
@ -12,7 +12,7 @@ local mese={
|
||||
range=1,
|
||||
gravity=10,
|
||||
velocity=30,
|
||||
name="cannons:mese_bullet",
|
||||
name="cannons:exploding_bullet",
|
||||
collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25},
|
||||
on_player_hit = function(self,pos,player)
|
||||
local playername = player:get_player_name()
|
||||
@ -38,10 +38,9 @@ local mese={
|
||||
|
||||
}
|
||||
if cannons.enable_explosion then
|
||||
cannons.register_muni("default:mese",mese)
|
||||
cannons.register_muni("cannons:ball_exploding",exploding)
|
||||
end
|
||||
|
||||
local tree={
|
||||
local fire={
|
||||
physical = false,
|
||||
timer=0,
|
||||
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,
|
||||
gravity=8,
|
||||
velocity=35,
|
||||
name="cannons:tree_bullet",
|
||||
name="cannons:fire_bullet",
|
||||
collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25},
|
||||
on_player_hit = function(self,pos,player)
|
||||
local playername = player:get_player_name()
|
||||
@ -75,7 +74,7 @@ local tree={
|
||||
|
||||
}
|
||||
if cannons.enable_fire then
|
||||
cannons.register_muni("default:tree",tree)
|
||||
cannons.register_muni("cannons:ball_fire",fire)
|
||||
end
|
||||
|
||||
--++++++++++++++++++++++++++++++++++++
|
||||
|
84
items.lua
84
items.lua
@ -114,9 +114,11 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'cannons:ball_wood 2',
|
||||
output = 'cannons:ball_wood 5',
|
||||
recipe = {
|
||||
{"default:wood","default:wood"},
|
||||
{"","default:wood",""},
|
||||
{"default:wood","default:wood","default:wood"},
|
||||
{"","default:wood",""},
|
||||
},
|
||||
})
|
||||
|
||||
@ -133,8 +135,26 @@ minetest.register_craft({
|
||||
{"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 +
|
||||
--++++++++++++++++++++++++++++++++++++
|
||||
@ -249,6 +269,9 @@ minetest.register_node("cannons:stand_wood", {
|
||||
},
|
||||
}
|
||||
})
|
||||
--++++++++++++++++++++++++++++++++++++
|
||||
--+ cannon balls +
|
||||
--++++++++++++++++++++++++++++++++++++
|
||||
|
||||
minetest.register_node("cannons: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", {
|
||||
description = "Cannon Ball Wood Stack",
|
||||
stack_max = 99,
|
||||
|
Loading…
Reference in New Issue
Block a user