added a settings file and craft rezieps for gunpowder and canons

This commit is contained in:
adrido 2013-11-10 17:58:23 +01:00
parent 5c7c677073
commit 2e8a37d9b4
10 changed files with 96 additions and 13 deletions

@ -1,9 +1,13 @@
enable_fire = true
enable_explosion = true
canons = {}
local MODPATH = minetest.get_modpath(minetest.get_current_modname())
enable_fire = canons.enable_fire
enable_explosion = canons.enable_explosion
dofile(MODPATH .."/settings.txt")
dofile(MODPATH .."/print_r.lua")
dofile(MODPATH .."/functions.lua")
dofile(MODPATH .."/items.lua")

@ -1,24 +1,85 @@
minetest.register_craftitem("canons:gunpowder", {
groups = {gunpowder=1},
Description = "Gunpowder",
description = "Gunpowder",
inventory_image = "canons_gunpowder.png"
})
minetest.register_craftitem("canons:sulfur", {
Description = "Sulfur",
inventory_image = "canons_sulfur.png"
})
minetest.register_craftitem("canons:salt", {
Description = "Salt",
description = "Salt",
inventory_image = "canons_salt.png"
})
minetest.register_craft({
type = "cooking",
output = 'canons:salt',
recipe = 'bucket:bucket_water',
minetest.register_craftitem("canons:bucket_salt", {
description = "Bucket with salt",
inventory_image = "canons_bucket_salt.png",
stack_max = 300
})
minetest.register_craft({
type = "shapeless",
output = 'canons:salt 12',
recipe = {
"canons:bucket_salt"
},
replacements = {
{"canons:bucket_salt", "bucket:bucket_empty"}
}
})
minetest.register_craft({
type = "cooking",
output = 'canons:bucket_salt',
recipe = 'bucket:bucket_water',
cooktime = 15
})
minetest.register_craftitem("canons:iron_barrel", {
groups = {canonbarrel=1},
description = "Iron Cannonbarrel",
inventory_image = "canons_barrel_iron.png",
stack_max = 10
})
minetest.register_craftitem("canons:copper_barrel", {
groups = {canonbarrel=1},
description = "copper Cannonbarrel",
inventory_image = "canons_barrel_copper.png",
stack_max = 10
})
minetest.register_craftitem("canons:mithrill_barrel", {
groups = {canonbarrel=1},
description = "mithrill Cannonbarrel",
inventory_image = "canons_barrel_mithrill.png",
stack_max = 10
})
minetest.register_craft({
type = "shapeless",
output = 'canons:gunpowder',
recipe = {
"default:coal_lump", "default:mese_crystal", "canons:salt"
},
})
minetest.register_craft({
output = 'canons:iron_barrel',
recipe = {
{"default:steelblock", "default:steelblock", "default:steelblock"},
{"", "default:mese_block", ""},
{"default:steelblock", "default:steelblock", "default:steelblock"}
},
})
minetest.register_craft({
output = 'canons:canon',
recipe = {
{"default:cobble", "default:cobble", "default:cobble"},
{"", "group:canonbarrel", ""},
{"default:cobble", "default:cobble", "default:cobble"}
},
})
minetest.register_craftitem("canons:stone_bullet", {
Description = "Gunpowder",
Description = "Stone Bullet",
inventory_image = "canons_bullet.png"
})
@ -91,3 +152,5 @@ minetest.register_node("canons:canon", {
on_metadata_inventory_move = canons.inventory_modified,
})

16
settings.txt Normal file

@ -0,0 +1,16 @@
------------------------------------------------------------------------------
------------------------------ CONFIGURATION ---------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-------- Change settings by changing the values after the "=". ---------------
------------------------------------------------------------------------------
-- enable/disable the muni wich makes things burning if it hit them.
-- if you want to dissable it just set it to false:
canons.enable_fire = true
-- enable/disable the muni wich destroyes nodesif it hit them.
-- if you want to dissable it just set it to false:
canons.enable_explosion = true

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

BIN
textures/canons_salt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

BIN
textures/schiffskanone.xcf Normal file

Binary file not shown.