This repository has been archived on 2020-05-24. You can view files and clone it, but cannot push or open issues or pull requests.
2017-08-20 16:32:00 +00:00
|
|
|
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing)
|
|
|
|
if minetest.get_item_group(itemstack:get_name(), "sparktech_energy_storeonbreak") > 0 then
|
|
|
|
local meta = minetest.get_meta(pos)
|
2018-09-20 22:38:16 +00:00
|
|
|
if itemstack:get_metadata() and itemstack:get_metadata() ~= "" then
|
|
|
|
meta:set_int("energy", itemstack:get_metadata())
|
|
|
|
end
|
2017-08-20 16:32:00 +00:00
|
|
|
end
|
2018-09-20 22:38:16 +00:00
|
|
|
end)
|