Ready for the first release
This commit is contained in:
parent
8532ecd383
commit
7e6d2410dd
@ -2,26 +2,26 @@ This is a simple api which aims to simplify the work for modders who want to
|
||||
add throwitems (items you can throw) to minetest.
|
||||
It also contains some examples with some standard throwitems.
|
||||
|
||||
Define a throwitem is really simple, you can use this model:
|
||||
To define a throwitem you can use this model:
|
||||
|
||||
nssbombs:register_throwitem("name_of_your_mod:name_of_the_item", "Description of the item", { --the "nssbombs" mod has to be a dependency of your mod
|
||||
|
||||
--Features of the object:
|
||||
textures = "your_texture.png", --the texture is used both for the image inventory and for the flying entity
|
||||
velocity = num, --optional: velocity of the obejct when you throw it
|
||||
visual_size = {x=xsize, y= ysize}, --option: size of the object when flying
|
||||
velocity = num, --optional: velocity of the obejct when you throw it
|
||||
visual_size = {x=xsize, y= ysize}, --optional: size of the object when flying
|
||||
|
||||
--Recipe for crafting it:
|
||||
recipe_number = num, --number of the items as output of the recipe
|
||||
--to define the recipe you need to use one of the following (not both)
|
||||
recipe_block = "mod:block", --you have to choose a block used for the recipe, if you use this instruction the recipe will be the standard one, see below
|
||||
recipe = {}, --array with standard recipe definition. You can also use a shapeless recipe, but you need to include also the following:
|
||||
--recipe_type = "shapeless", --uncomment if your recipe is a shapeless one (and only if you have defined the recipe with the array)
|
||||
recipe_number = num, --optional: number of the items as output of the recipe
|
||||
--to define the recipe you need to use one of the following (not both):
|
||||
recipe_block = "mod:block", --you have to choose a block used for the recipe, if you use this instruction the recipe will be the standard one, see below
|
||||
recipe = {}, --array with standard recipe definition. You can also use a shapeless recipe, but you need to include also the following:
|
||||
--recipe_type = "shapeless", --uncomment if your recipe is a shapeless one (and only if you have defined the recipe with the array)
|
||||
|
||||
-- Function to be executed when it hits the ground. You have two possibilities:
|
||||
-- you can specify your custom function with:
|
||||
hit_node = function (self, pos)
|
||||
your code here
|
||||
--your code here
|
||||
end,
|
||||
-- Or you can use one of the default explosion types by including this array:
|
||||
explosion = { //see below for the options
|
||||
@ -40,7 +40,7 @@ recipe = {
|
||||
{def.recipe_block, def.recipe_block, def.recipe_block},
|
||||
}
|
||||
|
||||
If you want to use one of the default explosion types you have the include the explosion array with this keys inside:
|
||||
If you want to use one of the default explosion types you have to include the explosion array with this keys inside:
|
||||
- radius, number that define the size of the explosion;
|
||||
- block, it can be:
|
||||
- name of a block, for example "default:ice";
|
||||
@ -62,4 +62,5 @@ If you want to use one of the default explosion types you have the include the e
|
||||
- sound, boolean or the name of an audio file
|
||||
|
||||
Take a look at the file "examples.lua" for the examples and if you want more
|
||||
of them you can find them in nssm
|
||||
of them you can find them in nssm:
|
||||
https://github.com/NPXcoot/nssm/blob/development2/nssm_bombs.lua
|
||||
|
@ -1 +1 @@
|
||||
1.0 default release
|
||||
1.0 first release
|
||||
|
BIN
textures/ice_bomb.png
Normal file
BIN
textures/ice_bomb.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 823 B |
Loading…
x
Reference in New Issue
Block a user