2022-09-04 21:03:23 +00:00
|
|
|
import lodash from 'lodash'
|
2023-03-07 17:52:11 +00:00
|
|
|
import { Data } from '#miao'
|
2022-09-04 21:03:23 +00:00
|
|
|
|
|
|
|
const talentMeta = {
|
2022-10-07 13:13:46 +00:00
|
|
|
自由: { week: 1, city: '蒙德', cid: 1 },
|
|
|
|
繁荣: { week: 1, city: '璃月', cid: 2 },
|
|
|
|
浮世: { week: 1, city: '稻妻', cid: 3 },
|
|
|
|
诤言: { week: 1, city: '须弥', cid: 4 },
|
2023-07-10 20:00:35 +00:00
|
|
|
公平: { week: 1, city: '枫丹', cid: 5 },
|
2022-09-04 21:03:23 +00:00
|
|
|
|
2022-10-07 13:13:46 +00:00
|
|
|
抗争: { week: 2, city: '蒙德', cid: 1 },
|
|
|
|
勤劳: { week: 2, city: '璃月', cid: 2 },
|
|
|
|
风雅: { week: 2, city: '稻妻', cid: 3 },
|
|
|
|
巧思: { week: 2, city: '须弥', cid: 4 },
|
2023-07-10 20:00:35 +00:00
|
|
|
正义: { week: 2, city: '枫丹', cid: 5 },
|
2022-09-04 21:03:23 +00:00
|
|
|
|
2022-10-07 13:13:46 +00:00
|
|
|
诗文: { week: 3, city: '蒙德', cid: 1 },
|
|
|
|
黄金: { week: 3, city: '璃月', cid: 2 },
|
|
|
|
天光: { week: 3, city: '稻妻', cid: 3 },
|
2023-07-10 20:00:35 +00:00
|
|
|
笃行: { week: 3, city: '须弥', cid: 4 },
|
|
|
|
秩序: { week: 3, city: '枫丹', cid: 5 }
|
2022-09-04 21:03:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const talentReg = new RegExp(`(${lodash.keys(talentMeta).join('|')})`)
|
|
|
|
|
|
|
|
let MaterialMeta = {
|
|
|
|
getTalentData (talent) {
|
|
|
|
talent = MaterialMeta.getTalentKey(talent)
|
|
|
|
return talentMeta[talent]
|
|
|
|
},
|
|
|
|
getTalentKey (name) {
|
|
|
|
return Data.regRet(talentReg, name, 1) || name
|
|
|
|
},
|
|
|
|
getTalentLabel (t) {
|
|
|
|
let key = MaterialMeta.getTalentKey(t)
|
|
|
|
let tm = MaterialMeta.getTalentData(key)
|
|
|
|
if (!tm) {
|
|
|
|
return t
|
|
|
|
}
|
|
|
|
return `${tm.city}·${key}`
|
|
|
|
},
|
|
|
|
getTalentWeek (t) {
|
|
|
|
let tm = MaterialMeta.getTalentData(t)
|
|
|
|
switch (tm.week) {
|
|
|
|
case 1:
|
|
|
|
return '周一/周四'
|
|
|
|
case 2:
|
|
|
|
return '周二/周五'
|
|
|
|
case 3:
|
|
|
|
return '周三/周六'
|
|
|
|
}
|
|
|
|
return ''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export default MaterialMeta
|