forked from minetest-mods/technic
Add charge set/get callbacks (#600)
For the easier making of multi mod chargeable tools.
This commit is contained in:
@ -144,6 +144,12 @@ Additional definition fields:
|
||||
* Specifies the machine's node name to use when it's not connected connected to a network
|
||||
* `<itemdef>.technic_on_disable = function(pos, node) ...`
|
||||
* This callback is run when the machine is no longer connected to a technic-powered network.
|
||||
* `<itemdef>.technic_get_charge = function(itemstack) ...`
|
||||
* This optional callback will be used to get itemstack charge and max\_charge
|
||||
* Have to return values `charge, max_charge`
|
||||
* Etc. `local charge, maxcharge = itemdef.technic_get_charge(itemstack)`
|
||||
* `<itemdef>.technic_set_charge = function(itemstack, charge) ...`
|
||||
* This optional callback will be used to set itemstack charge
|
||||
|
||||
|
||||
## Node Metadata fields
|
||||
|
Reference in New Issue
Block a user