[SCAM] fluff shit AGAIN FUCK ME
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
namespace Content.Server.White.Other.CustomFluffSystems.merkka;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed class CustomCatExamineComponent : Component
|
||||
{
|
||||
public string? CatOwner;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -2964,3 +2964,4 @@
|
||||
name: Кошка
|
||||
description: Мяу!
|
||||
- type: GhostTakeoverAvailable
|
||||
- type: CustomCatExamine
|
||||
|
||||
Reference in New Issue
Block a user