Module:ShipInfobox: Difference between revisions

Content deleted Content added
m Fixed tostring to tonumber
mNo edit summary
Line 146:
function Infobox.MaxCargo ( field, vars )
local output = {}
if HF.isempty(field.ValueCargo) then
outputif = outputnot HF.. (tonumberisempty(field.S1) *then 2)
output = output .. (tonumber(field.S2S1) * 42)
end
output = output .. (tonumber(field.S3) * 8)▼
outputif = outputnot HF.. (tonumberisempty(field.S4S2) *then 16)
output = output .. (tonumber(field.S5S2) * 324)
end
output = output .. (tonumber(field.S6) * 64)▼
outputif = outputnot HF.. (tonumberisempty(field.S7S3) *then 128)
output = output .. (tonumber(field.S8S3) * 2568)
end
if not HF.isempty(field.S4) then
▲ output = output .. (tonumber(field.S3S4) * 816)
end
if not HF.isempty(field.S5) then
output = output .. (tonumber(field.S5) * 32)
end
if not HF.isempty(field.S6) then
▲ output = output .. (tonumber(field.S6) * 64)
end
if not HF.isempty(field.S7) then
output = output .. (tonumber(field.S7) * 128)
end
if not HF.isempty(field.S8) then
output = output .. (tonumber(field.S8) * 256)
end
return output
else
output = field.ValueCargo
end
field.Value = output