Модуль:Prototypes/Хранилище/Предмет: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 179: | Строка 179: | ||
local wrapperStart, wrapperEnd = "", "" | local wrapperStart, wrapperEnd = "", "" | ||
if groupSelector.weight and groupSelector.weight ~= "default" then | if groupSelector.weight and groupSelector.weight ~= "default" then | ||
wrapperStart = string.format('{{LinkCard/Сollapsible|название=Группа предметов %s%%| | wrapperStart = string.format('{{LinkCard/Сollapsible|название=Группа предметов %s%%|содержание=', groupSelector.weight) | ||
wrapperEnd = "}}" | wrapperEnd = "}}" | ||
elseif groupSelector["!type"] == "GroupSelector" and not groupSelector.weight then | elseif groupSelector["!type"] == "GroupSelector" and not groupSelector.weight then | ||
wrapperStart = '{{LinkCard/Сollapsible|название=Может выпасть лишь один из:| | wrapperStart = '{{LinkCard/Сollapsible|название=Может выпасть лишь один из:|содержание=' | ||
wrapperEnd = "}}" | wrapperEnd = "}}" | ||
end | end | ||
| Строка 190: | Строка 190: | ||
result[#result + 1] = handleGroupSelector(child, visited) | result[#result + 1] = handleGroupSelector(child, visited) | ||
elseif child["!type"] == "AllSelector" then | elseif child["!type"] == "AllSelector" then | ||
result[#result + 1] = string.format('{{LinkCard/Сollapsible|название=Выпадают только вместе:| | result[#result + 1] = string.format('{{LinkCard/Сollapsible|название=Выпадают только вместе:|содержание=%s}}', handleAllSelector(child)) | ||
elseif child.id then | elseif child.id then | ||
result[#result + 1] = formatContent(child) | result[#result + 1] = formatContent(child) | ||
| Строка 222: | Строка 222: | ||
if wrapped and (classesRolls ~= "" or classesProb ~= "") then | if wrapped and (classesRolls ~= "" or classesProb ~= "") then | ||
result[#result + 1] = string.format('{{LinkCard/Сollapsible|название=Группа предметов%s%s| | result[#result + 1] = string.format('{{LinkCard/Сollapsible|название=Группа предметов%s%s|содержание=', classesRolls, classesProb) | ||
end | end | ||