From 1a4c84459feee40a5ec20521480a52905292d501 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Fri, 28 Mar 2025 13:02:09 +0100 Subject: [PATCH] Cook containable --- cookother.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/cookother.yml b/cookother.yml index cd7dd341..3f9205dd 100644 --- a/cookother.yml +++ b/cookother.yml @@ -9,6 +9,29 @@ end files: - '**/*.xml' + +- name: containerscontainable + regex: Containable!anyitems="([^"]+)" + lua: | + local gurantee = {"smallitem", "mediumitem", "largeitem"} + local has = {} + + local items = strsplit(s1, ",") + for i, item in pairs(items) do + for _, g in pairs(gurantee) do + if string.find(item, g) then + has[g] = true + end + end + end + + for _, g in pairs(gurantee) do + if not has[g] then + s1 = s1 .. "," .. g + end + end + files: + - '**/*.xml' - name: excludeditems regex: