Nathan Salapat 5359a184c9 small updates. 1 سال پیش
..
sounds 56dccd5f9d New GUIs and textures. 2 سال پیش
textures 5359a184c9 small updates. 1 سال پیش
animated.lua 56dccd5f9d New GUIs and textures. 2 سال پیش
borders.lua 59c215680c Added things, lol. 3 سال پیش
ducts.lua 5166dd07ee bugfixes from stream. 4 سال پیش
floor.lua 5359a184c9 small updates. 1 سال پیش
glass.lua e8e9d414d6 New furniture and task. 3 سال پیش
ground.lua 5359a184c9 small updates. 1 سال پیش
init.lua 5359a184c9 small updates. 1 سال پیش
license.txt 56dccd5f9d New GUIs and textures. 2 سال پیش
metal.lua 5359a184c9 small updates. 1 سال پیش
misc.lua 9380a5a460 Added some new furniture 2 سال پیش
mod.conf d3fea7a9af Added some lights, screwdriver, and stairs. 4 سال پیش
readme.txt 4236975123 Added Liquids 3 سال پیش
scifi.lua 5359a184c9 small updates. 1 سال پیش
specials.lua 56dccd5f9d New GUIs and textures. 2 سال پیش
stone.lua 5359a184c9 small updates. 1 سال پیش
tiles.lua a31982b3d4 Added new brick and concrete textures. 2 سال پیش
wood.lua 1120ef1f44 Added pallet racking 2 سال پیش

readme.txt

This mod let's you register several types of nodes with a single function.

Register a normal node with a global texture (128px) All sides will display the same texture.
Optionally register slabs and stairs as well.

levels.register_basic(name, desc, sound, nodes, vol)
name is the name of the node, also the name of the texture.
desc is the node description.
sound is a string of the sound that should be made when walked on. You can see the available sounds by looking in the /sounds directory.
nodes is optional, defaults to 2. Setting to 0 will register only a full node, setting to 1 will register a full node and slab, setting to 2 will register a full node, slab, and the three stair variants.
vol is optional, defaults to 1. Use this to adjust the volume of a node.
The texture must be named levels_[name].png and be 128px. When placed in world the texture will span across four nodes.

levels.register_tube(name, desc, sound, nodes, vol)
Same as above for the most part. Difference being that it doesn't use global textures, and requires 2 32px textures.
Textures must be named levels_[name]_top.png and levels_[name]_side.png
This is intended for things like tree trunks, the nodes can be rotated, and will auto rotate when placing.

levels.register_alpha(name, desc, sound, vol)
Same as register_basic with two differences. Uses the allfaces drawtype, making it suitable for leaves or glass.
No option for partial blocks.

You can find the functions in init.lua and see how they are all used by looking at any of the other files.