diff --git a/src/ts/components/shared/chat-box/chat-box.ts b/src/ts/components/shared/chat-box/chat-box.ts index 30f9217..32748a9 100644 --- a/src/ts/components/shared/chat-box/chat-box.ts +++ b/src/ts/components/shared/chat-box/chat-box.ts @@ -13,7 +13,7 @@ import { AutocompleteState, autocompleteMesssage, replaceEmojis, emojis } from ' import { replaceNodes } from '../../../client/htmlUtils'; import { invalidEnumReturn } from '../../../common/utils'; import { findMatchingEntityNames, findEntityOrMockByAnyMeans, findBestEntityByName } from '../../../client/handlers'; -import * as _ from 'lodash'; +import { sample } from 'lodash'; const chatTypeNames: string[] = []; const chatTypeClasses: string[] = []; @@ -295,7 +295,7 @@ export class ChatBox implements AfterViewInit, OnDestroy { } onMouseEnterEmojiButton(event: MouseEvent) { if (!event.target) return; - const emoji = _.sample(emojis)!; + const emoji = sample(emojis)!; this.btnEmoji = emoji.names[0]; } toggleChatType() { diff --git a/src/ts/components/shared/chat-log/chat-log.ts b/src/ts/components/shared/chat-log/chat-log.ts index 151f216..40d8ef4 100644 --- a/src/ts/components/shared/chat-log/chat-log.ts +++ b/src/ts/components/shared/chat-log/chat-log.ts @@ -530,12 +530,6 @@ export class ChatLog implements AfterViewInit, OnDestroy, DoCheck { } return hsl; } - fixColor(color: string) { - while (color.length <= 7) { - color = `0${color}`; - } - return color.substr(0, 6); - } private getCharacterColors(id: number | undefined) { if (!id) return; const entity = findEntityById(this.game.map, id) as Pony;