Modulo:DTGenerico: differenze tra le versioni

Vai alla navigazione Vai alla ricerca
nessun oggetto della modifica
(Set CollectionTable if nil)
Nessun oggetto della modifica
Riga 7: Riga 7:
--local OperatorTree = require('Modulo:DTFunzioniComuni').OperatorTree
--local OperatorTree = require('Modulo:DTFunzioniComuni').OperatorTree
local PropertiesOnTree = require('Modulo:DTFunzioniComuni').PropertiesOnTree
local PropertiesOnTree = require('Modulo:DTFunzioniComuni').PropertiesOnTree
 
local ShipNameCore = require('Modulo:FunzioniGeneriche').ShipNameCore
local p = {}
local p = {}
function p.QFromP(Property)
function p.QFromP(Property)
Riga 86: Riga 87:
local Item = mw.wikibase.getEntity()
local Item = mw.wikibase.getEntity()
local ItemQ = mw.wikibase.getEntityIdForCurrentPage()
local ItemQ = mw.wikibase.getEntityIdForCurrentPage()
local InstanceQ
local IsEpisode = false
local IsEpisode = false
local OperatorName = ""
local OperatorName = ""
Riga 91: Riga 93:
local AstroD = nil
local AstroD = nil
local ListProp = {}
local ListProp = {}
local PageName
if not Item then
if not Item then
Riga 127: Riga 130:
mw.smw.set(ITLabel .. "=" .. ITValue)
mw.smw.set(ITLabel .. "=" .. ITValue)
end
end
PageName = ITValue
if (mw.wikibase.getLabelByLang(ItemQ, 'it')) ~= PageTitle.text then
if (mw.wikibase.getLabelByLang(ItemQ, 'it')) ~= PageTitle.text then
AllRows[#AllRows + 1] = {ITLabel .. ":", {ITValue}}
AllRows[#AllRows + 1] = {ITLabel .. ":", {ITValue}}
Riga 185: Riga 189:
end
end
end
end
end
InstanceQ = Item.claims[Property][1].mainsnak.datavalue.value.id
if InstanceQ == "Q876" or InstanceQ == "Q78" then
--Spaceship or starship
mw.smw.set("Nome=" .. ShipNameCore(PageName))
end
end

Menu di navigazione