diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-03-15 23:19:57 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-03-15 23:23:07 -0400 |
commit | 6341ac9638f96cd4b3c5dc2bf581bdf837b5e519 (patch) | |
tree | f28209cbcafc40f65cdd040cbe30c94222cfd10f | |
parent | 0a701a0dcf0b489b67439d3e61906ccf54b444c3 (diff) |
assume missing "enabled" key == enabled also.
(would signify supply converts in old maps)
-rw-r--r-- | technic/machines/supply_converter.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/technic/machines/supply_converter.lua b/technic/machines/supply_converter.lua index a94b9e2..0d32439 100644 --- a/technic/machines/supply_converter.lua +++ b/technic/machines/supply_converter.lua @@ -68,7 +68,7 @@ local run = function(pos, node, run_stage) -- Machine information local machine_name = S("Supply Converter") local meta = minetest.get_meta(pos) - local enabled = meta:get_int("enabled") ~= 0 and (meta:get_int("mesecon_mode") == 0 or meta:get_int("mesecon_effect") ~= 0) + local enabled = meta:get_string("enabled") ~= "0" and (meta:get_int("mesecon_mode") == 0 or meta:get_int("mesecon_effect") ~= 0) local demand = enabled and meta:get_int("power") or 0 local pos_up = {x=pos.x, y=pos.y+1, z=pos.z} |