From 0499006ebadcae229aa299dcd9e8e3daf9f891b0 Mon Sep 17 00:00:00 2001 From: 1F616EMO~nya Date: Wed, 18 Sep 2024 18:39:22 +0800 Subject: [PATCH] Use shorter string:match function Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> --- technic_cnc/pipeworks.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/technic_cnc/pipeworks.lua b/technic_cnc/pipeworks.lua index 2fd4931e..18ba0e2e 100644 --- a/technic_cnc/pipeworks.lua +++ b/technic_cnc/pipeworks.lua @@ -42,7 +42,7 @@ end local function on_receive_fields(pos, meta, fields, sender, update_formspec) -- https://github.com/mt-mods/pipeworks/-/blob/master/common.lua#L115 for field,_ in pairs(fields) do - if string.sub(field, 1, 19) == "fs_helpers_cycling:" then + if field:match("^fs_helpers_cycling:") then if pipeworks.may_configure(pos, sender) then pipeworks_on_receive_fields(pos, fields) update_formspec(meta)