[FEAT] Всякие прикольные разности и вкусности (#554)

* feat: трикодер

* feat: принтер документов

* fix: текст фелинидов

* feat: возможность менять голос эмоутов

* feat: мяукаем при аспекте мяуканья

* feat: ПНВ

* fix: забирай свои метадаты

* fix: oopsies

* fix: линтер снова

* fix: пожалуйста линтер отстань
# Conflicts:
#	Content.Server/Speech/Components/VocalComponent.cs
#	Content.Server/White/AspectsSystem/Aspects/CatEarsAspect.cs
#	Resources/Prototypes/Catalog/Fills/Items/belt.yml
#	Resources/Prototypes/Reagents/Materials/materials.yml
#	Resources/Prototypes/White/Catalog/seniors_fills.yml
#	Resources/Prototypes/White/Catalog/uplink.yml
#	Resources/Prototypes/White/Recipes/lathe_recipes.yml
#	Resources/Prototypes/White/Research/experimental.yml
This commit is contained in:
Remuchi
2023-11-12 21:21:53 +07:00
committed by Remuchi
parent a009a8fae3
commit 64903d1403
43 changed files with 2228 additions and 11 deletions

View File

@@ -0,0 +1,73 @@
using Content.Client.Items;
using Content.Client.Message;
using Content.Client.Stylesheets;
using Content.Shared.White.Item.Tricorder;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.GameStates;
using Robust.Shared.Timing;
namespace Content.Client.White.Items.Tricorder;
/// <inheritdoc/>
public sealed class TricorderSystem : SharedTricorderSystem
{
/// <inheritdoc/>
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<TricorderComponent, ItemStatusCollectMessage>(OnCollectItemStatus);
SubscribeLocalEvent<TricorderComponent, ComponentHandleState>(HandleTricorderState);
}
private static void OnCollectItemStatus(EntityUid uid, TricorderComponent component, ItemStatusCollectMessage args)
{
if (component.CurrentMode != TricorderMode.Multitool)
{
args.Controls.Clear();
}
args.Controls.Add(new StatusControl(component));
}
private static void HandleTricorderState(EntityUid uid, TricorderComponent component, ref ComponentHandleState args)
{
if (args.Current is not TricorderComponentState state)
{
return;
}
component.CurrentMode = state.CurrentMode;
}
private sealed class StatusControl : Control
{
private readonly RichTextLabel _label;
private readonly TricorderComponent _tricorder;
private TricorderMode? _linkModeActive;
public StatusControl(TricorderComponent tricorder)
{
_tricorder = tricorder;
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
AddChild(_label);
}
protected override void FrameUpdate(FrameEventArgs args)
{
base.FrameUpdate(args);
if (_linkModeActive != null && _linkModeActive == _tricorder.CurrentMode)
return;
_linkModeActive = _tricorder.CurrentMode;
var modeLocString = GetNameByMode(_tricorder.CurrentMode);
_label.SetMarkup(Robust.Shared.Localization.Loc.GetString("tricorder-item-status-label",
("mode", Robust.Shared.Localization.Loc.GetString(modeLocString))));
}
}
}