Remove server/client clothing components. (#11981)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Content.Server.Administration.Commands;
|
||||
using Content.Server.Administration.Components;
|
||||
@@ -28,6 +28,7 @@ using Content.Server.Tools.Systems;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.Body.Part;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Disease;
|
||||
|
||||
@@ -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"))
|
||||
{
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Item;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Server.Clothing.Components
|
||||
{
|
||||
// Needed for client-side clothing component.
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedClothingComponent))]
|
||||
public sealed class ClothingComponent : SharedClothingComponent
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,3 @@
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Toggleable;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Item;
|
||||
using Content.Server.Actions;
|
||||
using Content.Server.Atmos.Components;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
@@ -14,8 +9,12 @@ using Content.Server.IdentityManagement;
|
||||
using Content.Server.Nutrition.EntitySystems;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.VoiceMask;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Clothing.EntitySystems;
|
||||
using Content.Shared.IdentityManagement.Components;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
namespace Content.Server.Clothing
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
using System.Threading;
|
||||
using Content.Shared.Disease;
|
||||
using Content.Shared.Disease.Components;
|
||||
using Content.Server.Disease.Components;
|
||||
using Content.Server.Clothing.Components;
|
||||
using Content.Server.Body.Systems;
|
||||
using Content.Server.Chat.Systems;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Disease.Components;
|
||||
using Content.Server.DoAfter;
|
||||
using Content.Server.MobState;
|
||||
using Content.Server.Nutrition.EntitySystems;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Disease;
|
||||
using Content.Shared.Disease.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.Rejuvenate;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Serialization.Manager;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Server.Nutrition.EntitySystems;
|
||||
using Robust.Shared.Utility;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Item;
|
||||
using Content.Server.MobState;
|
||||
using Content.Shared.Rejuvenate;
|
||||
using System.Threading;
|
||||
|
||||
namespace Content.Server.Disease
|
||||
{
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Content.Server.Eye.Blinding.EyeProtection
|
||||
|
||||
private void OnEquipped(EntityUid uid, EyeProtectionComponent component, GotEquippedEvent args)
|
||||
{
|
||||
if (!TryComp<SharedClothingComponent>(uid, out var clothing) || clothing.Slots == SlotFlags.PREVENTEQUIP)
|
||||
if (!TryComp<ClothingComponent>(uid, out var clothing) || clothing.Slots == SlotFlags.PREVENTEQUIP)
|
||||
return;
|
||||
|
||||
if (!clothing.Slots.HasFlag(args.SlotFlags))
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.Chemistry.EntitySystems;
|
||||
using Content.Server.Clothing.Components;
|
||||
using Content.Server.DoAfter;
|
||||
using Content.Server.Fluids.Components;
|
||||
using Content.Server.Nutrition.Components;
|
||||
using Content.Server.Nutrition.EntitySystems;
|
||||
using Content.Shared.Chemistry.Components;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Inventory.Events;
|
||||
@@ -18,6 +14,9 @@ using Content.Shared.Verbs;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Prototypes;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
namespace Content.Server.Fluids.EntitySystems;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Content.Server.Clothing.Components;
|
||||
using Content.Server.Storage.Components;
|
||||
using Content.Server.Storage.EntitySystems;
|
||||
using Content.Server.Temperature.Systems;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Inventory.Events;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Content.Server.Clothing.Components;
|
||||
using Content.Server.Light.Components;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Clothing.EntitySystems;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Item;
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
using System.Threading;
|
||||
using Content.Shared.Verbs;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Server.Clothing.Components;
|
||||
using Content.Server.Medical.Components;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Body.Components;
|
||||
using Content.Server.DoAfter;
|
||||
using Content.Server.Medical.Components;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using System.Threading;
|
||||
|
||||
namespace Content.Server.Medical
|
||||
{
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using System.Linq;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Body.Components;
|
||||
using Content.Server.Body.Systems;
|
||||
using Content.Server.Chemistry.EntitySystems;
|
||||
using Content.Server.Clothing.Components;
|
||||
using Content.Server.Nutrition.Components;
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Clothing.EntitySystems;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Inventory;
|
||||
@@ -15,6 +14,7 @@ using Content.Shared.Smoking;
|
||||
using Content.Shared.Temperature;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Containers;
|
||||
using System.Linq;
|
||||
|
||||
namespace Content.Server.Nutrition.EntitySystems
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Content.Server.Clothing.Components;
|
||||
using Content.Server.Speech.Components;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Inventory.Events;
|
||||
|
||||
namespace Content.Server.Speech.EntitySystems;
|
||||
|
||||
Reference in New Issue
Block a user