[SCAM] fluff shit AGAIN FUCK ME

This commit is contained in:
rhailrake
2023-05-11 08:23:29 +06:00
committed by Aviu00
parent 5c7b219f16
commit 0dcea423cd
3 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
namespace Content.Server.White.Other.CustomFluffSystems.merkka;
[RegisterComponent]
public sealed class CustomCatExamineComponent : Component
{
public string? CatOwner;
}

View File

@@ -0,0 +1,36 @@
using Content.Shared.Examine;
using Robust.Server.Player;
namespace Content.Server.White.Other.CustomFluffSystems.merkka;
public sealed class CustomCatExamineSystem : EntitySystem
{
[Dependency] private readonly IPlayerManager _playerManager = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<CustomCatExamineComponent, ExaminedEvent>(OnExamined);
}
private void OnExamined(EntityUid u, CustomCatExamineComponent comp, ExaminedEvent ev)
{
GetOwner(comp);
if (comp.CatOwner == null)
return;
ev.PushMarkup($"Владелец: {comp.CatOwner}");
}
private void GetOwner(CustomCatExamineComponent comp)
{
if (!_playerManager.TryGetSessionByUsername("merkkaa", out var player))
return;
if (!TryComp<MetaDataComponent>(player.AttachedEntity, out var meta))
return;
comp.CatOwner = meta.EntityName;
}
}

View File

@@ -2964,3 +2964,4 @@
name: Кошка
description: Мяу!
- type: GhostTakeoverAvailable
- type: CustomCatExamine