模块:NPC:修订间差异
来自星露谷物语扩展百科
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第54行: | 第54行: | ||
{"老水手", "Mariner"}, | {"老水手", "Mariner"}, | ||
{"爷爷", "Grandpa"} | {"爷爷", "Grandpa"} | ||
} | |||
local expanded_characters = { | |||
{"兰斯", "Lance"}, | |||
{"马格努斯", "Magnus"}, | |||
{"马丁", "Martin"}, | |||
{"摩根", "Morgan"}, | |||
{"奥利维亚", "Olivia"}, | |||
{"安迪", "Andy"}, | |||
{"斯嘉丽", "Scarlett"}, | |||
{"索菲娅", "Sophia"}, | |||
{"苏珊", "Susan"}, | |||
{"维克多", "Victor"}, | |||
{"克莱尔", "Claire"}, | |||
{"苹果", "Apples"} | |||
} | } | ||
| 第59行: | 第74行: | ||
local en_to_zh = {} | local en_to_zh = {} | ||
for _, pair in ipairs( | local function populate_lookup(list) | ||
for _, pair in ipairs(list) do | |||
zh_to_en[pair[1]] = pair[2] | |||
en_to_zh[pair[2]] = pair[1] | |||
end | |||
end | end | ||
populate_lookup(characters) | |||
populate_lookup(expanded_characters) | |||
function p.getEnglishName(input) | function p.getEnglishName(input) | ||
| 第76行: | 第96行: | ||
p.ZH = zh_to_en | p.ZH = zh_to_en | ||
p.EN = en_to_zh | p.EN = en_to_zh | ||
p.characters = characters | |||
p.expanded_characters = expanded_characters | |||
return p | return p | ||
2025年12月21日 (日) 21:37的版本
local utils = require("Module:Utils")
local p = {}
local characters = {
{"亚历克斯", "Alex"},
{"艾利欧特", "Elliott"},
{"哈维", "Harvey"},
{"山姆", "Sam"},
{"塞巴斯蒂安", "Sebastian"},
{"谢恩", "Shane"},
{"阿比盖尔", "Abigail"},
{"艾米丽", "Emily"},
{"海莉", "Haley"},
{"莉亚", "Leah"},
{"玛鲁", "Maru"},
{"潘妮", "Penny"},
{"卡洛琳", "Caroline"},
{"克林特", "Clint"},
{"德米特里厄斯", "Demetrius"},
{"矮人", "Dwarf"},
{"艾芙琳", "Evelyn"},
{"乔治", "George"},
{"格斯", "Gus"},
{"贾斯", "Jas"},
{"乔迪", "Jodi"},
{"肯特", "Kent"},
{"科罗布斯", "Krobus"},
{"刘易斯", "Lewis"},
{"莱纳斯", "Linus"},
{"玛妮", "Marnie"},
{"潘姆", "Pam"},
{"皮埃尔", "Pierre"},
{"罗宾", "Robin"},
{"桑迪", "Sandy"},
{"文森特", "Vincent"},
{"威利", "Willy"},
{"法师", "Wizard"},
{"吉尔", "Gil"},
{"冈瑟", "Gunther"},
{"仆从", "Henchman"},
{"马龙", "Marlon"},
{"莫里斯", "Morris"},
{"齐先生", "Mr. Qi"},
{"雷欧", "Leo"},
{"贝啼", "Birdie"},
{"蜗牛教授", "Professor Snail"},
{"姜岛商人", "Island Trader"},
{"沙漠商人", "Desert Trader"},
{"女巫", "Witch"},
{"州长", "Governor"},
{"门卫", "Bouncer"},
{"菲兹", "Fizz"},
{"老水手", "Mariner"},
{"爷爷", "Grandpa"}
}
local expanded_characters = {
{"兰斯", "Lance"},
{"马格努斯", "Magnus"},
{"马丁", "Martin"},
{"摩根", "Morgan"},
{"奥利维亚", "Olivia"},
{"安迪", "Andy"},
{"斯嘉丽", "Scarlett"},
{"索菲娅", "Sophia"},
{"苏珊", "Susan"},
{"维克多", "Victor"},
{"克莱尔", "Claire"},
{"苹果", "Apples"}
}
local zh_to_en = {}
local en_to_zh = {}
local function populate_lookup(list)
for _, pair in ipairs(list) do
zh_to_en[pair[1]] = pair[2]
en_to_zh[pair[2]] = pair[1]
end
end
populate_lookup(characters)
populate_lookup(expanded_characters)
function p.getEnglishName(input)
local name = utils.getArg(input)
return zh_to_en[name] or name
end
function p.getChineseName(input)
local name = utils.getArg(input)
return en_to_zh[name] or name
end
p.ZH = zh_to_en
p.EN = en_to_zh
p.characters = characters
p.expanded_characters = expanded_characters
return p