Module:GameData: Difference between revisions

Jump to navigation Jump to search
get_entities now matches props as values too, enabling Scale.Type-based filtering (with help from vergir-bot LLM)
Vergir (talk | contribs)
record_matches_prop: unwrap table-valued properties before zero-check to fix false positives where Value = 0 (with help from vergir-bot LLM)
Line 33: Line 33:
         -- Key match: property name exists with a meaningful value
         -- Key match: property name exists with a meaningful value
         if k == prop then
         if k == prop then
            if type(v) == "table" then v = v["Value"] end
             if v ~= nil and v ~= 0 and v ~= "" and v ~= "0" and v ~= "0m" then
             if v ~= nil and v ~= 0 and v ~= "" and v ~= "0" and v ~= "0m" then
                 return true
                 return true