From 39098dc27c70e2bc65e0a802c3473452f8023926 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 3 Dec 2023 15:56:09 +0200 Subject: [PATCH] Add skills to users in seeding script --- app/db/seed/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/db/seed/index.ts b/app/db/seed/index.ts index 5fbcfeb80..3f3ec98e8 100644 --- a/app/db/seed/index.ts +++ b/app/db/seed/index.ts @@ -1751,17 +1751,21 @@ const randomMapList = ( const MATCHES_COUNT = 500; +const AMOUNT_OF_USERS_WITH_SKILLS = 100; + async function playedMatches() { const _groupMembers = (() => { - return new Array(50).fill(null).map(() => { - const users = shuffle(userIdsInAscendingOrderById().slice(0, 50)); + return new Array(AMOUNT_OF_USERS_WITH_SKILLS).fill(null).map(() => { + const users = shuffle( + userIdsInAscendingOrderById().slice(0, AMOUNT_OF_USERS_WITH_SKILLS), + ); return new Array(4).fill(null).map(() => users.pop()!); }); })(); const defaultWeapons = Object.fromEntries( userIdsInAscendingOrderById() - .slice(0, 50) + .slice(0, AMOUNT_OF_USERS_WITH_SKILLS) .map((id) => { const weapons = shuffle([...mainWeaponIds]); return [id, weapons[0]];