2013-11-12 22:28:21 +01:00
|
|
|
--++++++++++++++++++++++++++++++++++++
|
|
|
|
--+ Craft Items +
|
|
|
|
--++++++++++++++++++++++++++++++++++++
|
|
|
|
|
2013-11-13 17:42:48 +01:00
|
|
|
minetest.register_craftitem("cannons:gunpowder", {
|
2013-10-12 12:24:24 +02:00
|
|
|
groups = {gunpowder=1},
|
2013-11-10 17:58:23 +01:00
|
|
|
description = "Gunpowder",
|
2013-11-13 17:42:48 +01:00
|
|
|
inventory_image = "cannons_gunpowder.png"
|
2013-10-12 12:24:24 +02:00
|
|
|
})
|
2013-11-10 17:58:23 +01:00
|
|
|
|
2013-11-13 17:42:48 +01:00
|
|
|
minetest.register_craftitem("cannons:salt", {
|
2013-11-10 17:58:23 +01:00
|
|
|
description = "Salt",
|
2013-11-13 17:42:48 +01:00
|
|
|
inventory_image = "cannons_salt.png"
|
2013-10-12 12:24:24 +02:00
|
|
|
})
|
2013-11-10 17:58:23 +01:00
|
|
|
|
2013-11-13 17:42:48 +01:00
|
|
|
minetest.register_craftitem("cannons:bucket_salt", {
|
2013-11-10 17:58:23 +01:00
|
|
|
description = "Bucket with salt",
|
2013-11-13 17:42:48 +01:00
|
|
|
inventory_image = "cannons_bucket_salt.png",
|
2013-11-10 17:58:23 +01:00
|
|
|
stack_max = 300
|
|
|
|
})
|
|
|
|
|
2013-10-12 12:24:24 +02:00
|
|
|
|
2013-11-12 22:28:21 +01:00
|
|
|
--++++++++++++++++++++++++++++++++++++
|
|
|
|
--+ crafts +
|
|
|
|
--++++++++++++++++++++++++++++++++++++
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
2013-11-13 17:42:48 +01:00
|
|
|
output = 'cannons:salt 12',
|
2013-11-12 22:28:21 +01:00
|
|
|
recipe = {
|
2013-11-13 17:42:48 +01:00
|
|
|
"cannons:bucket_salt"
|
2013-11-12 22:28:21 +01:00
|
|
|
},
|
|
|
|
replacements = {
|
2013-11-13 17:42:48 +01:00
|
|
|
{"cannons:bucket_salt", "bucket:bucket_empty"}
|
2013-11-12 22:28:21 +01:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
2013-11-13 17:42:48 +01:00
|
|
|
output = 'cannons:bucket_salt',
|
2013-11-12 22:28:21 +01:00
|
|
|
recipe = 'bucket:bucket_water',
|
|
|
|
cooktime = 15
|
|
|
|
})
|
|
|
|
|
2013-11-10 17:58:23 +01:00
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
2013-11-13 17:42:48 +01:00
|
|
|
output = 'cannons:gunpowder',
|
2013-11-10 17:58:23 +01:00
|
|
|
recipe = {
|
2013-11-13 17:42:48 +01:00
|
|
|
"default:coal_lump", "default:mese_crystal", "cannons:salt"
|
2013-11-10 17:58:23 +01:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2013-11-12 23:02:48 +01:00
|
|
|
|
2013-11-12 22:28:21 +01:00
|
|
|
-- new crafts --
|
2013-11-10 17:58:23 +01:00
|
|
|
|
2013-11-12 22:28:21 +01:00
|
|
|
minetest.register_craft({
|
2013-11-13 17:42:48 +01:00
|
|
|
output = 'cannons:cannon',
|
2013-11-12 22:28:21 +01:00
|
|
|
recipe = {
|
|
|
|
{"default:steelblock", "default:steelblock", "default:steelblock"},
|
2013-11-13 17:42:48 +01:00
|
|
|
{"cannons:gunpowder", "default:mese_block", ""},
|
2013-11-12 22:28:21 +01:00
|
|
|
{"default:steelblock", "default:steelblock", "default:steelblock"}
|
|
|
|
},
|
|
|
|
})
|
2013-11-10 17:58:23 +01:00
|
|
|
|
2013-11-12 22:28:21 +01:00
|
|
|
minetest.register_craft({
|
2013-11-13 17:42:48 +01:00
|
|
|
output = 'cannons:bronze_canon',
|
2013-11-12 22:28:21 +01:00
|
|
|
recipe = {
|
|
|
|
{"default:bronzeblock", "default:bronzeblock", "default:bronzeblock"},
|
2013-11-13 17:42:48 +01:00
|
|
|
{"cannons:gunpowder", "default:mese_block", ""},
|
2013-11-12 22:28:21 +01:00
|
|
|
{"default:bronzeblock", "default:bronzeblock", "default:bronzeblock"}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2013-11-13 17:42:48 +01:00
|
|
|
output = 'cannons:stand',
|
2013-11-13 21:12:23 +01:00
|
|
|
recipe = {
|
|
|
|
{"default:wood", "", "default:wood"},
|
|
|
|
{"default:wood", "default:steelblock", "default:cobble"},
|
|
|
|
{"default:wood", "default:wood", "default:cobble"}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = 'cannons:stand_wood',
|
2013-11-12 22:28:21 +01:00
|
|
|
recipe = {
|
|
|
|
{"default:wood", "", "default:wood"},
|
|
|
|
{"default:wood", "default:steelblock", "default:wood"},
|
|
|
|
{"default:wood", "default:wood", "default:wood"}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
2013-11-13 17:42:48 +01:00
|
|
|
output = 'cannons:ball_steel_stack',
|
2013-11-12 22:28:21 +01:00
|
|
|
recipe = {
|
2013-11-13 17:46:54 +01:00
|
|
|
"cannons:ball_steel", "cannons:ball_steel", "cannons:ball_steel", "cannons:ball_steel"
|
2013-11-12 22:28:21 +01:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
2013-11-13 17:42:48 +01:00
|
|
|
output = 'cannons:ball_stone_stack',
|
2013-11-12 22:28:21 +01:00
|
|
|
recipe = {
|
2013-11-13 17:46:54 +01:00
|
|
|
"cannons:ball_stone", "cannons:ball_stone", "cannons:ball_stone", "cannons:ball_stone"
|
2013-11-12 22:28:21 +01:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
2013-11-13 17:42:48 +01:00
|
|
|
output = 'cannons:ball_wood_stack',
|
2013-11-12 22:28:21 +01:00
|
|
|
recipe = {
|
2013-11-13 17:46:54 +01:00
|
|
|
"cannons:ball_wood", "cannons:ball_wood", "cannons:ball_wood", "cannons:ball_wood"
|
2013-11-12 22:28:21 +01:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2013-11-16 00:01:52 +01:00
|
|
|
output = 'cannons:ball_wood 5',
|
2013-11-12 22:28:21 +01:00
|
|
|
recipe = {
|
2013-11-16 00:01:52 +01:00
|
|
|
{"","default:wood",""},
|
|
|
|
{"default:wood","default:wood","default:wood"},
|
|
|
|
{"","default:wood",""},
|
2013-11-12 22:28:21 +01:00
|
|
|
},
|
2013-10-12 12:24:24 +02:00
|
|
|
})
|
|
|
|
|
2013-11-12 22:28:21 +01:00
|
|
|
minetest.register_craft({
|
2013-11-13 17:42:48 +01:00
|
|
|
output = 'cannons:ball_stone',
|
2013-11-12 22:28:21 +01:00
|
|
|
recipe = {
|
|
|
|
{"default:stone"},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2014-03-23 11:17:35 +01:00
|
|
|
output = 'cannons:ball_steel 2',
|
2013-11-12 22:28:21 +01:00
|
|
|
recipe = {
|
2014-03-23 11:17:35 +01:00
|
|
|
{"", "default:steel_ingot",""},
|
|
|
|
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"},
|
|
|
|
{"", "default:steel_ingot",""},
|
2013-11-12 22:28:21 +01:00
|
|
|
},
|
|
|
|
})
|
2014-03-23 11:17:35 +01:00
|
|
|
|
2014-07-27 09:24:33 +02:00
|
|
|
if cannons.config:get("enable_explosion") == "true" then
|
2013-11-16 00:01:52 +01:00
|
|
|
minetest.register_craft({
|
|
|
|
output = 'cannons:ball_exploding 2',
|
|
|
|
recipe = {
|
|
|
|
{"","default:mese",""},
|
|
|
|
{"default:mese","cannons:gunpowder","default:mese"},
|
|
|
|
{"","default:mese",""},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
end
|
2014-03-23 11:17:35 +01:00
|
|
|
|
2014-07-27 09:24:33 +02:00
|
|
|
if cannons.config:get("enable_fire") == "true" then
|
2013-11-16 00:01:52 +01:00
|
|
|
minetest.register_craft({
|
|
|
|
output = 'cannons:ball_fire 2',
|
|
|
|
recipe = {
|
|
|
|
{"","default:wood",""},
|
|
|
|
{"default:wood","default:torch","default:wood"},
|
|
|
|
{"","default:wood",""},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
end
|
2013-11-12 22:28:21 +01:00
|
|
|
--++++++++++++++++++++++++++++++++++++
|
|
|
|
--+ cannon stuff +
|
|
|
|
--++++++++++++++++++++++++++++++++++++
|
2013-11-13 16:50:35 +01:00
|
|
|
|
2014-12-20 14:15:08 +01:00
|
|
|
--steel cannon
|
|
|
|
minetest.register_node("cannons:cannon_steel", {
|
|
|
|
description = "steel cannon",
|
2013-11-12 22:28:21 +01:00
|
|
|
stack_max = 1,
|
2014-12-20 14:15:08 +01:00
|
|
|
--tiles = {"cannon_cannon_top.png","cannon_cannon_top.png","cannon_cannon_side.png","cannon_cannon_side.png","cannon_cannon_top.png^cannons_rim.png","cannon_cannon_side.png"},
|
|
|
|
tiles = {"cannons_steel_top.png","cannons_steel_side.png"},
|
|
|
|
drawtype = "mesh",
|
|
|
|
selection_box = cannons.nodeboxes.cannon,
|
|
|
|
collision_box = cannons.nodeboxes.cannon,
|
|
|
|
mesh = "cannon.obj",
|
2013-11-12 22:28:21 +01:00
|
|
|
paramtype = "light",
|
2013-10-12 12:24:24 +02:00
|
|
|
paramtype2 = "facedir",
|
2013-12-05 06:14:27 +01:00
|
|
|
groups = {cracky=1,cannon=1},
|
2013-12-04 16:28:00 +01:00
|
|
|
sounds = cannons.sound_defaults(),
|
2014-12-20 14:15:08 +01:00
|
|
|
--node_box = cannons.nodeboxes.cannon,
|
2013-11-13 17:42:48 +01:00
|
|
|
on_punch = cannons.punched,
|
2013-12-05 02:24:34 +01:00
|
|
|
mesecons = cannons.supportMesecons,
|
2013-11-13 17:42:48 +01:00
|
|
|
on_construct = cannons.on_construct,
|
2013-12-05 02:24:34 +01:00
|
|
|
can_dig = cannons.can_dig,
|
|
|
|
allow_metadata_inventory_put = cannons.allow_metadata_inventory_put,
|
|
|
|
allow_metadata_inventory_move = cannons.allow_metadata_inventory_move,
|
|
|
|
on_metadata_inventory_put = cannons.inventory_modified,
|
|
|
|
on_metadata_inventory_take = cannons.inventory_modified,
|
2014-12-20 14:15:08 +01:00
|
|
|
on_metadata_inventory_move = cannons.inventory_modified,
|
2013-10-12 12:24:24 +02:00
|
|
|
})
|
2013-11-10 17:58:23 +01:00
|
|
|
|
2014-12-20 14:15:08 +01:00
|
|
|
--bronze cannon
|
|
|
|
minetest.register_node("cannons:cannon_bronze", {
|
|
|
|
description = "bronze cannon",
|
2013-11-12 22:28:21 +01:00
|
|
|
stack_max = 1,
|
2014-12-20 14:15:08 +01:00
|
|
|
--tiles = {"cannon_cannon_top.png","cannon_cannon_top.png","cannon_cannon_side.png","cannon_cannon_side.png","cannon_cannon_top.png^cannons_rim.png","cannon_cannon_side.png"},
|
|
|
|
tiles = {"cannons_bronze_top.png","cannons_bronze_side.png"},
|
|
|
|
drawtype = "mesh",
|
|
|
|
selection_box = cannons.nodeboxes.cannon,
|
|
|
|
collision_box = cannons.nodeboxes.cannon,
|
|
|
|
mesh = "cannon.obj",
|
2013-11-12 22:28:21 +01:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
2013-12-05 06:14:27 +01:00
|
|
|
groups = {cracky=1,cannon=1},
|
2013-12-04 16:28:00 +01:00
|
|
|
sounds = cannons.sound_defaults(),
|
2014-12-20 14:15:08 +01:00
|
|
|
--node_box = cannons.nodeboxes.cannon,
|
2013-11-13 17:42:48 +01:00
|
|
|
on_punch = cannons.punched,
|
2013-12-05 02:24:34 +01:00
|
|
|
mesecons = cannons.supportMesecons,
|
2013-11-13 17:42:48 +01:00
|
|
|
on_construct = cannons.on_construct,
|
2013-12-05 02:24:34 +01:00
|
|
|
can_dig = cannons.can_dig,
|
2014-12-20 14:15:08 +01:00
|
|
|
allow_metadata_inventory_put = cannons.allow_metadata_inventory_put,
|
2013-12-05 02:24:34 +01:00
|
|
|
allow_metadata_inventory_move = cannons.allow_metadata_inventory_move,
|
|
|
|
on_metadata_inventory_put = cannons.inventory_modified,
|
|
|
|
on_metadata_inventory_take = cannons.inventory_modified,
|
2014-12-20 14:15:08 +01:00
|
|
|
on_metadata_inventory_move = cannons.inventory_modified,
|
2013-11-12 22:28:21 +01:00
|
|
|
})
|
|
|
|
|
2014-12-20 14:15:08 +01:00
|
|
|
minetest.register_node("cannons:wood_stand", {
|
|
|
|
description = "Wooden cannon stand",
|
|
|
|
stack_max = 9,
|
|
|
|
--tiles = side other
|
|
|
|
tiles = {"default_wood.png^cannons_rim.png","default_wood.png"},
|
|
|
|
selection_box = cannons.nodeboxes.stand,
|
|
|
|
collision_box = cannons.nodeboxes.stand,
|
|
|
|
mesh = "cannonstand.obj",
|
|
|
|
drawtype = "mesh",
|
2013-11-12 22:28:21 +01:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
2014-12-20 14:15:08 +01:00
|
|
|
groups = {choppy=2,cannonstand=1},
|
2013-11-12 22:28:21 +01:00
|
|
|
sounds = default.node_sound_wood_defaults(),
|
2014-12-20 14:15:08 +01:00
|
|
|
on_rightclick = cannons.stand_on_rightclick
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("cannons:ship_stand", {
|
|
|
|
description = "Wooden cannon stand",
|
|
|
|
stack_max = 9,
|
|
|
|
--tiles = wheel material side
|
|
|
|
tiles = {"cannons_steel_top.png","default_wood.png","default_wood.png^cannons_rim.png"},
|
|
|
|
selection_box = cannons.nodeboxes.stand,
|
|
|
|
collision_box = cannons.nodeboxes.stand,
|
|
|
|
mesh = "ship_cannonstand.obj",
|
|
|
|
drawtype = "mesh",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {choppy=2,cannonstand=1},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
on_rightclick = cannons.stand_on_rightclick
|
|
|
|
})
|
|
|
|
--wooden stand with steel cannon
|
|
|
|
--in German: Holzständer mit Stahkanone
|
|
|
|
minetest.register_node("cannons:wood_stand_with_cannon_steel", {
|
|
|
|
description = "wooden stand with steel cannon",
|
|
|
|
cannons ={stand="cannons:wood_stand",cannon="cannons:cannon_steel"},
|
|
|
|
stack_max = 0,
|
|
|
|
tiles = {"cannons_steel_top.png","cannons_steel_side.png","default_wood.png","default_wood.png^cannons_rim.png","cannons_steel_top.png"},
|
|
|
|
mesh = "cannonstand_cannon.obj",
|
|
|
|
selection_box = cannons.nodeboxes.cannon,
|
|
|
|
collision_box = cannons.nodeboxes.cannon,
|
|
|
|
drawtype = "mesh",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {cracky=2,cannonstand=1},
|
|
|
|
sounds = cannons.sound_defaults(),
|
|
|
|
on_punch = cannons.punched,
|
|
|
|
mesecons = cannons.supportMesecons,
|
|
|
|
on_construct = cannons.on_construct,
|
|
|
|
can_dig = cannons.can_dig,
|
|
|
|
on_dig = cannons.dug,
|
|
|
|
allow_metadata_inventory_put = cannons.allow_metadata_inventory_put,
|
|
|
|
allow_metadata_inventory_move = cannons.allow_metadata_inventory_move,
|
|
|
|
on_metadata_inventory_put = cannons.inventory_modified,
|
|
|
|
on_metadata_inventory_take = cannons.inventory_modified,
|
|
|
|
on_metadata_inventory_move = cannons.inventory_modified,
|
2013-11-12 22:28:21 +01:00
|
|
|
})
|
2013-11-13 21:12:23 +01:00
|
|
|
|
2014-12-20 14:15:08 +01:00
|
|
|
minetest.register_node("cannons:ship_stand_with_cannon_steel", {
|
|
|
|
description = "ship stand with steel cannon",
|
|
|
|
cannons ={stand="cannons:ship_stand",cannon="cannons:cannon_steel"},
|
|
|
|
stack_max = 0,
|
|
|
|
tiles = {"cannons_steel_top.png","cannons_steel_side.png","cannons_steel_top.png","default_wood.png","default_wood.png^cannons_rim.png"},
|
|
|
|
mesh = "ship_cannonstand_cannon.obj",
|
|
|
|
selection_box = cannons.nodeboxes.cannon,
|
|
|
|
collision_box = cannons.nodeboxes.cannon,
|
|
|
|
drawtype = "mesh",
|
2013-11-13 21:12:23 +01:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
2013-11-16 01:07:47 +01:00
|
|
|
groups = {cracky=2,cannonstand=1},
|
2014-12-20 14:15:08 +01:00
|
|
|
sounds = cannons.sound_defaults(),
|
|
|
|
on_punch = cannons.punched,
|
|
|
|
mesecons = cannons.supportMesecons,
|
|
|
|
on_construct = cannons.on_construct,
|
|
|
|
can_dig = cannons.can_dig,
|
|
|
|
on_dig = cannons.dug,
|
|
|
|
allow_metadata_inventory_put = cannons.allow_metadata_inventory_put,
|
|
|
|
allow_metadata_inventory_move = cannons.allow_metadata_inventory_move,
|
|
|
|
on_metadata_inventory_put = cannons.inventory_modified,
|
|
|
|
on_metadata_inventory_take = cannons.inventory_modified,
|
|
|
|
on_metadata_inventory_move = cannons.inventory_modified,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("cannons:ship_stand_with_cannon_bronze", {
|
|
|
|
description = "ship stand with bronze cannon",
|
|
|
|
cannons ={stand="cannons:ship_stand",cannon="cannons:cannon_bronze"},
|
|
|
|
stack_max = 0,
|
|
|
|
tiles = {"cannons_bronze_top.png","cannons_bronze_side.png","cannons_steel_top.png","default_wood.png","default_wood.png^cannons_rim.png"},
|
|
|
|
mesh = "ship_cannonstand_cannon.obj",
|
|
|
|
selection_box = cannons.nodeboxes.cannon,
|
|
|
|
collision_box = cannons.nodeboxes.cannon,
|
|
|
|
drawtype = "mesh",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {cracky=2,cannonstand=1},
|
|
|
|
sounds = cannons.sound_defaults(),
|
|
|
|
on_punch = cannons.punched,
|
|
|
|
mesecons = cannons.supportMesecons,
|
|
|
|
on_construct = cannons.on_construct,
|
|
|
|
can_dig = cannons.can_dig,
|
|
|
|
on_dig = cannons.dug,
|
|
|
|
allow_metadata_inventory_put = cannons.allow_metadata_inventory_put,
|
|
|
|
allow_metadata_inventory_move = cannons.allow_metadata_inventory_move,
|
|
|
|
on_metadata_inventory_put = cannons.inventory_modified,
|
|
|
|
on_metadata_inventory_take = cannons.inventory_modified,
|
|
|
|
on_metadata_inventory_move = cannons.inventory_modified,
|
|
|
|
})
|
|
|
|
--wooden stand with bronze cannon --
|
|
|
|
--in German: Holzständer mit Bronzekanone
|
|
|
|
minetest.register_node("cannons:wood_stand_with_cannon_bronze", {
|
|
|
|
description = "wooden stand with bronze cannon",
|
|
|
|
cannons ={stand="cannons:wood_stand",cannon="cannons:cannon_bronze"},
|
|
|
|
stack_max = 0,
|
|
|
|
tiles = {"cannons_bronze_top.png","cannons_bronze_side.png","default_wood.png","default_wood.png^cannons_rim.png","cannons_steel_top.png"},
|
|
|
|
mesh = "cannonstand_cannon.obj",
|
|
|
|
selection_box = cannons.nodeboxes.cannon,
|
|
|
|
collision_box = cannons.nodeboxes.cannon,
|
|
|
|
drawtype = "mesh",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {cracky=2,cannonstand=1},
|
|
|
|
sounds = cannons.sound_defaults(),
|
|
|
|
on_punch = cannons.punched,
|
|
|
|
mesecons = cannons.supportMesecons,
|
|
|
|
on_construct = cannons.on_construct,
|
|
|
|
can_dig = cannons.can_dig,
|
|
|
|
on_dig = cannons.dug,
|
|
|
|
allow_metadata_inventory_put = cannons.allow_metadata_inventory_put,
|
|
|
|
allow_metadata_inventory_move = cannons.allow_metadata_inventory_move,
|
|
|
|
on_metadata_inventory_put = cannons.inventory_modified,
|
|
|
|
on_metadata_inventory_take = cannons.inventory_modified,
|
|
|
|
on_metadata_inventory_move = cannons.inventory_modified,
|
2013-11-13 21:12:23 +01:00
|
|
|
})
|
2014-12-20 14:15:08 +01:00
|
|
|
|
2013-11-16 00:01:52 +01:00
|
|
|
--++++++++++++++++++++++++++++++++++++
|
|
|
|
--+ cannon balls +
|
|
|
|
--++++++++++++++++++++++++++++++++++++
|
2013-11-13 21:12:23 +01:00
|
|
|
|
2013-12-05 02:24:34 +01:00
|
|
|
--wood ball
|
2013-11-13 17:42:48 +01:00
|
|
|
minetest.register_node("cannons:ball_wood", {
|
2013-11-12 22:57:22 +01:00
|
|
|
description = "Cannon Ball Wood",
|
2013-11-12 22:28:21 +01:00
|
|
|
stack_max = 99,
|
|
|
|
tiles = {"default_wood.png"},
|
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {cracky=2},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
2013-12-05 02:24:34 +01:00
|
|
|
node_box = cannons.nodeboxes.ball,
|
2013-11-12 22:28:21 +01:00
|
|
|
})
|
|
|
|
|
2013-12-05 02:24:34 +01:00
|
|
|
--stone ball
|
2013-11-13 17:42:48 +01:00
|
|
|
minetest.register_node("cannons:ball_stone", {
|
2013-11-12 22:28:21 +01:00
|
|
|
description = "Cannon Ball Stone",
|
|
|
|
stack_max = 99,
|
|
|
|
tiles = {"default_stone.png"},
|
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {cracky=2},
|
2013-12-05 06:15:52 +01:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
2013-12-05 02:24:34 +01:00
|
|
|
node_box = cannons.nodeboxes.ball,
|
2013-11-12 22:28:21 +01:00
|
|
|
})
|
|
|
|
|
2013-12-05 02:24:34 +01:00
|
|
|
--steel ball
|
2013-11-13 17:42:48 +01:00
|
|
|
minetest.register_node("cannons:ball_steel", {
|
2013-11-12 22:57:22 +01:00
|
|
|
description = "Cannon Ball Steel",
|
2013-11-12 22:28:21 +01:00
|
|
|
stack_max = 99,
|
2014-12-20 14:15:08 +01:00
|
|
|
tiles = {"cannons_steel_top.png"},
|
2013-11-12 22:28:21 +01:00
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {cracky=2},
|
2013-12-05 06:15:52 +01:00
|
|
|
sounds = cannons.sound_defaults(),
|
2013-12-05 02:24:34 +01:00
|
|
|
node_box = cannons.nodeboxes.ball,
|
2013-11-12 22:28:21 +01:00
|
|
|
})
|
2013-12-05 02:24:34 +01:00
|
|
|
|
|
|
|
--explosion cannon ball
|
2014-07-27 09:24:33 +02:00
|
|
|
if cannons.config:get("enable_explosion") == "true" then
|
2013-11-16 00:01:52 +01:00
|
|
|
minetest.register_node("cannons:ball_exploding", {
|
|
|
|
description = "Exploding Cannon Ball",
|
|
|
|
stack_max = 99,
|
2013-12-02 16:36:29 +01:00
|
|
|
tiles = {"default_mese_block.png"},
|
2013-11-16 00:01:52 +01:00
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {cracky=2},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
2013-12-05 02:24:34 +01:00
|
|
|
node_box = cannons.nodeboxes.ball,
|
2013-11-16 00:01:52 +01:00
|
|
|
})
|
|
|
|
end
|
2013-12-05 02:24:34 +01:00
|
|
|
|
|
|
|
--fire cannon ball
|
2014-07-27 09:24:33 +02:00
|
|
|
if cannons.config:get("enable_fire") == "true" then
|
2013-11-16 00:01:52 +01:00
|
|
|
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(),
|
2013-12-05 02:24:34 +01:00
|
|
|
node_box = cannons.nodeboxes.ball,
|
2013-11-16 00:01:52 +01:00
|
|
|
})
|
|
|
|
end
|
2013-12-05 02:24:34 +01:00
|
|
|
|
|
|
|
--ball wood stack
|
2013-11-13 17:42:48 +01:00
|
|
|
minetest.register_node("cannons:ball_wood_stack", {
|
2013-11-12 22:28:21 +01:00
|
|
|
description = "Cannon Ball Wood Stack",
|
|
|
|
stack_max = 99,
|
|
|
|
tiles = {"default_wood.png"},
|
|
|
|
drawtype = "nodebox",
|
2013-11-13 17:42:48 +01:00
|
|
|
drop = 'cannons:ball_wood 4',
|
2013-11-12 22:28:21 +01:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {cracky=2},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
2013-12-05 02:24:34 +01:00
|
|
|
node_box = cannons.nodeboxes.ball_stack,
|
2013-11-12 22:28:21 +01:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.4, -0.5, -0.5, 0.5, 0.3, 0.5},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2013-12-05 02:24:34 +01:00
|
|
|
--ball stone stack
|
2013-11-13 17:42:48 +01:00
|
|
|
minetest.register_node("cannons:ball_stone_stack", {
|
2013-11-12 22:28:21 +01:00
|
|
|
description = "Cannon Ball Stone Stack",
|
|
|
|
stack_max = 99,
|
|
|
|
tiles = {"default_stone.png"},
|
|
|
|
drawtype = "nodebox",
|
2013-11-13 17:42:48 +01:00
|
|
|
drop = 'cannons:ball_stone 4',
|
2013-11-12 22:28:21 +01:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {cracky=2},
|
2013-12-05 06:15:52 +01:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
2013-12-05 02:24:34 +01:00
|
|
|
node_box = cannons.nodeboxes.ball_stack,
|
2013-11-12 22:28:21 +01:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.4, -0.5, -0.5, 0.5, 0.3, 0.5},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2013-12-05 02:24:34 +01:00
|
|
|
--ball steel stack
|
2013-12-05 06:15:52 +01:00
|
|
|
minetest.register_node("cannons:ball_steel_stack", {
|
2013-11-12 22:28:21 +01:00
|
|
|
description = "Cannon Ball Steel Stack",
|
|
|
|
stack_max = 99,
|
2014-12-20 14:15:08 +01:00
|
|
|
tiles = {"cannons_steel_top.png"},
|
2013-11-12 22:28:21 +01:00
|
|
|
drawtype = "nodebox",
|
2013-11-13 17:42:48 +01:00
|
|
|
drop = 'cannons:ball_steel 4',
|
2013-11-12 22:28:21 +01:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {cracky=2},
|
2013-12-05 06:15:52 +01:00
|
|
|
sounds = cannons.sound_defaults(),
|
2013-12-05 02:24:34 +01:00
|
|
|
node_box = cannons.nodeboxes.ball_stack,
|
2013-11-12 22:28:21 +01:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.4, -0.5, -0.5, 0.5, 0.3, 0.5},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
2013-12-05 22:38:45 +01:00
|
|
|
minetest.register_alias("cannons:canon_ball_steel_stack", "cannons:ball_steel_stack")
|
2013-11-12 22:28:21 +01:00
|
|
|
|
2013-11-10 17:58:23 +01:00
|
|
|
|