From 167ab93905a8206be2a5f4d9619c4b9f710bb211 Mon Sep 17 00:00:00 2001 From: SmallJoker <mk939@ymail.com> Date: Tue, 14 Jun 2022 20:49:21 +0200 Subject: [PATCH] Maintenance: Remove depends.txt and error on old MT versions --- technic/machines/HV/quarry.lua | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index 9cf378f..1bf1ad6 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -47,14 +47,19 @@ local radius = meta:get_int("size") local diameter = radius*2 + 1 local machine_name = S("%s Quarry"):format("HV") - if meta:get_int("enabled") == 0 or meta:get_int("purge_on") == 1 then - meta:set_string("infotext", S(meta:get_int("purge_on") == 1 and "%s purging cache" or "%s Disabled"):format(machine_name)) + local do_purge = meta:get_int("purge_on") == 1 + if meta:get_int("enabled") == 0 or do_purge then + local infotext = do_purge and + S("%s purging cache") or S("%s Disabled") + meta:set_string("infotext", infotext:format(machine_name)) meta:set_int("HV_EU_demand", 0) elseif meta:get_int("dug") == diameter*diameter * (quarry_dig_above_nodes+1+quarry_max_depth) then meta:set_string("infotext", S("%s Finished"):format(machine_name)) meta:set_int("HV_EU_demand", 0) else - meta:set_string("infotext", S(meta:get_int("HV_EU_input") >= quarry_demand and "%s Active" or "%s Unpowered"):format(machine_name)) + local infotext = meta:get_int("HV_EU_input") >= quarry_demand + and S("%s Active") or S("%s Unpowered") + meta:set_string("infotext", infotext:format(machine_name)) meta:set_int("HV_EU_demand", quarry_demand) end end -- Gitblit v1.8.0