Epic/mods/trail
NathanSalapat fb98659b03 initial upload 2020-06-14 18:29:10 -05:00
..
textures initial upload 2020-06-14 18:29:10 -05:00
README.txt initial upload 2020-06-14 18:29:10 -05:00
init.lua initial upload 2020-06-14 18:29:10 -05:00
license.txt initial upload 2020-06-14 18:29:10 -05:00
mod.conf initial upload 2020-06-14 18:29:10 -05:00
settingtypes.txt initial upload 2020-06-14 18:29:10 -05:00

README.txt

Licenses: Source code MIT. Textures CC BY-SA (3.0)

This mod was developed by paramat from 'desire path' mod by Casimir
https://forum.minetest.net/viewtopic.php?id=3390
Trail 0.3.1 by paramat
Version 0.4 for Minetest 0.5 was developed by FaceDeer

New trampled nodes can be registered with this API:

trail.register_trample_node(trampleable_node_name, trample_def)

trample_def:
{
	trampled_node_name = , -- If this is not defined it defaults to the trampleable node name with "_trampled" appended.
	trampled_node_def_override = {}, -- If trampled_node_name doesn't exist a new node will be registered based on the definition of trampleable_node_name. Any properties in this table will be used to override properties ignored if trampled_node_name is a node that already exists.
	probability = 1, -- chance that stepping on this node will cause it to turn into the trampled version
	randomize_trampled_param2 = nil, -- if true, sets param2 of trampled node to math.random(0,3)
	erodes = true, -- sets the trampled node up to erode back into the non-trampled verison. ignored if trampled_node_name is a node that already exists, since that may already have an erosion target established
	add_footprint_overlay = true, -- Applies the footprint texture over the +Y tile of the trampleable node. ignored if trampled_node_name is a node that already exists
	hard_pack_node_name = nil, -- If the trampled node is walked on again this is the node that it can get trampled into further. ignored if trampled_node_name is a node that already exists, since it's expected this has already been established
	hard_pack_probability = 0.1, -- The probability that walking on a trampled node will turn it into the hard-packed node. ignored if trampled_node_name is a node that already exists
}


If you've defined a hard_pack_node and want to have it able to erode back to base soil, you can use this callback to manually add it to the erosion system:

trail.register_erosion(source_node_name, destination_node_name)

Note that the source_node should be in group trail_erodes or an error will be thrown.