2020-07-25 15:45:58 -07:00
|
|
|
Functions
|
|
|
|
---------
|
|
|
|
|
|
|
|
node_damage.damage(pos, node, digger, num)
|
|
|
|
--Give damage to this node, and set it into the next stage of cracking.
|
|
|
|
--For reference, there are four stages in total, including the stage without damage at all.
|
|
|
|
--When the highest stage is damaged, the nodes is finally destroyed, and the node is either given to the player who destroyed it,
|
|
|
|
--or left on the ground.
|
|
|
|
pos: The location of the node to damage
|
|
|
|
node: The node itself to damage. This is optional. It can be provided if available, but this function can get the node itself.
|
2020-08-15 16:43:47 -07:00
|
|
|
digger: Optional; the person who is damaging this node. Used to determine protection permission.
|
2020-07-25 15:45:58 -07:00
|
|
|
num: Optional; the amount of times to damage this node. If its 3 or more, the node will always be destroyed.
|
2020-08-15 16:43:47 -07:00
|
|
|
--Returns a boolean indicating success.
|
2020-07-25 15:45:58 -07:00
|
|
|
|
2020-08-15 16:43:47 -07:00
|
|
|
node_damage.repair(pos, node, fixer, num)
|
2020-07-25 15:45:58 -07:00
|
|
|
--Remove damage from this node, and set it into the previous stage of cracking.
|
|
|
|
--For reference, there are four stages in total, including the stage without damage at all.
|
|
|
|
--If the node is already fully repaired, nothing will happen.
|
|
|
|
pos: The location of the node to repair
|
|
|
|
node: The node itself to damage. This is optional. It can be provided if available, but this function can get the node itself.
|
2020-08-15 16:43:47 -07:00
|
|
|
fixer: Optional; A person (ObjectRef) who is repairing this node. Used to determine protection permission.
|
2020-07-25 15:45:58 -07:00
|
|
|
num: Optional; the amount of times to repair this node. If its 3 or more, the node will always be fully repaired.
|
2020-08-15 16:43:47 -07:00
|
|
|
--Returns a boolean indicating success.
|