全站通知:
模块:Expanded/NPC
刷
历
编
跳到导航
跳到搜索
local Vanilla = require("Module:NPC")
local p = {}
local characters = {
{"兰斯", "Lance"},
{"马格努斯", "Magnus"},
{"马丁", "Martin"},
{"摩根", "Morgan"},
{"奥利维亚", "Olivia"},
{"安迪", "Andy"},
{"斯嘉丽", "Scarlett"},
{"索菲娅", "Sophia"},
{"苏珊", "Susan"},
{"维克多", "Victor"},
{"克莱尔", "Claire"},
{"苹果", "Apples"}
}
local zh_to_en = {}
local en_to_zh = {}
for _, pair in ipairs(characters) do
zh_to_en[pair[1]] = pair[2]
en_to_zh[pair[2]] = pair[1]
end
local function getArg(input)
if type(input) == "string" then
return input
end
return input.args[1] or input:getParent().args[1]
end
function p.getEnglishName(input)
local name = getArg(input)
return zh_to_en[name] or Vanilla.getEnglishName(name) or name
end
function p.getChineseName(input)
local name = getArg(input)
return en_to_zh[name] or Vanilla.getChineseName(name) or name
end
return p