mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Fixed botgen failing
This commit is contained in:
parent
672b1f1dd5
commit
9ab0b40854
@ -177,7 +177,7 @@ export class BotHelper {
|
|||||||
*/
|
*/
|
||||||
public getPmcNicknameOfMaxLength(maxLength: number, side?: string): string {
|
public getPmcNicknameOfMaxLength(maxLength: number, side?: string): string {
|
||||||
const randomType = side ? side : this.randomUtil.getInt(0, 1) === 0 ? "usec" : "bear";
|
const randomType = side ? side : this.randomUtil.getInt(0, 1) === 0 ? "usec" : "bear";
|
||||||
const allNames = this.databaseService.getBots().types[randomType].firstName;
|
const allNames = this.databaseService.getBots().types[randomType.toLowerCase()].firstName;
|
||||||
const filteredNames = allNames.filter((name) => name.length <= maxLength);
|
const filteredNames = allNames.filter((name) => name.length <= maxLength);
|
||||||
if (filteredNames.length === 0) {
|
if (filteredNames.length === 0) {
|
||||||
this.logger.warning(
|
this.logger.warning(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user