「Module:沙盒/盐棋/Sandbox」:修訂間差異

增加 39 位元組 、​ 2024年2月18日 (星期日)
version support
(version support)
(version support)
行 10: 行 10:
local versions = {date = {}, name = {}}
local versions = {date = {}, name = {}}
local function verQuery(mDate)
local function verQuery(mDate)
local dDate = tonumber(lang:formatDate('Ynj', '@' .. mDate)) - 1
local dDate = tonumber(lang:formatDate('ymd', '@' .. mDate)) - 1
local dates = versions.date
local dates = versions.date
if dDate > dates[#dates] then return '?' end
local l, r = 1, #dates
local l, r = 1, #dates
while l < r do
while l < r do
行 57: 行 58:
table.insert(row, input '时长' or ' - ')
table.insert(row, input '时长' or ' - ')
if plat ~= 'ns' then
if plat ~= 'ns' then
local version = input '收录版本' or verQuery(song.date) or '?'
local version = input '收录版本' or verQuery(song.date)
table.insert(row, song.version .. '.' .. version)
table.insert(row, song.version .. '.' .. version)
end
end
2,525

次編輯