Content deleted Content added
work with refactored Module:Weather box |
restore version at 03:00, 1 June 2023 to remove temporary tests |
||
(10 intermediate revisions by 4 users not shown) | |||
Line 125:
local result = {'|- style="text-align: center;"\n! scope="row" style="height: 16px;" | ', label, "\n"}
for i = 1, 13 do
table.insert(result,
' class="notheme"| '
)
local display = first_values[i]:getDisplay()
if display then
Line 246 ⟶ 245:
if F_values[i]:isValid() then
p = F_values[i]:getPrecision()
C_values[i]:setNumberRounded(
end
elseif F_values[i].string == '' then
if C_values[i]:isValid() then
p = C_values[i]:getPrecision()
F_values[i]:setNumberRounded(
end
end
Line 299 ⟶ 298:
local function _buildRow(definition, args, options)
options = options or {}
local wbc = require('Module:Weather box/colors' .. (options.sandbox or ''))
local mode = (definition.mode or 'basic'):lower()
Line 305:
local color_values
local color_scheme = definition.color_scheme or 't'
local scale_factor = math_mod._cleanNumber(
local date_mode = checkFlag(
local label = definition.label or ''
local annual_mode = (definition.annual_mode or 'avg'):lower()
local include_space = checkFlag(
local second_line = checkFlag(
local prefer_cm = checkFlag(
local imperial_first = checkFlag(
local metric_first = checkFlag(
local wantSingleLine = options.wantSingleLine or checkFlag(
local trace = args.trace
if trace and trace ~= '' then
|