Modulo:DTGenerico: differenze tra le versioni
Vai alla navigazione
Vai alla ricerca
m (Test) |
m (Test) |
||
Riga 198: | Riga 198: | ||
--OperatorName = string.gsub("[[Flotta Stellare|Flotta Stellare]]", "|.+]]", ""):gsub("%[%[", "") .. " - " | --OperatorName = string.gsub("[[Flotta Stellare|Flotta Stellare]]", "|.+]]", ""):gsub("%[%[", "") .. " - " | ||
OperatorName = string.gsub(PropValue, "|.+]]", ""):gsub("%[%[", "") .. " - " | OperatorName = string.gsub(PropValue, "|.+]]", ""):gsub("%[%[", "") .. " - " | ||
mw.smw.set(" | mw.smw.set("OperatorName1=" .. OperatorName) | ||
end | end | ||
if AddSemantic then | if AddSemantic then | ||
Riga 213: | Riga 213: | ||
mw.smw.set("Operatore=" .. OperatorTree(frame)) | mw.smw.set("Operatore=" .. OperatorTree(frame)) | ||
end]==] | end]==] | ||
mw.smw.set("OperatorName2=" .. OperatorName) | |||
else | else | ||
-- Unspecified Property | -- Unspecified Property | ||
Riga 218: | Riga 219: | ||
local Values = Item['claims'][Property] | local Values = Item['claims'][Property] | ||
local AccValues = {} | local AccValues = {} | ||
mw.smw.set("OperatorName3=" .. OperatorName) | |||
for _, SnakValue in pairs(Values) do | for _, SnakValue in pairs(Values) do | ||
local Value = SnakValue.mainsnak.datavalue['value'] | local Value = SnakValue.mainsnak.datavalue['value'] | ||
mw.smw.set("OperatorName4=" .. OperatorName) | |||
if (type(Value) == "table") then | if (type(Value) == "table") then | ||
if Property == "P72" then --CASE Assigments | if Property == "P72" then --CASE Assigments | ||
Riga 260: | Riga 263: | ||
AccValues[#AccValues + 1] = Assignment | AccValues[#AccValues + 1] = Assignment | ||
elseif Value['entity-type'] == 'item' then | elseif Value['entity-type'] == 'item' then | ||
mw.smw.set("OperatorName5=" .. OperatorName) | |||
-- Process a generic Item | -- Process a generic Item | ||
local GenericItem | local GenericItem |