67 271
contributi
mNessun oggetto della modifica |
mNessun oggetto della modifica |
||
Riga 221: | Riga 221: | ||
InstanceQ = Item.claims[Property][1].mainsnak.datavalue.value.id | InstanceQ = Item.claims[Property][1].mainsnak.datavalue.value.id | ||
RootInstance = PropertiesOnTree("P14", 3, true, false, true) | |||
if # | if #RootInstance > 1 then | ||
--Second to last resul, because last one should always be a Class, the topmost Instance possible | --Second to last resul, because last one should always be a Class, the topmost Instance possible | ||
mw.smw.set(" | mw.smw.set("Istanza radice=" .. RootInstance[#RootInstance - 1]) | ||
else | else | ||
--Should be a Class | --Should be a Class | ||
mw.smw.set(" | mw.smw.set("Istanza radice=" .. RootInstance[1]) | ||
end | end | ||
if InstanceQ == "Q876" or InstanceQ == "Q78" or InstanceQ == "Q890" then | if RootInstance == "Astronave" or RootInstance == "Spaceship" then | ||
--if InstanceQ == "Q876" or InstanceQ == "Q78" or InstanceQ == "Q890" then | |||
--Spaceship or starship | --Spaceship or starship | ||
mw.smw.set("Nome=" .. ShipNameCore(PageName)) | mw.smw.set("Nome=" .. ShipNameCore(PageName)) |