mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 13:55:04 +02:00
removed unused code and improved imports
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user