Skip to content

Commit

Permalink
tgsay cyrillic (#126)
Browse files Browse the repository at this point in the history
## About The Pull Request
Не-модульная поддержка кириллицы в тгсэй

## Changelog
:cl:
add: ТГсэй теперь красиво работает на кириллице
/:cl:
  • Loading branch information
larentoun authored Apr 19, 2024
1 parent 7311be0 commit 2ae2cec
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 17 deletions.
2 changes: 1 addition & 1 deletion tgui/packages/tgui-say/TguiSay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type State = {
size: WINDOW_SIZES;
};

const CHANNEL_REGEX = /^:\w\s/;
const CHANNEL_REGEX = /^[.:][\wА-Яа-яёЁ]\s/; // BANDATSTATION EDIT - Original: const CHANNEL_REGEX = /^:\w\s/;

export class TguiSay extends Component<{}, State> {
private channelIterator: ChannelIterator;
Expand Down
41 changes: 28 additions & 13 deletions tgui/packages/tgui-say/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,32 @@ export enum LINE_LENGTHS {
* Displays the name in the left button, tags a css class.
*/
export const RADIO_PREFIXES = {
':a ': 'Hive',
':b ': 'io',
':c ': 'Cmd',
':e ': 'Engi',
':g ': 'Cling',
':m ': 'Med',
':n ': 'Sci',
':o ': 'AI',
':s ': 'Sec',
':t ': 'Synd',
':u ': 'Supp',
':v ': 'Svc',
':y ': 'CCom',
':a ': 'Рой',
':b ': 'вв',
':c ': 'Ком',
':e ': 'Инж',
':g ': 'Ген',
':m ': 'Мед',
':n ': 'Науч',
':o ': 'ИИ',
':s ': 'СБ',
':t ': 'Синд',
':u ': 'Снаб',
':v ': 'Серв',
':y ': 'ЦК',
// BANDASTATION ADDITION START
':ф ': 'Рой',
':и ': 'вв',
':с ': 'Ком',
':у ': 'Инж',
':п ': 'Ген',
':ь ': 'Мед',
':т ': 'Науч',
':щ ': 'ИИ',
':ы ': 'СБ',
':е ': 'Синд',
':г ': 'Снаб',
':м ': 'Серв',
':н ': 'ЦК',
// BANDASTATION EDIT END
} as const;
22 changes: 19 additions & 3 deletions tgui/packages/tgui-say/styles/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ $_channel_map: (
'Engi': #f37746,
'Hive': #855d85,
'io': #1e90ff,
// BANDASTATION EDIT ADDITION
'LOOC': #ffceb6,
'Me': #5975da,
'Med': #57b8f0,
'OOC': #cca300,
Expand All @@ -27,8 +25,26 @@ $_channel_map: (
'Supp': #b88646,
'Svc': #6ca729,
'Synd': #8f4a4b,
// BANDASTATION EDIT ADDITION
// BANDASTATION ADDITION START
'LOOC': #ffceb6,
'Whis': #7c7fd9,
'ИИ': #d65d95,
'ЦК': #2681a5,
'Ген': #4c701f,
'Ком': #fcdf03,
'Инж': #f37746,
'Рой': #855d85,
'вв': #1e90ff,
'Эмоц': #5975da,
'Мед': #57b8f0,
'Рац': #1ecc43,
'Гов': #a4bad6,
'Науч': #c68cfa,
'СБ': #dd3535,
'Снаб': #b88646,
'Серв': #6ca729,
'Синд': #8f4a4b,
// BANDASTATION EDIT END
);

$channel_keys: map.keys($_channel_map) !default;
Expand Down

0 comments on commit 2ae2cec

Please sign in to comment.