第81行: |
第81行: |
| out = out .. "[[Category:联动设定]]" | | out = out .. "[[Category:联动设定]]" |
| else -- 公共设定 | | else -- 公共设定 |
− | out = out .. (renderLiteInfoBox(frame, "SharedItem.svg", "公共设定页1")) | + | out = out .. (renderLiteInfoBox(frame, "SharedItem.svg", "公共设定页")) |
| mw.smw.set({['设定类型'] = "公共设定"}) | | mw.smw.set({['设定类型'] = "公共设定"}) |
| out = out .. "[[Category:公共设定]]" | | out = out .. "[[Category:公共设定]]" |
第87行: |
第87行: |
| else -- base must exist | | else -- base must exist |
| local parent = getParentProps(base, {"设定集", "设定类型"}) | | local parent = getParentProps(base, {"设定集", "设定类型"}) |
− | if parent["设定集"] then | + | local parentGroup = parent["设定集"][1] |
− | mw.smw.set({['设定集'] = parent["设定集"]}) | + | if parentGroup then |
| + | mw.smw.set({['设定集'] = parentGroup}) |
| end | | end |
− | local parentType = parent["设定类型"] or "公共设定" | + | local parentType = parent["设定类型"][1] or "公共设定" |
| mw.smw.set({['设定类型'] = parentType}) | | mw.smw.set({['设定类型'] = parentType}) |
| if parentType == "世界观设定" then | | if parentType == "世界观设定" then |
第106行: |
第107行: |
| return out | | return out |
| end | | end |
| + | |
| + | -- function p.test() |
| + | -- mw.logObject(getParentProps("测试设定", {"设定集", "设定类型"})) |
| + | -- end |
| | | |
| function p.renderCreator(frame) | | function p.renderCreator(frame) |