Редактирование: Модуль:Infobox Plant
Материал из Eco - Русская Wiki
Правка может быть отменена. Пожалуйста, просмотрите сравнение версий ниже, чтобы убедиться, что это нужная вам правка, и запишите страницу ниже, чтобы отменить правку.
Текущая версия | Ваш текст | ||
Строка 30: | Строка 30: | ||
if args.plant ~= nil then | if args.plant ~= nil then | ||
species = args.plant | species = args.plant | ||
check = ' | check = 'plant' | ||
elseif args.tree ~= nil then | elseif args.tree ~= nil then | ||
species = args.tree | species = args.tree | ||
Строка 74: | Строка 74: | ||
infobox = infobox .. '|- style=\"text-align: center; color: white; background-color: ' | infobox = infobox .. '|- style=\"text-align: center; color: white; background-color: ' | ||
if check == 'plant' then | if check == 'plant' then | ||
infobox = infobox .. 'seagreen;\"\n| colspan=\"2\" | \'\'\' | infobox = infobox .. 'seagreen;\"\n| colspan=\"2\" | \'\'\'Plant\'\'\'[[Category:Plants]]\n' | ||
else | else | ||
infobox = infobox .. 'olivedrab;\"\n| colspan=\"2\" | \'\'\' | infobox = infobox .. 'olivedrab;\"\n| colspan=\"2\" | \'\'\'Tree\'\'\'[[Category:Trees]]\n' | ||
end | end | ||
Строка 179: | Строка 179: | ||
if speciesTable.idealTempMin ~= nil then | if speciesTable.idealTempMin ~= nil then | ||
speciesTable.idealTempMin = speciesTable.idealTempMin*40 | speciesTable.idealTempMin = speciesTable.idealTempMin*40 | ||
infobox = infobox .. '|- valign=\"center\"\n| Ideal Temperature Range:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.idealTempMin .. ' - ' .. speciesTable.idealTempMax .. ' Celsius \n' | infobox = infobox .. '|- valign=\"center\"\n| Ideal Temperature Range:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.idealTempMin .. ' - ' .. speciesTable.idealTempMax .. ' Celsius \n' | ||
end | end | ||
Строка 185: | Строка 184: | ||
-- Ideal Moisture | -- Ideal Moisture | ||
if speciesTable.idealMoistureMin ~= nil then | if speciesTable.idealMoistureMin ~= nil then | ||
infobox = infobox .. '|- valign=\"center\"\n| Ideal Moisture Range:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.idealMoistureMin .. ' - ' .. speciesTable.idealMoistureMax .. '\n' | infobox = infobox .. '|- valign=\"center\"\n| Ideal Moisture Range:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.idealMoistureMin .. ' - ' .. speciesTable.idealMoistureMax .. '\n' | ||
end | end |