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"],
|
"trigger": ["Aniloviraw"],
|
||||||
"switch": [
|
"switch": [
|
||||||
["Anilovr", "Aniloviraw"]
|
["Anilovr", "Aniloviraw"]
|
||||||
]
|
],
|
||||||
|
"skipAges": ["cheonwoomaeng"]
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ const notShowOnHomeList = hdata.notShowOnHome;
|
|||||||
const actualHide = hdata.actualHide;
|
const actualHide = hdata.actualHide;
|
||||||
const trigger = hdata.trigger;
|
const trigger = hdata.trigger;
|
||||||
const switchPair = hdata.switch;
|
const switchPair = hdata.switch;
|
||||||
|
const skipAges = hdata.skipAges;
|
||||||
|
|
||||||
async function buildBlurCode() {
|
async function buildBlurCode() {
|
||||||
const blurCode = {};
|
const blurCode = {};
|
||||||
@ -92,7 +93,7 @@ function buildPeopleInfoAndList() {
|
|||||||
const sortKey = info.info?.died ?? mdMeta.info?.died ?? '0'
|
const sortKey = info.info?.died ?? mdMeta.info?.died ?? '0'
|
||||||
|
|
||||||
// Add age
|
// 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)) }
|
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}`) }
|
catch (e) { console.log(`Unable to calculate age for ${dirname}`) }
|
||||||
|
@ -5,6 +5,7 @@ export interface HData {
|
|||||||
actualHide: string[];
|
actualHide: string[];
|
||||||
trigger: string[];
|
trigger: string[];
|
||||||
switch: [string, string][];
|
switch: [string, string][];
|
||||||
|
skipAges: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PeopleMeta {
|
export interface PeopleMeta {
|
||||||
|
Loading…
Reference in New Issue
Block a user