Module:LuaTemplateBlueprint: Difference between revisions

// via Wikitext Extension for VSCode
// via Wikitext Extension for VSCode
Line 1,069: Line 1,069:
     -- Add deduplicated additional properties (these have actual values)
     -- Add deduplicated additional properties (these have actual values)
     for property, value in pairs(collector.properties) do
     for property, value in pairs(collector.properties) do
         finalProperties[property] = value
         finalProperties[property] = value -- This might be an array of values or a single value
    end
 
    -- Process fixed properties
    if semanticConfig.fixedProperties and type(semanticConfig.fixedProperties) == 'table' then
        for propName, propValue in pairs(semanticConfig.fixedProperties) do
            if not skipProperties[propName] then -- Check skipProperties as well
                local validatedValue = validatePropertyValue(propValue)
                if validatedValue and validatedValue ~= '' then
                    -- Assign directly; "Has entity type" is single-value.
                    -- If a property could be set by both dynamic and fixed means,
                    -- this would overwrite dynamic with fixed if keys collide.
                    -- For "Has entity type", collision is not expected.
                    finalProperties[propName] = validatedValue
                end
            end
        end
     end
     end