Skip to content

Commit

Permalink
Merge pull request #950 from TheArturZh/corvax-cherrypick-26
Browse files Browse the repository at this point in the history
Corvax cherrypick 26
  • Loading branch information
DexlerXD authored Apr 29, 2024
2 parents b2879f5 + 9318ee7 commit 2c0f3b3
Show file tree
Hide file tree
Showing 860 changed files with 6,776 additions and 1,774 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
using Content.Shared.Roles;
using Content.Shared.Whitelist;
using Robust.Shared.Prototypes;

namespace Content.Server.Corvax.HiddenDescription;

/// <summary>
/// A component that shows players with specific roles or jobs additional information about entities
/// </summary>

[RegisterComponent, Access(typeof(HiddenDescriptionSystem))]
public sealed partial class HiddenDescriptionComponent : Component
{
[DataField(required: true)]
public List<HiddenDescriptionEntry> Entries = new();

/// <summary>
/// Prioritizing the location of classified information in an inspection
/// </summary>
[DataField]
public int PushPriority = 1;
}

[DataDefinition, Serializable]
public readonly partial record struct HiddenDescriptionEntry()
{
/// <summary>
/// Locale string with hidden description
/// </summary>
[DataField(required: true)]
public LocId Label { get; init; } = default!;

/// <summary>
/// A player's mind must pass a whitelist check to receive hidden information
/// </summary>
[DataField]
public EntityWhitelist WhitelistMind { get; init; } = new();

/// <summary>
/// A player's body must pass a whitelist check to receive hidden information
/// </summary>
[DataField]
public EntityWhitelist WhitelistBody { get; init; } = new();

/// <summary>
/// The player's mind has to have some job role to access the hidden information
/// </summary>
[DataField]
public List<ProtoId<JobPrototype>> JobRequired { get; init; } = new();

/// <summary>
/// If true, the player needs to go through and whitelist, and have some job. By default, at least one successful checks is sufficient.
/// </summary>
[DataField]
public bool NeedAllCheck { get; init; } = false;
}
37 changes: 37 additions & 0 deletions Content.Server/Corvax/HiddenDescription/HiddenDescriptionSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using Content.Server.Mind;
using Content.Shared.Examine;
using Content.Shared.Roles.Jobs;

namespace Content.Server.Corvax.HiddenDescription;

public sealed partial class HiddenDescriptionSystem : EntitySystem
{

[Dependency] private readonly MindSystem _mind = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<HiddenDescriptionComponent, ExaminedEvent>(OnExamine);
}

private void OnExamine(Entity<HiddenDescriptionComponent> hiddenDesc, ref ExaminedEvent args)
{
_mind.TryGetMind(args.Examiner, out var mindId, out var mindComponent);
TryComp<JobComponent>(mindId, out var job);

foreach (var item in hiddenDesc.Comp.Entries)
{
var isJobAllow = job?.Prototype != null && item.JobRequired.Contains(job.Prototype.Value);
var isMindWhitelistPassed = item.WhitelistMind.IsValid(mindId);
var isBodyWhitelistPassed = item.WhitelistMind.IsValid(args.Examiner);
var passed = item.NeedAllCheck
? isMindWhitelistPassed && isBodyWhitelistPassed && isJobAllow
: isMindWhitelistPassed || isBodyWhitelistPassed || isJobAllow;

if (passed)
args.PushMarkup(Loc.GetString(item.Label), hiddenDesc.Comp.PushPriority);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
reagent-name-yorsh = yorsh
reagent-desc-yorsh = Taste of childhood.
reagent-name-alexander = alexander
reagent-desc-alexander = No Alexander was harmed during production. Maybe...
reagent-name-daiquiri = daiquiri
reagent-desc-daiquiri = Do you want to feel like a 19th century miner? The miner did not want to, and tried to forget himself in alcohol.
reagent-name-campari = campari
reagent-desc-campari = Tincture based on aromatic herbs and citrus fruits. Non-GMO!
reagent-name-negroni = negroni
reagent-desc-negroni = Americano for alcoholics.
reagent-name-espressoMartini = espresso martini
reagent-desc-espressoMartini = Wake me up, then fu... Uh-h.. Okay, just wake me up.
reagent-name-oldFashioned = old fashioned
reagent-desc-oldFashioned = As the greatest classic said: “This is a classic”.
reagent-name-badTouch = bad touch
reagent-desc-badTouch = We're nothing but mammals after all.
reagent-name-darkAndStormy = dark and stormy
reagent-desc-darkAndStormy = Straight from Bermuda! The pirate on the left says that this is why the drink disappears.
reagent-name-bramble = bramble
reagent-desc-bramble = Berries, gin, and a rather creepy look.
reagent-name-maiTai = mai tai
reagent-desc-maiTai = The first person who tried this cocktail exclaimed: ”Mai tai — roa ae!”. What does it mean in Thai... I don't know. Sounds cool!
reagent-name-moscowMule = moscow mule
reagent-desc-moscowMule = Cocktail from the USA. Why Moscow? Because vodka. Moscow vodka? No. So why Moscow? VODKA!
reagent-name-paloma = paloma
reagent-desc-paloma = Cowboys on top. Maracas on bottom. Hard choice...
reagent-name-boyarsky = boyarsky
reagent-desc-boyarsky = What to do if you are tired of life? MIX VODKA!

This file was deleted.

This file was deleted.

This file was deleted.

8 changes: 8 additions & 0 deletions Resources/Locale/ru-RU/_directions.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
zzzz-fmt-direction-North = Север
zzzz-fmt-direction-South = Юг
zzzz-fmt-direction-East = Восток
zzzz-fmt-direction-West = Запад
zzzz-fmt-direction-NorthEast = Северо-восток
zzzz-fmt-direction-SouthEast = Юго-восток
zzzz-fmt-direction-NorthWest = Северо-запад
zzzz-fmt-direction-SouthWest = Юго-запад
15 changes: 10 additions & 5 deletions Resources/Locale/ru-RU/accent/accents.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ accent-words-mouse-6 = Уиип!
accent-words-mouse-7 = Иип!
# Mumble
accent-words-mumble-1 = Ммпмв!
accent-words-mumble-2 = Мммв мррввв!
accent-words-mumble-3 = Мммв мпвф!
accent-words-mumble-2 = Мммв-мррввв!
accent-words-mumble-3 = Мммв-мпвф!
# Silicon
accent-words-silicon-1 = Бип.
accent-words-silicon-2 = Буп.
Expand Down Expand Up @@ -61,7 +61,7 @@ accent-words-generic-aggressive-4 = Гррав!!
accent-words-duck-1 = Ква!
accent-words-duck-2 = Ква.
accent-words-duck-3 = Ква?
accent-words-duck-4 = Ква ква!
accent-words-duck-4 = Ква-ква!
# Chicken
accent-words-chicken-1 = Кудах!
accent-words-chicken-2 = Кудах.
Expand All @@ -71,7 +71,7 @@ accent-words-chicken-4 = Кудах тах-тах!
accent-words-pig-1 = Хрю.
accent-words-pig-2 = Хрю?
accent-words-pig-3 = Хрю!
accent-words-pig-4 = Хрю Хрю!
accent-words-pig-4 = Хрю-хрю!
# Kangaroo
accent-words-kangaroo-1 = Грр!
accent-words-kangaroo-2 = Ххссс!
Expand All @@ -82,7 +82,7 @@ accent-words-slimes-1 = Блюмп.
accent-words-slimes-2 = Блимпаф?
accent-words-slimes-3 = Бламп!
accent-words-slimes-4 = Блааамп...
accent-words-slimes-5 = Блабл бламп!
accent-words-slimes-5 = Блабл-бламп!
# Mothroach
accent-words-mothroach-1 = Чирик!
# Crab
Expand All @@ -102,3 +102,8 @@ accent-words-kobold-6 = Гронк!
accent-words-kobold-7 = Хисс!
accent-words-kobold-8 = Йии!
accent-words-kobold-9 = Йип.
# Nymph
accent-words-nymph-1 = Чирик!
accent-words-nymph-2 = Чурр...
accent-words-nymph-3 = Чипи?
accent-words-nymph-4 = Шрруп!
8 changes: 8 additions & 0 deletions Resources/Locale/ru-RU/accent/parrot.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
accent-parrot-squawk-1 = СКВАК!
accent-parrot-squawk-2 = СКВАААК!
accent-parrot-squawk-3 = АВВК!
accent-parrot-squawk-4 = ААВК!
accent-parrot-squawk-5 = РАВВК!
accent-parrot-squawk-6 = РАААВК!
accent-parrot-squawk-7 = БРААВК!
accent-parrot-squawk-8 = БРАВВК!
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ id-card-console-window-save-button = Сохранить
id-card-console-window-job-title-label = Должность:
id-card-console-window-eject-button = Извлечь
id-card-console-window-insert-button = Вставить
id-card-console-window-job-selection-label = Предустановки должностей (задает иконку отдела и должности):
id-card-console-window-job-selection-label = Предустановки должностей (задаёт иконку отдела и должности):
access-id-card-console-component-no-hands-error = У вас нет рук.
id-card-console-privileged-id = Основная ID
id-card-console-target-id = Целевая ID
8 changes: 7 additions & 1 deletion Resources/Locale/ru-RU/accessories/human-hair.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ marking-HumanHairBedhead = Небрежная
marking-HumanHairBedheadv2 = Небрежная 2
marking-HumanHairBedheadv3 = Небрежная 3
marking-HumanHairLongBedhead = Небрежная (Длинная)
marking-HumanHairLongBedhead2 = Небрежная (Длинная 2)
marking-HumanHairFloorlengthBedhead = Небрежная (До пола)
marking-HumanHairBeehive = Улей
marking-HumanHairBeehivev2 = Улей 2
marking-HumanHairBob = Каре
marking-HumanHairBob2 = Каре 2
marking-HumanHairBobcut = Каре 3
marking-HumanHairBob4 = Каре 4
marking-HumanHairBob5 = Каре 5
marking-HumanHairBobcurl = Каре (Завитки)
marking-HumanHairBoddicker = Боддикер
marking-HumanHairBowlcut = Горшок
Expand Down Expand Up @@ -41,6 +43,7 @@ marking-HumanHairClassicAfro = Классическая Афро
marking-HumanHairClassicBigAfro = Классическая Афро (Большая)
marking-HumanHairClassicBusiness = Классическая Деловая
marking-HumanHairClassicCia = Классическая ЦРУ
marking-HumanHairClassicCornrows2 = Классическая Корнроу 2
marking-HumanHairClassicFloorlengthBedhead = Классическая Небрежная (До пола)
marking-HumanHairClassicModern = Классическая Современная
marking-HumanHairClassicMulder = Классическая Малдер
Expand All @@ -53,6 +56,7 @@ marking-HumanHairCornrowbun = Корнроу (Пучок)
marking-HumanHairCornrowbraid = Корнроу (Косичка)
marking-HumanHairCornrowtail = Корнроу (Хвостик)
marking-HumanHairCrewcut = Крю-кат
marking-HumanHairCrewcut2 = Крю-кат 2
marking-HumanHairCurls = Завитки
marking-HumanHairC = Подстриженная
marking-HumanHairDandypompadour = Денди Помпадур
Expand Down Expand Up @@ -94,6 +98,7 @@ marking-HumanHairKusanagi = Кусанаги
marking-HumanHairLong = Длинная 1
marking-HumanHairLong2 = Длинная 2
marking-HumanHairLong3 = Длинная 3
marking-HumanHairLongWithBundles = Длинная с пучками
marking-HumanHairLongovereye = Длинная (Через глаз)
marking-HumanHairLbangs = Длинная (Чёлка)
marking-HumanHairLongemo = Длинная (Эмо)
Expand Down Expand Up @@ -162,6 +167,7 @@ marking-HumanHairSpiky = Колючая 2
marking-HumanHairSpiky2 = Колючая 3
marking-HumanHairSwept = Зачёс назад
marking-HumanHairSwept2 = Зачёс назад 2
marking-HumanHairTailed = Хвостатая
marking-HumanHairThinning = Редеющая
marking-HumanHairThinningfront = Редеющая (Спереди)
marking-HumanHairThinningrear = Редеющая (Сзади)
Expand All @@ -174,6 +180,7 @@ marking-HumanHairTwoStrands = Две пряди
marking-HumanHairUndercut = Андеркат
marking-HumanHairUndercutleft = Андеркат (Слева)
marking-HumanHairUndercutright = Андеркат (Справа)
marking-HumanHairUneven = Неровная
marking-HumanHairUnkept = Неухоженная
marking-HumanHairUpdo = Высокая
marking-HumanHairVlong = Очень длинная
Expand All @@ -183,4 +190,3 @@ marking-HumanHairVeryshortovereyealternate = Очень короткая (Чер
marking-HumanHairVlongfringe = Очень короткая (Чёлка)
marking-HumanHairVolaju = Воладзю
marking-HumanHairWisp = Пряди
marking-HumanHairUneven = Неровная
2 changes: 1 addition & 1 deletion Resources/Locale/ru-RU/administration/admin-verbs.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ admin-verbs-erase-description =
Их вещи упадут на землю.
Игроки увидят всплывающее окно, указывающее им играть как будто исчезнувшего никогда не существовало.
toolshed-verb-mark = Отметить
toolshed-verb-mark-description = Помещает данную сущность в переменную $marked, заменяя ее предыдущее значение.
toolshed-verb-mark-description = Помещает данную сущность в переменную $marked, заменяя её предыдущее значение.
1 change: 1 addition & 0 deletions Resources/Locale/ru-RU/administration/bwoink.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ bwoink-system-typing-indicator =
[one] печатает
*[other] печатают
}...
admin-bwoink-play-sound = Бвоинк?
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add-uplink-command-description = Создает аплинк в выбранном предмете и привязывает его к аккаунту игрока
add-uplink-command-description = Создаёт аплинк в выбранном предмете и привязывает его к аккаунту игрока
add-uplink-command-help = Использование: adduplink [username] [item-id]
add-uplink-command-completion-1 = Username (по-умолчанию это вы сами)
add-uplink-command-completion-2 = Uplink uid (по-умолчанию это КПК)
Expand Down
3 changes: 3 additions & 0 deletions Resources/Locale/ru-RU/administration/commands/aghost.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
aghost-description = Делает вас призраком-админом.
aghost-no-mind-self = Вы не можете стать призраком!
aghost-no-mind-other = Эта сущность не может стать призраком!
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dsay-command-description = Отправляет сообщение в чат мертвых от имени администратора
dsay-command-description = Отправляет сообщение в чат мёртвых от имени администратора
dsay-command-help-text = Использование: { $command } <message>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
play-global-sound-command-description = Проигрывает глобальный звук для выбранного игрока или для каждого подключенного игрока, если не выбран конкретный.
play-global-sound-command-description = Проигрывает глобальный звук для выбранного игрока или для каждого подключённого игрока, если не выбран конкретный.
play-global-sound-command-help = playglobalsound <path> [user 1] ... [user n]
play-global-sound-command-player-not-found = Игрок "{ $username }" не найден.
play-global-sound-command-volume-parse = Задан неправильный уровень громкости { $volume }.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ set-looc-command-description = Позволяет включить или вык
set-looc-command-help = Использование: setlooc ИЛИ setlooc [value]
set-looc-command-too-many-arguments-error = Слишком много аргументов.
set-looc-command-invalid-argument-error = Неверный аргумент.
set-looc-command-looc-enabled = LOOC чат был включен.
set-looc-command-looc-enabled = LOOC чат был включён.
set-looc-command-looc-disabled = LOOC чат был выключен.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set-mind-command-description = Перемещает сознание в указанную сущность. Сущность должна иметь { $requiredComponent }. По умолчанию это заставит разум, который в данный момент посещает другие сущности, вернуться обратно (т.е. вернуть призрака в свое основное тело).
set-mind-command-description = Перемещает сознание в указанную сущность. Сущность должна иметь { $requiredComponent }. По умолчанию это заставит разум, который в данный момент посещает другие сущности, вернуться обратно (т.е. вернуть призрака в своё основное тело).
set-mind-command-help-text = Использование: { $command } <entityUid> <username> [unvisit]
set-mind-command-target-has-no-content-data-message = Целевой игрок не имеет данных о содержимом (wtf?)
set-mind-command-target-has-no-mind-message = Целевая сущность не обладает разумом (вы забыли сделать ее разумной?)
set-mind-command-target-has-no-mind-message = Целевая сущность не обладает разумом (вы забыли сделать её разумной?)
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ set-ooc-command-description = Позволяет включить или вык
set-ooc-command-help = Использование: setooc ИЛИ setooc [value]
set-ooc-command-too-many-arguments-error = Слишком много аргументов.
set-ooc-command-invalid-argument-error = Неверный аргумент.
set-ooc-command-ooc-enabled = OOC чат был включен.
set-ooc-command-ooc-enabled = OOC чат был включён.
set-ooc-command-ooc-disabled = OOC чат был выключен.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cmd-stealthmin-desc = Переключение видимости вас через adminwho.
cmd-stealthmin-help = Использование: stealthmin
Используйте stealthmin для переключения отображение вас в результате вывода команды adminwho.
cmd-stealthmin-no-console = Вы не можете использовать эту команду через консоль сервера
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ admin-manager-admin-permissions-updated-message = Ваши права админ
admin-manager-admin-logout-message = Админ вышел: { $name }
admin-manager-admin-login-message = Админ зашёл: { $name }
admin-manager-admin-data-host-title = Хост
admin-manager-stealthed-message = Теперь вы спрятавшийся администратор.
admin-manager-unstealthed-message = Вы больше не прячетесь.
admin-manager-self-enable-stealth = { $stealthAdminName } спрятался.
admin-manager-self-disable-stealth = { $exStealthAdminName } больше не прячется.
Loading

0 comments on commit 2c0f3b3

Please sign in to comment.