mirror of
https://github.com/one-among-us/data.git
synced 2025-02-22 22:28:45 +08:00
[+] Add switcher to skip age-calc
This commit is contained in:
parent
9b5d17d2ee
commit
7742a6f066
@ -6,5 +6,6 @@
|
||||
"trigger": ["Aniloviraw"],
|
||||
"switch": [
|
||||
["Anilovr", "Aniloviraw"]
|
||||
]
|
||||
],
|
||||
"skipAges": ["cheonwoomaeng"]
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ const notShowOnHomeList = hdata.notShowOnHome;
|
||||
const actualHide = hdata.actualHide;
|
||||
const trigger = hdata.trigger;
|
||||
const switchPair = hdata.switch;
|
||||
const skipAges = hdata.skipAges;
|
||||
|
||||
async function buildBlurCode() {
|
||||
const blurCode = {};
|
||||
@ -92,7 +93,7 @@ function buildPeopleInfoAndList() {
|
||||
const sortKey = info.info?.died ?? mdMeta.info?.died ?? '0'
|
||||
|
||||
// Add age
|
||||
if (info.info && info.info.died && info.info.born)
|
||||
if (info.info && info.info.died && info.info.born && (!skipAges.includes(dirname)))
|
||||
{
|
||||
try { info.info.age = Math.abs(moment(info.info.died).diff(info.info.born, 'years', false)) }
|
||||
catch (e) { console.log(`Unable to calculate age for ${dirname}`) }
|
||||
|
@ -5,6 +5,7 @@ export interface HData {
|
||||
actualHide: string[];
|
||||
trigger: string[];
|
||||
switch: [string, string][];
|
||||
skipAges: string[];
|
||||
}
|
||||
|
||||
export interface PeopleMeta {
|
||||
|
Loading…
Reference in New Issue
Block a user