Make only higher power flow destroy transformer

Fixes #24
This commit is contained in:
mrkubax10 2024-05-13 19:03:25 +02:00
parent 36549e9a49
commit 5b5816a65c

View File

@ -20,7 +20,7 @@ local transformer={}
transformer.onPowerFlow=function(pos,side,amount) transformer.onPowerFlow=function(pos,side,amount)
local normalized=industrialtest.api.normalizeSide(pos,side) local normalized=industrialtest.api.normalizeSide(pos,side)
local def=minetest.registered_nodes[minetest.get_node(pos).name] local def=minetest.registered_nodes[minetest.get_node(pos).name]
if normalized~=5 and amount>=def._industrialtest_lowerFlow then if normalized~=5 and amount>def._industrialtest_lowerFlow then
minetest.remove_node(pos) minetest.remove_node(pos)
industrialtest.internal.explode(pos,2) industrialtest.internal.explode(pos,2)
end end