mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 21:55:52 +02:00
Add shrug command
This commit is contained in:
@@ -244,7 +244,14 @@ export class ChatBox implements AfterViewInit, OnDestroy {
|
||||
}
|
||||
private say(message: string, chatType: ChatType, entityId: number): boolean {
|
||||
this.game.lastChatMessageType = chatType;
|
||||
return !!this.game.send(server => server.say(entityId, message, chatType));
|
||||
if (message.toLowerCase().startsWith('/shrug')) {
|
||||
var rawMessage = message.substring(6);
|
||||
return !!this.game.send(server =>
|
||||
server.say(entityId, ((rawMessage !== '') ? rawMessage + ' ' : '') + `¯\\_(ツ)_/¯`,
|
||||
chatType));
|
||||
} else {
|
||||
return !!this.game.send(server => server.say(entityId, message, chatType));
|
||||
}
|
||||
}
|
||||
private changeChatType(e: KeyboardEvent, chatType: ChatType) {
|
||||
this.chatType = chatType;
|
||||
|
||||
Reference in New Issue
Block a user