Traitor/mods/levels
Nathan Salapat 9380a5a460 Added some new furniture 2022-08-18 20:12:57 -05:00
..
sounds Added Liquids 2021-02-13 09:19:02 -06:00
textures Added some new furniture 2022-08-18 20:12:57 -05:00
animated.lua Added things, lol. 2021-12-31 22:22:49 -06:00
borders.lua Added things, lol. 2021-12-31 22:22:49 -06:00
ducts.lua bugfixes from stream. 2021-01-02 11:09:44 -06:00
glass.lua New furniture and task. 2021-11-26 14:35:53 -06:00
ground.lua Added some new furniture 2022-08-18 20:12:57 -05:00
init.lua Added new brick and concrete textures. 2022-03-12 14:43:50 -06:00
license.txt Added new brick and concrete textures. 2022-03-12 14:43:50 -06:00
metal.lua Added some new furniture 2022-08-18 20:12:57 -05:00
misc.lua Added some new furniture 2022-08-18 20:12:57 -05:00
mod.conf Added some lights, screwdriver, and stairs. 2020-12-13 21:50:30 -06:00
readme.txt Added Liquids 2021-02-13 09:19:02 -06:00
scifi.lua Added ropbox 2022-08-11 21:58:16 -05:00
specials.lua Added things, lol. 2021-12-31 22:22:49 -06:00
stone.lua Added some new furniture 2022-08-18 20:12:57 -05:00
tiles.lua Added new brick and concrete textures. 2022-03-12 14:43:50 -06:00
wood.lua Removed deprecated code, added artwork mod. 2021-09-21 07:49:04 -05:00

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.