🌟現在、鉄壁 鉄壁ヘッドショットには対応済みです。
鉄壁HSは通常HSと同じダメージになります。LMG及びDMR、チャージライフル、ハンマーポイント弾を除き、すべてのダメージ値が一致していることを確認しています。

「モジュール:TableExtensions」の版間の差分

提供:Apex Data
ナビゲーションに移動 検索に移動
(ページの作成:「function table.isEmpty(tbl) return not next(tbl) end function table.keys(tbl) local keyset = {} for key, _ in pairs(tbl) do keyset[#keyset + 1] = key end return k…」)
(相違点なし)

2021年8月20日 (金) 11:38時点における版

このモジュールについての説明文ページを モジュール:TableExtensions/doc に作成できます

function table.isEmpty(tbl)
	return not next(tbl)
end

function table.keys(tbl)
	local keyset = {}
	for key, _ in pairs(tbl) do
		keyset[#keyset + 1] = key
	end
	return keyset
end

function table.values(tbl)
	local valueset = {}
	for index, value in ipairs(tbl) do
		valueset[index] = value
	end
	return valueset
end

function table.entries(tbl)
	local entryset = {}
	for key, value in pairs(tbl) do
		entryset[#entryset + 1] = { key, value }
	end
	return entryset
end

function table.map(tbl, fn)
	local ret = {}
	for key, value in pairs(tbl) do
		ret[key] = fn(key, value)
	end
	return ret
end

function table.filter(tbl, fn)
	local ret = {}
	for key, value in pairs(tbl) do
		if fn(key, value) then
			ret[key] = value
		end
	end
	return ret
end

function table.removeKey(tbl, key)
	local element = tbl[key]
	tbl[key] = nil
	return element
end

return table