Files
Bubberstation/tgui/packages/tgui-panel/chat/constants.js
Seris02 a6f93b4f96 Some of the unsorted chat types being sorted (#55947)
The emote CSS class was no longer in use, it has been unitalicized and made into the actual emote class, back into local.
    A CSS class for info has been created which has no special CSS.
    The who verb has been put into info. (infoplain CSS class)
    PDA message receiving has been put into info (PDA message sending was already in info). (infoplain CSS class)
    Supply radio has been properly placed into radio.
    Service radio has been properly placed into radio.
    Binary talk has been placed into radio.
    A CSS class for minor announcements has been created.
    Minor announcements (shuttle purchases, head of staff office announcements, silicon announcements, etc) have been placed into radio (major announcements are already in radio). (minorannounce CSS class)
2021-01-06 12:20:40 -03:00

139 lines
3.9 KiB
JavaScript

/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
export const MAX_VISIBLE_MESSAGES = 2500;
export const MAX_PERSISTED_MESSAGES = 1000;
export const MESSAGE_SAVE_INTERVAL = 10000;
export const MESSAGE_PRUNE_INTERVAL = 60000;
export const COMBINE_MAX_MESSAGES = 5;
export const COMBINE_MAX_TIME_WINDOW = 5000;
export const IMAGE_RETRY_DELAY = 250;
export const IMAGE_RETRY_LIMIT = 10;
export const IMAGE_RETRY_MESSAGE_AGE = 60000;
// Default message type
export const MESSAGE_TYPE_UNKNOWN = 'unknown';
// Internal message type
export const MESSAGE_TYPE_INTERNAL = 'internal';
// Must match the set of defines in code/__DEFINES/chat.dm
export const MESSAGE_TYPE_SYSTEM = 'system';
export const MESSAGE_TYPE_LOCALCHAT = 'localchat';
export const MESSAGE_TYPE_RADIO = 'radio';
export const MESSAGE_TYPE_INFO = 'info';
export const MESSAGE_TYPE_WARNING = 'warning';
export const MESSAGE_TYPE_DEADCHAT = 'deadchat';
export const MESSAGE_TYPE_OOC = 'ooc';
export const MESSAGE_TYPE_ADMINPM = 'adminpm';
export const MESSAGE_TYPE_COMBAT = 'combat';
export const MESSAGE_TYPE_ADMINCHAT = 'adminchat';
export const MESSAGE_TYPE_MODCHAT = 'modchat';
export const MESSAGE_TYPE_EVENTCHAT = 'eventchat';
export const MESSAGE_TYPE_ADMINLOG = 'adminlog';
export const MESSAGE_TYPE_ATTACKLOG = 'attacklog';
export const MESSAGE_TYPE_DEBUG = 'debug';
// Metadata for each message type
export const MESSAGE_TYPES = [
// Always-on types
{
type: MESSAGE_TYPE_SYSTEM,
name: 'System Messages',
description: 'Messages from your client, always enabled',
selector: '.boldannounce',
important: true,
},
// Basic types
{
type: MESSAGE_TYPE_LOCALCHAT,
name: 'Local',
description: 'In-character local messages (say, emote, etc)',
selector: '.say, .emote',
},
{
type: MESSAGE_TYPE_RADIO,
name: 'Radio',
description: 'All departments of radio messages',
selector: '.alert, .minorannounce, .syndradio, .centcomradio, .aiprivradio, .comradio, .secradio, .engradio, .medradio, .sciradio, .suppradio, .servradio, .radio, .deptradio, .binarysay, .newscaster',
},
{
type: MESSAGE_TYPE_INFO,
name: 'Info',
description: 'Non-urgent messages from the game and items',
selector: '.notice:not(.pm), .adminnotice, .info, .sinister, .cult, .infoplain',
},
{
type: MESSAGE_TYPE_WARNING,
name: 'Warnings',
description: 'Urgent messages from the game and items',
selector: '.warning:not(.pm), .critical, .userdanger, .italics',
},
{
type: MESSAGE_TYPE_DEADCHAT,
name: 'Deadchat',
description: 'All of deadchat',
selector: '.deadsay',
},
{
type: MESSAGE_TYPE_OOC,
name: 'OOC',
description: 'The bluewall of global OOC messages',
selector: '.ooc, .adminooc',
},
{
type: MESSAGE_TYPE_ADMINPM,
name: 'Admin PMs',
description: 'Messages to/from admins (adminhelp)',
selector: '.pm, .adminhelp',
},
{
type: MESSAGE_TYPE_COMBAT,
name: 'Combat Log',
description: 'Urist McTraitor has stabbed you with a knife!',
selector: '.danger',
},
{
type: MESSAGE_TYPE_UNKNOWN,
name: 'Unsorted',
description: 'Everything we could not sort, always enabled',
},
// Admin stuff
{
type: MESSAGE_TYPE_ADMINCHAT,
name: 'Admin Chat',
description: 'ASAY messages',
selector: '.admin_channel, .adminsay',
admin: true,
},
{
type: MESSAGE_TYPE_MODCHAT,
name: 'Mod Chat',
description: 'MSAY messages',
selector: '.mod_channel',
admin: true,
},
{
type: MESSAGE_TYPE_ADMINLOG,
name: 'Admin Log',
description: 'ADMIN LOG: Urist McAdmin has jumped to coordinates X, Y, Z',
selector: '.log_message',
admin: true,
},
{
type: MESSAGE_TYPE_ATTACKLOG,
name: 'Attack Log',
description: 'Urist McTraitor has shot John Doe',
admin: true,
},
{
type: MESSAGE_TYPE_DEBUG,
name: 'Debug Log',
description: 'DEBUG: SSPlanets subsystem Recover().',
admin: true,
},
];