e84a4cff49 | ||
---|---|---|
.gitattributes | ||
.gitignore | ||
README.md | ||
init.lua | ||
mod.lua | ||
player.lua | ||
vector.lua | ||
vector_calc.lua | ||
vector_cmp.lua | ||
world.lua |
README.md
CommonLib by Rubenwardy
Adds common functions that help minetest modders achieve perfection in both their mod, and in interacting with other mods too.
You can include the whole library as a mod (recommended) or just include some modules in your mod.
License
Code: CC-BY-SA
- These conditions apply to the Commonlib code, and not to any mods using the library.
- Commonlib is counted as a seperate library rather than part of the mod using it.
- This means you can use Commonlib in a mod with a different license to this.
Contained Functions
- mod [mod.lua] - namespace
- node_implement( modname,n_ext,n_int,resultfunc ) - A soft depend ingredient adder - uses aliases (by Rubenwardy)
- soft_depend( modname,func ) - Runs a function if a mod is present, and after it loads (by Rubenwardy)
- assert_backtrace( item ) - A debug function for backtracing (by Sapier)
- player [player.lua] - namespace
- player_exists( name ) - sees if a player exists (by Sokomine)
- v3 - namespace
- core module [vector.lua]
- new( x, y, z ) - creates new vector from integers, floats, or tables (by celeron55)
- copy( v ) - copies a vector (by PilzAdam)
- floor( v ) - rounds a vector to integers (by celeron55)
- len( v ) - returns length of the vector (by celeron55)
- norm( v )_ - normalise the vector (by celeron55)
- compare module [vector_cmp.lua]
- cmp( v, u ) - compares vectors (by celeron55)
- equal( v, u ) - checks if two vectors are equal (by PilzAdam)
- distance( v, u ) - the distance between two vectors (by celeron55)
- rotate_y( v, u ) - rotate y (by celeron55)
- get_direction( pos1, pos2 __) - get the direction of a point from enougher (by Sapier)
- calculation module [vector_calc.lua]
- add( v, u ) - adds two vectors together (by celeron55)
- sub( v, u ) - subtracts two vectors (by celeron55)
- mul( v, u ) - multiples two vectors (by celeron55)
- core module [vector.lua]
- world [world.lua] - namespace
- get_surface( x, z ) - get surface of terrain for x/z coordinates (by Sapier)
- node_owner( pos ) - get the name of that node's owner (by VanessaE)