moved all crafts into crafts.lua and extrended README.md
This commit is contained in:
parent
0a2074ee44
commit
9a945d4f81
79
README.md
79
README.md
@ -1,3 +1,6 @@
|
|||||||
|
Version: 2.0
|
||||||
|
Author: Sokomine
|
||||||
|
Liscence: GPLv3.0
|
||||||
|
|
||||||
Snow for stairs, slabs and nodeboxes.
|
Snow for stairs, slabs and nodeboxes.
|
||||||
Due to the very nature of nodes in Minetest, the snow cannot
|
Due to the very nature of nodes in Minetest, the snow cannot
|
||||||
@ -7,9 +10,77 @@ better with a snow cover in winter), slabs, fences etc.
|
|||||||
The texture for the winter leaves (the snowy ones) is taken from Moontest,
|
The texture for the winter leaves (the snowy ones) is taken from Moontest,
|
||||||
which can be found at https://github.com/Amaz1/moontest/tree/master/mods/moontest
|
which can be found at https://github.com/Amaz1/moontest/tree/master/mods/moontest
|
||||||
|
|
||||||
|
|
||||||
|
*Autum and winter leaves*
|
||||||
|
|
||||||
|
Fallen autumn leaves and winter leave blocks for trees can be enabled:
|
||||||
|
`moresnow.enable_autumnleaves = true`
|
||||||
|
They're pretty decorative.
|
||||||
|
|
||||||
|
|
||||||
|
*Wool covers*
|
||||||
|
|
||||||
|
The wool covers used to be defined for each wool color seperately. Many
|
||||||
|
nodes were created. That's not ideal for servers.
|
||||||
|
|
||||||
|
If you did use an older version of the moresnow mod *and* players have
|
||||||
|
used the wool layers for building, please set
|
||||||
|
`moresnow.enable_legacy_wool = true`
|
||||||
|
|
||||||
|
All others are better off with just setting
|
||||||
|
`moresnow.enable_wool_cover = true`
|
||||||
|
|
||||||
|
The new version creates nodes of the type `moresnow:wool_multicolor`.
|
||||||
|
You can craft them like this:
|
||||||
|
`wool:white default:stick -`
|
||||||
|
` - - -`
|
||||||
|
` - - -`
|
||||||
|
|
||||||
|
There are 64 colors available.
|
||||||
|
|
||||||
|
Note: In the following craft receipes,
|
||||||
|
`m` stands for `moresnow:wool_multicolor`, and
|
||||||
|
`d` stands for a dye of any color
|
||||||
|
|
||||||
|
In order to craft the one approximating wool colors best, craft:
|
||||||
|
`m d -`
|
||||||
|
`- - -`
|
||||||
|
In order to get the darker variant, craft:
|
||||||
|
`m - d`
|
||||||
|
`- - -`
|
||||||
|
In order to get plain colors (i.e. `red`, `blue`, ...), craft:
|
||||||
|
`m - -`
|
||||||
|
`- d -`
|
||||||
|
In order to get pastel colors, craft:
|
||||||
|
`m - -`
|
||||||
|
`- - d`
|
||||||
|
As there are 64 colors available and only 15 wool and dye colors, the
|
||||||
|
extra four colors can be crafted by replacing the dye in the craft
|
||||||
|
receipe above with `wool:white`.
|
||||||
|
|
||||||
|
Usage: Wield `moresnow:wool_multicolor` and place it either on flat
|
||||||
|
ground for a carpet, on a stair, a slab, an inner or outer stair,
|
||||||
|
a microblock or a panel. Less shapes than for moresnow are supported.
|
||||||
|
After you've placed the wool layer and it has adjusted to the shape
|
||||||
|
below, you can remove the stair or slab etc. that gave the wool its
|
||||||
|
shape and replace that node with something else to your liking.
|
||||||
|
Unlike the snow and leaves nodes, the wool is not a falling node and
|
||||||
|
will stay where it is.
|
||||||
|
|
||||||
|
|
||||||
|
*Snow cannon*
|
||||||
|
|
||||||
|
The snow cannon is an easy way to cover an area (usually 8x8) with
|
||||||
|
snow without having to place it manually. Set
|
||||||
|
`moresnow.enable_snow_cannon = true`
|
||||||
|
in order to enable the snow cannon as such.
|
||||||
|
|
||||||
|
If you set
|
||||||
|
`moresnow.crazy_mode = true`
|
||||||
|
then the snow cannon can be set into a mode where it shoots snowballs
|
||||||
|
randomly around. They may land quite far away from the cannon. It is
|
||||||
|
very fun to watch but perhaps not ideal for servers.
|
||||||
|
|
||||||
|
|
||||||
More documentation can be found in the [Minetest forum](https://forum.minetest.net/posting.php?f=9&t=9811&p=149257) and/or
|
More documentation can be found in the [Minetest forum](https://forum.minetest.net/posting.php?f=9&t=9811&p=149257) and/or
|
||||||
in the [Wiki](https://github.com/Sokomine/moresnow/wiki).
|
in the [Wiki](https://github.com/Sokomine/moresnow/wiki).
|
||||||
|
|
||||||
Version: 1.0
|
|
||||||
Author: Sokomine
|
|
||||||
Liscence: GPLv3.0
|
|
||||||
|
79
crafts.lua
79
crafts.lua
@ -1,6 +1,85 @@
|
|||||||
|
|
||||||
|
-- snow on soil (used by mg_villages mapgen):
|
||||||
|
if(true) then
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'moresnow:snow_soil',
|
||||||
|
recipe = {{'default:dirt', 'default:snow',''}},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- the snow cannon:
|
||||||
|
if( moresnow.enable_snow_cannon ) then
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'moresnow:snow_cannon',
|
||||||
|
recipe = {{'default:steel_ingot', '', 'default:steel_ingot'},
|
||||||
|
{'default:steel_ingot', 'default:mese', 'default:steel_ingot'},
|
||||||
|
{'default:copper_ingot','default:steelblock', 'default:copper_ingot'}},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- decorative autumn leaves and winter leaves:
|
||||||
|
if( moresnow.enable_autumnleaves ) then
|
||||||
|
-- full leaves blocks for decorative autumn trees
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = 'moresnow:autumnleaves_tree',
|
||||||
|
recipe = {'default:leaves','default:torch'},
|
||||||
|
replacements = {{'default:torch','default:torch'}}
|
||||||
|
})
|
||||||
|
-- 9 layers of autumn leaves
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'moresnow:autumnleaves 9',
|
||||||
|
recipe = {{'moresnow:autumnleaves_tree'}},
|
||||||
|
})
|
||||||
|
-- reverse craft
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'moresnow:autumnleaves_tree',
|
||||||
|
recipe = {{'moresnow:autumnleaves','moresnow:autumnleaves','moresnow:autumnleaves'},
|
||||||
|
{'moresnow:autumnleaves','moresnow:autumnleaves','moresnow:autumnleaves'},
|
||||||
|
{'moresnow:autumnleaves','moresnow:autumnleaves','moresnow:autumnleaves'}}
|
||||||
|
})
|
||||||
|
-- white/grey leaves for trees in winter
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = 'moresnow:winterleaves_tree',
|
||||||
|
recipe = {'moresnow:autumnleaves_tree','default:snow'},
|
||||||
|
replacements = {{'default:snow','default:snow'}}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- the legacy wool covers with one defined for each color (plus craft for the multicolored one):
|
||||||
|
if( moresnow.wool_dyes and minetest.get_modpath( 'wool' )) then
|
||||||
|
for _,v in ipairs( moresnow.wool_dyes ) do
|
||||||
|
local wool_color = v
|
||||||
|
local add_tool = 'default:cobble'
|
||||||
|
-- we need to craft the multicolored wool somehow - while some servers might
|
||||||
|
-- still want to use the old white wool cover
|
||||||
|
if(v == "multicolor") then
|
||||||
|
wool_color = "white"
|
||||||
|
add_tool = 'default:stick'
|
||||||
|
end
|
||||||
|
-- craft one wool block into 9 layers
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'moresnow:wool_'..v..' 9',
|
||||||
|
recipe = {{'wool:'..wool_color, add_tool}},
|
||||||
|
replacements = {{add_tool, add_tool}},
|
||||||
|
})
|
||||||
|
-- craft the wool layers back to a full wool block
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'wool:'..v,
|
||||||
|
recipe = {
|
||||||
|
{'moresnow:wool_'..v, 'moresnow:wool_'..v, 'moresnow:wool_'..v },
|
||||||
|
{'moresnow:wool_'..v, 'moresnow:wool_'..v, 'moresnow:wool_'..v },
|
||||||
|
{'moresnow:wool_'..v, 'moresnow:wool_'..v, 'moresnow:wool_'..v },
|
||||||
|
}})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- switching color receipes for the multicolored wool layer:
|
||||||
if(moresnow.enable_wool_cover) then
|
if(moresnow.enable_wool_cover) then
|
||||||
|
-- craft receipes for the dyes
|
||||||
local dyes = {"white", "grey", "dark_grey", "black",
|
local dyes = {"white", "grey", "dark_grey", "black",
|
||||||
"violet", "blue", "cyan", "dark_green", "green",
|
"violet", "blue", "cyan", "dark_green", "green",
|
||||||
"yellow", "brown", "orange", "red", "magenta", "pink",
|
"yellow", "brown", "orange", "red", "magenta", "pink",
|
||||||
|
11
init.lua
11
init.lua
@ -8,12 +8,11 @@ moresnow = {}
|
|||||||
-- The txture and idea for them came from LazyJ.
|
-- The txture and idea for them came from LazyJ.
|
||||||
moresnow.enable_autumnleaves = true
|
moresnow.enable_autumnleaves = true
|
||||||
-- wool is useful for covering stairs; turns them into benches;
|
-- wool is useful for covering stairs; turns them into benches;
|
||||||
-- change this if you want the wool functionality only for a few nodes (i.e. only white - or none at all)
|
|
||||||
--moresnow.wool_dyes = {"white", "grey", "black", "red", "yellow", "green", "cyan", "blue",
|
|
||||||
-- "magenta", "orange", "violet", "brown", "pink", "dark_grey", "dark_green"}
|
|
||||||
-- no need to define so many - we use multicolor now for new worlds:
|
-- no need to define so many - we use multicolor now for new worlds:
|
||||||
moresnow.wool_dyes = {}
|
moresnow.wool_dyes = {}
|
||||||
moresnow.enable_wool_cover = true
|
moresnow.enable_wool_cover = true
|
||||||
|
-- change this if you want the wool functionality only for a few nodes (i.e. only white - or none at all)
|
||||||
|
moresnow.enable_legacy_wool = false
|
||||||
-- the snow cannon allows to create snow
|
-- the snow cannon allows to create snow
|
||||||
moresnow.enable_snow_cannon = true
|
moresnow.enable_snow_cannon = true
|
||||||
-- with this set, the snow cannon can *shoot* snowballs - which will fly a long way;
|
-- with this set, the snow cannon can *shoot* snowballs - which will fly a long way;
|
||||||
@ -22,6 +21,12 @@ moresnow.crazy_mode = true
|
|||||||
-- end of configuration
|
-- end of configuration
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
-- those are many nodes. enable_legacy_wool only on old servers where players have built with these
|
||||||
|
-- nodes. All others are better off with just enable_wool_cover:
|
||||||
|
if(moresnow.enable_legacy_wool) then
|
||||||
|
moresnow.wool_dyes = {"white", "grey", "black", "red", "yellow", "green", "cyan", "blue",
|
||||||
|
"magenta", "orange", "violet", "brown", "pink", "dark_grey", "dark_green"}
|
||||||
|
end
|
||||||
-- one colored wool layer that comes in 64 colors (uses color4dir):
|
-- one colored wool layer that comes in 64 colors (uses color4dir):
|
||||||
if(moresnow.enable_wool_cover) then
|
if(moresnow.enable_wool_cover) then
|
||||||
table.insert(moresnow.wool_dyes, "multicolor")
|
table.insert(moresnow.wool_dyes, "multicolor")
|
||||||
|
@ -381,16 +381,6 @@ minetest.register_abm({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'moresnow:snow_cannon',
|
|
||||||
recipe = {
|
|
||||||
{ 'default:steel_ingot', '', 'default:steel_ingot' },
|
|
||||||
{ 'default:steel_ingot', 'default:mese', 'default:steel_ingot' },
|
|
||||||
{ 'default:copper_ingot','default:steelblock', 'default:copper_ingot' },
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- the snow mod does this already
|
-- the snow mod does this already
|
||||||
if( not( minetest.get_modpath( 'snow' ))) then
|
if( not( minetest.get_modpath( 'snow' ))) then
|
||||||
minetest.override_item("default:snow", {
|
minetest.override_item("default:snow", {
|
||||||
|
@ -130,38 +130,9 @@ if( moresnow.enable_autumnleaves ) then
|
|||||||
return moresnow.on_construct_leaves( pos, 'moresnow:autumnleaves' );
|
return moresnow.on_construct_leaves( pos, 'moresnow:autumnleaves' );
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- full leaves blocks for decorative autumn trees
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = 'moresnow:autumnleaves_tree',
|
|
||||||
recipe = {'default:leaves','default:torch'},
|
|
||||||
replacements = {{'default:torch','default:torch'}}
|
|
||||||
});
|
|
||||||
|
|
||||||
-- 9 layers of autumn leaves
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'moresnow:autumnleaves 9',
|
|
||||||
recipe = { {'moresnow:autumnleaves_tree'}
|
|
||||||
}});
|
|
||||||
|
|
||||||
-- reverse craft
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'moresnow:autumnleaves_tree',
|
|
||||||
recipe = { {'moresnow:autumnleaves','moresnow:autumnleaves','moresnow:autumnleaves'},
|
|
||||||
{'moresnow:autumnleaves','moresnow:autumnleaves','moresnow:autumnleaves'},
|
|
||||||
{'moresnow:autumnleaves','moresnow:autumnleaves','moresnow:autumnleaves'}
|
|
||||||
}});
|
|
||||||
|
|
||||||
-- white/grey leaves for trees in winter
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = 'moresnow:winterleaves_tree',
|
|
||||||
recipe = {'moresnow:autumnleaves_tree','default:snow'},
|
|
||||||
replacements = {{'default:snow','default:snow'}}
|
|
||||||
});
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if( moresnow.wool_dyes and minetest.get_modpath( 'wool' )) then
|
if( moresnow.wool_dyes and minetest.get_modpath( 'wool' )) then
|
||||||
for _,v in ipairs( moresnow.wool_dyes ) do
|
for _,v in ipairs( moresnow.wool_dyes ) do
|
||||||
local ptype2 = "facedir"
|
local ptype2 = "facedir"
|
||||||
@ -198,21 +169,6 @@ if( moresnow.wool_dyes and minetest.get_modpath( 'wool' )) then
|
|||||||
return moresnow.on_construct_wool( pos, 'moresnow:wool_'..v, v );
|
return moresnow.on_construct_wool( pos, 'moresnow:wool_'..v, v );
|
||||||
end,
|
end,
|
||||||
});
|
});
|
||||||
|
|
||||||
-- craft one wool block into 9 layers
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'moresnow:wool_'..v..' 9',
|
|
||||||
recipe = { {'wool:'..v}
|
|
||||||
}});
|
|
||||||
|
|
||||||
-- craft the wool layers back to a full wool block
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'wool:'..v,
|
|
||||||
recipe = {
|
|
||||||
{ 'moresnow:wool_'..v, 'moresnow:wool_'..v, 'moresnow:wool_'..v },
|
|
||||||
{ 'moresnow:wool_'..v, 'moresnow:wool_'..v, 'moresnow:wool_'..v },
|
|
||||||
{ 'moresnow:wool_'..v, 'moresnow:wool_'..v, 'moresnow:wool_'..v },
|
|
||||||
}});
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |
Loading…
Reference in New Issue
Block a user