add compatibility case for #71

This commit is contained in:
Buckaroo Banzai 2020-07-21 19:46:59 +02:00 committed by GitHub
parent 6a9cf6da27
commit f14faa6680
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,7 +134,8 @@ local run = function(pos, node, run_stage)
minetest.registered_nodes["technic:supply_converter"].on_construct(pos)
enabled = true
else
enabled = enabled == "1"
-- compatibility case for #71
enabled = meta:get_int("enabled") == 1
end
enabled = enabled and (meta:get_int("mesecon_mode") == 0 or meta:get_int("mesecon_effect") ~= 0)
local demand = enabled and meta:get_int("power") or 0