Remove server/client clothing components. (#11981)
This commit is contained in:
@@ -1,24 +1,22 @@
|
||||
using Content.Server.Humanoid;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Clothing.EntitySystems;
|
||||
using Content.Shared.Humanoid;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Tag;
|
||||
|
||||
namespace Content.Server.Clothing;
|
||||
|
||||
public sealed class ServerClothingSystem : EntitySystem
|
||||
public sealed class ServerClothingSystem : ClothingSystem
|
||||
{
|
||||
[Dependency] private readonly HumanoidSystem _humanoidSystem = default!;
|
||||
[Dependency] private readonly TagSystem _tagSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
protected override void OnGotEquipped(EntityUid uid, ClothingComponent component, GotEquippedEvent args)
|
||||
{
|
||||
SubscribeLocalEvent<SharedClothingComponent, GotEquippedEvent>(OnGotEquipped);
|
||||
SubscribeLocalEvent<SharedClothingComponent, GotUnequippedEvent>(OnGotUnequipped);
|
||||
}
|
||||
base.OnGotEquipped(uid, component, args);
|
||||
// why the fuck is humanoid visuals server-only???
|
||||
|
||||
private void OnGotEquipped(EntityUid uid, SharedClothingComponent component, GotEquippedEvent args)
|
||||
{
|
||||
if (args.Slot == "head"
|
||||
&& _tagSystem.HasTag(args.Equipment, "HidesHair"))
|
||||
{
|
||||
@@ -27,8 +25,12 @@ public sealed class ServerClothingSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
private void OnGotUnequipped(EntityUid uid, SharedClothingComponent component, GotUnequippedEvent args)
|
||||
protected override void OnGotUnequipped(EntityUid uid, ClothingComponent component, GotUnequippedEvent args)
|
||||
{
|
||||
base.OnGotUnequipped(uid, component, args);
|
||||
|
||||
// why the fuck is humanoid visuals server-only???
|
||||
|
||||
if (args.Slot == "head"
|
||||
&& _tagSystem.HasTag(args.Equipment, "HidesHair"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user