- 致编者:请牢记我们的域名wiki.mcbe-dev.net!
- 致编者:欢迎加入本Wiki的官方交流QQ群或Discord服务器!
- 基岩版1.19.31现已发布!(了解更多)
- Inner Core现已支持Xbox模组联机!(了解更多)
- 如果您是第一次来到本Wiki,欢迎注册一个账户
- 点击顶部的“编辑”或“编辑源代码”按钮即可编辑当前页面
- 请知悉:在不登录时也可以编辑和新建页面,但是您当前的IP地址会记录在编辑历史中
Module:Deprecation
来自Minecraft基岩版开发Wiki
local p = {}
local I18N = {
Component = '组件',
Function = '函数',
Method = '方法',
Class = '类',
Field = '字段'
}
local OBJECT = {
class = 'Class',
field = 'Field',
component = 'Component',
method = 'Method',
func = 'Function',
['function'] = 'Function'
}
function p.ambox(_)
local args = require('Module:ProcessArgs').merge(true)
local object = args.object
object = OBJECT[object] or object
local version = args.version
local note = args.note or ''
local issue = "'''"
local fix = ''
if (object) then
issue = issue .. '该' .. (I18N[object] or object)
else
issue = issue .. '此处介绍的内容'
end
if (version) then
issue = issue .. '已于' .. version .. '被弃用。'
else
issue = issue .. '已被弃用。'
end
issue = issue .. "'''<br>"
local substitute = args.substitute
if (substitute) then
fix = '请使用' .. substitute .. '替代。'
end
fix = fix .. note
return require('Module:Message box').ambox({
name = 'Deprecated ' .. object,
type = 'speedy',
issue = issue,
fix = fix
})
end
return p