mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 13:55:04 +02:00
Merge branch 'improved-chatlog' of github.com:Stubenhocker1399/pixel.horse into improved-chatlog
This commit is contained in:
@@ -13,7 +13,7 @@ import { AutocompleteState, autocompleteMesssage, replaceEmojis, emojis } from '
|
|||||||
import { replaceNodes } from '../../../client/htmlUtils';
|
import { replaceNodes } from '../../../client/htmlUtils';
|
||||||
import { invalidEnumReturn } from '../../../common/utils';
|
import { invalidEnumReturn } from '../../../common/utils';
|
||||||
import { findMatchingEntityNames, findEntityOrMockByAnyMeans, findBestEntityByName } from '../../../client/handlers';
|
import { findMatchingEntityNames, findEntityOrMockByAnyMeans, findBestEntityByName } from '../../../client/handlers';
|
||||||
import * as _ from 'lodash';
|
import { sample } from 'lodash';
|
||||||
|
|
||||||
const chatTypeNames: string[] = [];
|
const chatTypeNames: string[] = [];
|
||||||
const chatTypeClasses: string[] = [];
|
const chatTypeClasses: string[] = [];
|
||||||
@@ -295,7 +295,7 @@ export class ChatBox implements AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
onMouseEnterEmojiButton(event: MouseEvent) {
|
onMouseEnterEmojiButton(event: MouseEvent) {
|
||||||
if (!event.target) return;
|
if (!event.target) return;
|
||||||
const emoji = _.sample(emojis)!;
|
const emoji = sample(emojis)!;
|
||||||
this.btnEmoji = emoji.names[0];
|
this.btnEmoji = emoji.names[0];
|
||||||
}
|
}
|
||||||
toggleChatType() {
|
toggleChatType() {
|
||||||
|
|||||||
@@ -530,12 +530,6 @@ export class ChatLog implements AfterViewInit, OnDestroy, DoCheck {
|
|||||||
}
|
}
|
||||||
return hsl;
|
return hsl;
|
||||||
}
|
}
|
||||||
fixColor(color: string) {
|
|
||||||
while (color.length <= 7) {
|
|
||||||
color = `0${color}`;
|
|
||||||
}
|
|
||||||
return color.substr(0, 6);
|
|
||||||
}
|
|
||||||
private getCharacterColors(id: number | undefined) {
|
private getCharacterColors(id: number | undefined) {
|
||||||
if (!id) return;
|
if (!id) return;
|
||||||
const entity = findEntityById(this.game.map, id) as Pony;
|
const entity = findEntityById(this.game.map, id) as Pony;
|
||||||
|
|||||||
Reference in New Issue
Block a user