mirror of
https://files.creativekara.fr/git/poschangelib.git
synced 2024-12-04 21:13:50 +01:00
Update readme. Version 0.5
This commit is contained in:
parent
994b37314c
commit
d446a6fb21
30
README.txt
30
README.txt
@ -1,6 +1,6 @@
|
||||
Minetest mod library: poschangelib
|
||||
==================================
|
||||
version 0.4
|
||||
version 0.5
|
||||
|
||||
See LICENSE for license information
|
||||
|
||||
@ -20,6 +20,7 @@ Summary
|
||||
- Set stomping on nodes
|
||||
- Add footprints
|
||||
- Configuration/Performances tweaking
|
||||
- Debugging
|
||||
|
||||
|
||||
General warning
|
||||
@ -185,6 +186,7 @@ another. And just for ease of use.
|
||||
|
||||
Stomping are registered with poschangelib.register_stomp. It takes 3 parameters:
|
||||
|
||||
poschangelib.register_stomp:
|
||||
- source_node_name: the name of the node that can be stomped. It can be a table
|
||||
with multiple node names to declare the same stomping behaviour to multiple
|
||||
nodes at once.
|
||||
@ -193,6 +195,7 @@ Stomping are registered with poschangelib.register_stomp. It takes 3 parameters:
|
||||
|
||||
The stomp description is a table that can contains the following set of keys:
|
||||
|
||||
stomp_desc:
|
||||
- chance: inverted chance that the stomp occurs (default 1)
|
||||
- duration: time in second after which the stomp reverts.
|
||||
When not set, the stomp is forever. If set it will override duration_min and
|
||||
@ -213,8 +216,10 @@ priority (the lowest priority first). If the roll succeeds, the node is replaced
|
||||
and the next stomps are not run.
|
||||
|
||||
When using a function instead of a stomp node name, this function is a regular
|
||||
player walk listener. It must return a node name or nil. If it returns nil, the
|
||||
stomp is not done and the priority check is not stopped (see just below).
|
||||
player walk listener. It must return a node or nil (i.e. {name = <name>,
|
||||
param = <param> etc}). If it returns nil, the stomp is not done and the priority
|
||||
check is not stopped (see just below). When using only a node name, all other
|
||||
node values are kept.
|
||||
|
||||
|
||||
|
||||
@ -225,7 +230,9 @@ Add footprints
|
||||
Use poschangelib.register_footprint to quickly register footprinted nodes and
|
||||
the stomping associated to it. The function takes 2 parameters:
|
||||
|
||||
- node_name: the name of the node to extend.
|
||||
register_footprint:
|
||||
- node_name: the name of the node to extend, or a table to register multiple
|
||||
footprints with the same stomp_desc
|
||||
- stomp_desc: see above.
|
||||
|
||||
The stomp description can have dedicated keys and values:
|
||||
@ -236,7 +243,8 @@ A new node will be registered with most of it's description copied from the
|
||||
original node. It's top texture will have the footprint layer on it and the
|
||||
stomping behaviour will be automatically created.
|
||||
|
||||
poschangelib.register_footprint returns the footprinted node name.
|
||||
poschangelib.register_footprint returns the footprinted node name(s). If you
|
||||
pass nested tables in node_name, the same nesting is returned.
|
||||
|
||||
|
||||
|
||||
@ -253,3 +261,15 @@ on resources (down to 0.05 which is a every server tick).
|
||||
|
||||
If the server is lagging, try increasing the interval. If the server can afford
|
||||
more precise checks you can decrease the value.
|
||||
|
||||
|
||||
|
||||
Debugging
|
||||
---------
|
||||
|
||||
With the server privileges, you can list available stompings for the node you
|
||||
are currently on. Use /stomp.
|
||||
|
||||
If there is only one stomping available, it is triggered. If there are multiple
|
||||
stomps, it prints the list of stomping names. Use /stomp X to trigger the Xth
|
||||
stomp.
|
||||
|
Loading…
Reference in New Issue
Block a user