Skip to content

Commit

Permalink
Use shorter string:match function
Browse files Browse the repository at this point in the history
Co-authored-by: SX <[email protected]>
  • Loading branch information
Emojigit and S-S-X authored Sep 18, 2024
1 parent 44a5726 commit 0499006
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion technic_cnc/pipeworks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0499006

Please sign in to comment.