diff --git a/Content.Client/Clothing/ClothingVisualsSystem.cs b/Content.Client/Clothing/ClientClothingSystem.cs
similarity index 94%
rename from Content.Client/Clothing/ClothingVisualsSystem.cs
rename to Content.Client/Clothing/ClientClothingSystem.cs
index 304a3cc5c7..e9a417b5a1 100644
--- a/Content.Client/Clothing/ClothingVisualsSystem.cs
+++ b/Content.Client/Clothing/ClientClothingSystem.cs
@@ -4,11 +4,11 @@ using System.Linq;
using Content.Client.Inventory;
using Content.Shared.Clothing;
using Content.Shared.Clothing.Components;
+using Content.Shared.Clothing.EntitySystems;
using Content.Shared.Humanoid;
using Content.Shared.Inventory;
using Content.Shared.Inventory.Events;
using Content.Shared.Item;
-using Content.Shared.Tag;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.ResourceManagement;
@@ -17,7 +17,7 @@ using static Robust.Shared.GameObjects.SharedSpriteComponent;
namespace Content.Client.Clothing;
-public sealed class ClothingVisualsSystem : EntitySystem
+public sealed class ClientClothingSystem : ClothingSystem
{
///
/// This is a shitty hotfix written by me (Paul) to save me from renaming all files.
@@ -44,15 +44,11 @@ public sealed class ClothingVisualsSystem : EntitySystem
[Dependency] private IResourceCache _cache = default!;
[Dependency] private InventorySystem _inventorySystem = default!;
- [Dependency] private TagSystem _tagSystem = default!;
public override void Initialize()
{
base.Initialize();
- SubscribeLocalEvent(OnGotEquipped);
- SubscribeLocalEvent(OnGotUnequipped);
-
SubscribeLocalEvent(OnGetVisuals);
SubscribeLocalEvent(OnVisualsChanged);
@@ -148,11 +144,6 @@ public sealed class ClothingVisualsSystem : EntitySystem
RenderEquipment(uid, args.Item, clothing.InSlot, component, null, clothing);
}
- private void OnGotUnequipped(EntityUid uid, ClothingComponent component, GotUnequippedEvent args)
- {
- component.InSlot = null;
- }
-
private void OnDidUnequip(EntityUid uid, SpriteComponent component, DidUnequipEvent args)
{
if (!TryComp(uid, out ClientInventoryComponent? inventory) || !TryComp(uid, out SpriteComponent? sprite))
@@ -184,9 +175,9 @@ public sealed class ClothingVisualsSystem : EntitySystem
}
}
- private void OnGotEquipped(EntityUid uid, ClothingComponent component, GotEquippedEvent args)
+ protected override void OnGotEquipped(EntityUid uid, ClothingComponent component, GotEquippedEvent args)
{
- component.InSlot = args.Slot;
+ base.OnGotEquipped(uid, component, args);
RenderEquipment(args.Equipee, uid, args.Slot, clothingComponent: component);
}
diff --git a/Content.Client/Clothing/ClothingComponent.cs b/Content.Client/Clothing/ClothingComponent.cs
deleted file mode 100644
index c03ea58ac1..0000000000
--- a/Content.Client/Clothing/ClothingComponent.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Content.Shared.Clothing.Components;
-using Robust.Shared.GameStates;
-
-namespace Content.Client.Clothing
-{
- [RegisterComponent]
- [ComponentReference(typeof(SharedClothingComponent))]
- public sealed class ClothingComponent : SharedClothingComponent
- {
- public string? InSlot;
- }
-}
diff --git a/Content.Client/Inventory/ClientInventorySystem.cs b/Content.Client/Inventory/ClientInventorySystem.cs
index 76785d3aaa..b46d9786fd 100644
--- a/Content.Client/Inventory/ClientInventorySystem.cs
+++ b/Content.Client/Inventory/ClientInventorySystem.cs
@@ -3,6 +3,7 @@ using Content.Client.Examine;
using Content.Client.Storage;
using Content.Client.UserInterface.Controls;
using Content.Client.Verbs;
+using Content.Shared.Clothing.Components;
using Content.Shared.Hands.Components;
using Content.Shared.Interaction;
using Content.Shared.Interaction.Events;
@@ -23,7 +24,7 @@ namespace Content.Client.Inventory
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
- [Dependency] private readonly ClothingVisualsSystem _clothingVisualsSystem = default!;
+ [Dependency] private readonly ClientClothingSystem _clothingVisualsSystem = default!;
[Dependency] private readonly ExamineSystem _examine = default!;
[Dependency] private readonly VerbSystem _verbs = default!;
diff --git a/Content.Client/Movement/Systems/JetpackSystem.cs b/Content.Client/Movement/Systems/JetpackSystem.cs
index 8f5da00399..02cfb07094 100644
--- a/Content.Client/Movement/Systems/JetpackSystem.cs
+++ b/Content.Client/Movement/Systems/JetpackSystem.cs
@@ -1,11 +1,8 @@
-using Content.Client.Clothing;
+using Content.Shared.Clothing.Components;
using Content.Shared.Clothing.EntitySystems;
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Systems;
-using Content.Shared.Weapons.Ranged.Systems;
-using Robust.Client.Animations;
using Robust.Client.GameObjects;
-using Robust.Shared.GameStates;
using Robust.Shared.Map;
using Robust.Shared.Physics.Components;
using Robust.Shared.Timing;
diff --git a/Content.Client/Toggleable/ToggleableLightVisualsSystem.cs b/Content.Client/Toggleable/ToggleableLightVisualsSystem.cs
index 6a3cccb0de..24f1c3b194 100644
--- a/Content.Client/Toggleable/ToggleableLightVisualsSystem.cs
+++ b/Content.Client/Toggleable/ToggleableLightVisualsSystem.cs
@@ -18,7 +18,7 @@ public sealed class ToggleableLightVisualsSystem : VisualizerSystem(OnGetHeldVisuals, after: new[] { typeof(ItemSystem) });
- SubscribeLocalEvent(OnGetEquipmentVisuals, after: new[] { typeof(ClothingVisualsSystem) });
+ SubscribeLocalEvent(OnGetEquipmentVisuals, after: new[] { typeof(ClientClothingSystem) });
}
protected override void OnAppearanceChange(EntityUid uid, ToggleableLightVisualsComponent component, ref AppearanceChangeEvent args)
diff --git a/Content.IntegrationTests/Tests/DeleteInventoryTest.cs b/Content.IntegrationTests/Tests/DeleteInventoryTest.cs
index 5efc6912da..0303b12c2f 100644
--- a/Content.IntegrationTests/Tests/DeleteInventoryTest.cs
+++ b/Content.IntegrationTests/Tests/DeleteInventoryTest.cs
@@ -1,14 +1,13 @@
-using System.Threading.Tasks;
-using Content.Server.Clothing.Components;
using Content.Server.Inventory;
+using Content.Shared.Clothing.Components;
using Content.Shared.Clothing.EntitySystems;
using Content.Shared.Inventory;
-using Content.Shared.Item;
using NUnit.Framework;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;
+using System.Threading.Tasks;
namespace Content.IntegrationTests.Tests
{
diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs
index 8ba5cea1fa..4ce281f657 100644
--- a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs
+++ b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs
@@ -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;
diff --git a/Content.Server/Clothing/ClothingSystem.cs b/Content.Server/Clothing/ClothingSystem.cs
index 929e60acc2..288c3f7ac5 100644
--- a/Content.Server/Clothing/ClothingSystem.cs
+++ b/Content.Server/Clothing/ClothingSystem.cs
@@ -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(OnGotEquipped);
- SubscribeLocalEvent(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"))
{
diff --git a/Content.Server/Clothing/Components/ClothingComponent.cs b/Content.Server/Clothing/Components/ClothingComponent.cs
deleted file mode 100644
index b4f36b9e13..0000000000
--- a/Content.Server/Clothing/Components/ClothingComponent.cs
+++ /dev/null
@@ -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
- {
- }
-}
diff --git a/Content.Server/Clothing/MaskSystem.cs b/Content.Server/Clothing/MaskSystem.cs
index beb2c639ff..d01344368e 100644
--- a/Content.Server/Clothing/MaskSystem.cs
+++ b/Content.Server/Clothing/MaskSystem.cs
@@ -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
diff --git a/Content.Server/Disease/DiseaseSystem.cs b/Content.Server/Disease/DiseaseSystem.cs
index 8a2def106e..c3ad5389e5 100644
--- a/Content.Server/Disease/DiseaseSystem.cs
+++ b/Content.Server/Disease/DiseaseSystem.cs
@@ -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
{
diff --git a/Content.Server/Eye/Blinding/EyeProtection/EyeProtectionSystem.cs b/Content.Server/Eye/Blinding/EyeProtection/EyeProtectionSystem.cs
index 18b439e6a1..f64aa0d945 100644
--- a/Content.Server/Eye/Blinding/EyeProtection/EyeProtectionSystem.cs
+++ b/Content.Server/Eye/Blinding/EyeProtection/EyeProtectionSystem.cs
@@ -50,7 +50,7 @@ namespace Content.Server.Eye.Blinding.EyeProtection
private void OnEquipped(EntityUid uid, EyeProtectionComponent component, GotEquippedEvent args)
{
- if (!TryComp(uid, out var clothing) || clothing.Slots == SlotFlags.PREVENTEQUIP)
+ if (!TryComp(uid, out var clothing) || clothing.Slots == SlotFlags.PREVENTEQUIP)
return;
if (!clothing.Slots.HasFlag(args.SlotFlags))
diff --git a/Content.Server/Fluids/EntitySystems/SpillableSystem.cs b/Content.Server/Fluids/EntitySystems/SpillableSystem.cs
index c3c9819724..b862678e29 100644
--- a/Content.Server/Fluids/EntitySystems/SpillableSystem.cs
+++ b/Content.Server/Fluids/EntitySystems/SpillableSystem.cs
@@ -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;
diff --git a/Content.Server/Inventory/ServerInventorySystem.cs b/Content.Server/Inventory/ServerInventorySystem.cs
index 97ecdfd2c7..67d5b56c60 100644
--- a/Content.Server/Inventory/ServerInventorySystem.cs
+++ b/Content.Server/Inventory/ServerInventorySystem.cs
@@ -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;
diff --git a/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs b/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs
index 7bc87af292..09a84de0d8 100644
--- a/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs
+++ b/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs
@@ -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;
diff --git a/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs b/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs
index 9ed5e14e44..1233c83152 100644
--- a/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs
+++ b/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs
@@ -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
{
diff --git a/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs b/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs
index 3eb2e7db22..9f06a96e70 100644
--- a/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs
+++ b/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs
@@ -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
{
diff --git a/Content.Server/Speech/EntitySystems/AddAccentClothingSystem.cs b/Content.Server/Speech/EntitySystems/AddAccentClothingSystem.cs
index 74d390d62f..23dfaef923 100644
--- a/Content.Server/Speech/EntitySystems/AddAccentClothingSystem.cs
+++ b/Content.Server/Speech/EntitySystems/AddAccentClothingSystem.cs
@@ -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;
diff --git a/Content.Shared/Clothing/Components/SharedClothingComponent.cs b/Content.Shared/Clothing/Components/ClothingComponent.cs
similarity index 95%
rename from Content.Shared/Clothing/Components/SharedClothingComponent.cs
rename to Content.Shared/Clothing/Components/ClothingComponent.cs
index 0f69042b81..9ba64d2c94 100644
--- a/Content.Shared/Clothing/Components/SharedClothingComponent.cs
+++ b/Content.Shared/Clothing/Components/ClothingComponent.cs
@@ -10,8 +10,9 @@ namespace Content.Shared.Clothing.Components;
/// This handles entities which can be equipped.
///
[NetworkedComponent]
+[RegisterComponent]
[Access(typeof(ClothingSystem), typeof(InventorySystem))]
-public abstract class SharedClothingComponent : Component
+public sealed class ClothingComponent : Component
{
[DataField("clothingVisuals")]
[Access(typeof(ClothingSystem), typeof(InventorySystem), Other = AccessPermissions.ReadExecute)] // TODO remove execute permissions.
@@ -46,6 +47,8 @@ public abstract class SharedClothingComponent : Component
[ViewVariables(VVAccess.ReadWrite)]
[DataField("femaleMask")]
public FemaleClothingMask FemaleMask = FemaleClothingMask.UniformFull;
+
+ public string? InSlot;
}
[Serializable, NetSerializable]
diff --git a/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs b/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs
index a08040a672..194971694b 100644
--- a/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs
+++ b/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs
@@ -1,11 +1,12 @@
using Content.Shared.Clothing.Components;
using Content.Shared.Inventory;
+using Content.Shared.Inventory.Events;
using Content.Shared.Item;
using Robust.Shared.GameStates;
namespace Content.Shared.Clothing.EntitySystems;
-public sealed class ClothingSystem : EntitySystem
+public abstract class ClothingSystem : EntitySystem
{
[Dependency] private readonly SharedItemSystem _itemSys = default!;
@@ -13,16 +14,28 @@ public sealed class ClothingSystem : EntitySystem
{
base.Initialize();
- SubscribeLocalEvent(OnGetState);
- SubscribeLocalEvent(OnHandleState);
+ SubscribeLocalEvent(OnGetState);
+ SubscribeLocalEvent(OnHandleState);
+ SubscribeLocalEvent(OnGotEquipped);
+ SubscribeLocalEvent(OnGotUnequipped);
}
- private void OnGetState(EntityUid uid, SharedClothingComponent component, ref ComponentGetState args)
+ protected virtual void OnGotEquipped(EntityUid uid, ClothingComponent component, GotEquippedEvent args)
+ {
+ component.InSlot = args.Slot;
+ }
+
+ protected virtual void OnGotUnequipped(EntityUid uid, ClothingComponent component, GotUnequippedEvent args)
+ {
+ component.InSlot = null;
+ }
+
+ private void OnGetState(EntityUid uid, ClothingComponent component, ref ComponentGetState args)
{
args.State = new ClothingComponentState(component.EquippedPrefix);
}
- private void OnHandleState(EntityUid uid, SharedClothingComponent component, ref ComponentHandleState args)
+ private void OnHandleState(EntityUid uid, ClothingComponent component, ref ComponentHandleState args)
{
if (args.Current is ClothingComponentState state)
SetEquippedPrefix(uid, state.EquippedPrefix, component);
@@ -30,7 +43,7 @@ public sealed class ClothingSystem : EntitySystem
#region Public API
- public void SetEquippedPrefix(EntityUid uid, string? prefix, SharedClothingComponent? clothing = null)
+ public void SetEquippedPrefix(EntityUid uid, string? prefix, ClothingComponent? clothing = null)
{
if (!Resolve(uid, ref clothing, false))
return;
@@ -43,7 +56,7 @@ public sealed class ClothingSystem : EntitySystem
Dirty(clothing);
}
- public void SetSlots(EntityUid uid, SlotFlags slots, SharedClothingComponent? clothing = null)
+ public void SetSlots(EntityUid uid, SlotFlags slots, ClothingComponent? clothing = null)
{
if (!Resolve(uid, ref clothing))
return;
@@ -55,7 +68,7 @@ public sealed class ClothingSystem : EntitySystem
///
/// Copy all clothing specific visuals from another item.
///
- public void CopyVisuals(EntityUid uid, SharedClothingComponent otherClothing, SharedClothingComponent? clothing = null)
+ public void CopyVisuals(EntityUid uid, ClothingComponent otherClothing, ClothingComponent? clothing = null)
{
if (!Resolve(uid, ref clothing))
return;
diff --git a/Content.Shared/Clothing/EntitySystems/SharedChameleonClothingSystem.cs b/Content.Shared/Clothing/EntitySystems/SharedChameleonClothingSystem.cs
index 1f5f96f73c..ce823166ba 100644
--- a/Content.Shared/Clothing/EntitySystems/SharedChameleonClothingSystem.cs
+++ b/Content.Shared/Clothing/EntitySystems/SharedChameleonClothingSystem.cs
@@ -39,8 +39,8 @@ public abstract class SharedChameleonClothingSystem : EntitySystem
}
// clothing sprite logic
- if (TryComp(uid, out SharedClothingComponent? clothing) &&
- proto.TryGetComponent("Clothing", out SharedClothingComponent? otherClothing))
+ if (TryComp(uid, out ClothingComponent? clothing) &&
+ proto.TryGetComponent("Clothing", out ClothingComponent? otherClothing))
{
_clothingSystem.CopyVisuals(uid, otherClothing, clothing);
}
@@ -62,7 +62,7 @@ public abstract class SharedChameleonClothingSystem : EntitySystem
return false;
// check if it's valid clothing
- if (!proto.TryGetComponent("Clothing", out SharedClothingComponent? clothing))
+ if (!proto.TryGetComponent("Clothing", out ClothingComponent? clothing))
return false;
if (!clothing.Slots.HasFlag(chameleonSlot))
return false;
diff --git a/Content.Shared/Eye/Blinding/SharedBlindingSystem.cs b/Content.Shared/Eye/Blinding/SharedBlindingSystem.cs
index 094d99f910..49ca19159b 100644
--- a/Content.Shared/Eye/Blinding/SharedBlindingSystem.cs
+++ b/Content.Shared/Eye/Blinding/SharedBlindingSystem.cs
@@ -27,7 +27,7 @@ namespace Content.Shared.Eye.Blinding
private void OnEquipped(EntityUid uid, BlindfoldComponent component, GotEquippedEvent args)
{
- if (!TryComp(uid, out var clothing) || clothing.Slots == SlotFlags.PREVENTEQUIP) // we live in a society
+ if (!TryComp(uid, out var clothing) || clothing.Slots == SlotFlags.PREVENTEQUIP) // we live in a society
return;
// Is the clothing in its actual slot?
if (!clothing.Slots.HasFlag(args.SlotFlags))
@@ -51,7 +51,7 @@ namespace Content.Shared.Eye.Blinding
private void OnGlassesEquipped(EntityUid uid, VisionCorrectionComponent component, GotEquippedEvent args)
{
- if (!TryComp(uid, out var clothing) || clothing.Slots == SlotFlags.PREVENTEQUIP) // we live in a society
+ if (!TryComp(uid, out var clothing) || clothing.Slots == SlotFlags.PREVENTEQUIP) // we live in a society
return;
// Is the clothing in its actual slot?
if (!clothing.Slots.HasFlag(args.SlotFlags))
diff --git a/Content.Shared/Inventory/InventorySystem.Equip.cs b/Content.Shared/Inventory/InventorySystem.Equip.cs
index fa9c9edd1b..aeb0489bf7 100644
--- a/Content.Shared/Inventory/InventorySystem.Equip.cs
+++ b/Content.Shared/Inventory/InventorySystem.Equip.cs
@@ -38,7 +38,7 @@ public abstract partial class InventorySystem
SubscribeAllEvent(OnUseSlot);
}
- protected void QuickEquip(EntityUid uid, SharedClothingComponent component, UseInHandEvent args)
+ protected void QuickEquip(EntityUid uid, ClothingComponent component, UseInHandEvent args)
{
if (!TryComp(args.User, out InventoryComponent? inv)
|| !TryComp(args.User, out SharedHandsComponent? hands)
@@ -53,7 +53,7 @@ public abstract partial class InventorySystem
if (TryGetSlotEntity(args.User, slotDef.Name, out var slotEntity, inv))
{
// Item in slot has to be quick equipable as well
- if (TryComp(slotEntity, out SharedClothingComponent? item) && !item.QuickEquip)
+ if (TryComp(slotEntity, out ClothingComponent? item) && !item.QuickEquip)
continue;
if (!TryUnequip(args.User, slotDef.Name, true, inventory: inv))
@@ -157,11 +157,11 @@ public abstract partial class InventorySystem
}
public bool TryEquip(EntityUid uid, EntityUid itemUid, string slot, bool silent = false, bool force = false, bool predicted = false,
- InventoryComponent? inventory = null, SharedClothingComponent? clothing = null) =>
+ InventoryComponent? inventory = null, ClothingComponent? clothing = null) =>
TryEquip(uid, uid, itemUid, slot, silent, force, predicted, inventory, clothing);
public bool TryEquip(EntityUid actor, EntityUid target, EntityUid itemUid, string slot, bool silent = false, bool force = false, bool predicted = false,
- InventoryComponent? inventory = null, SharedClothingComponent? clothing = null)
+ InventoryComponent? inventory = null, ClothingComponent? clothing = null)
{
if (!Resolve(target, ref inventory, false))
{
@@ -250,11 +250,11 @@ public abstract partial class InventorySystem
public bool CanEquip(EntityUid uid, EntityUid itemUid, string slot, [NotNullWhen(false)] out string? reason,
SlotDefinition? slotDefinition = null, InventoryComponent? inventory = null,
- SharedClothingComponent? clothing = null, ItemComponent? item = null) =>
+ ClothingComponent? clothing = null, ItemComponent? item = null) =>
CanEquip(uid, uid, itemUid, slot, out reason, slotDefinition, inventory, clothing, item);
public bool CanEquip(EntityUid actor, EntityUid target, EntityUid itemUid, string slot, [NotNullWhen(false)] out string? reason, SlotDefinition? slotDefinition = null,
- InventoryComponent? inventory = null, SharedClothingComponent? clothing = null, ItemComponent? item = null)
+ InventoryComponent? inventory = null, ClothingComponent? clothing = null, ItemComponent? item = null)
{
reason = "inventory-component-can-equip-cannot";
if (!Resolve(target, ref inventory, false))
@@ -326,17 +326,17 @@ public abstract partial class InventorySystem
}
public bool TryUnequip(EntityUid uid, string slot, bool silent = false, bool force = false, bool predicted = false,
- InventoryComponent? inventory = null, SharedClothingComponent? clothing = null) => TryUnequip(uid, uid, slot, silent, force, predicted, inventory, clothing);
+ InventoryComponent? inventory = null, ClothingComponent? clothing = null) => TryUnequip(uid, uid, slot, silent, force, predicted, inventory, clothing);
public bool TryUnequip(EntityUid actor, EntityUid target, string slot, bool silent = false,
- bool force = false, bool predicted = false, InventoryComponent? inventory = null, SharedClothingComponent? clothing = null) =>
+ bool force = false, bool predicted = false, InventoryComponent? inventory = null, ClothingComponent? clothing = null) =>
TryUnequip(actor, target, slot, out _, silent, force, predicted, inventory, clothing);
public bool TryUnequip(EntityUid uid, string slot, [NotNullWhen(true)] out EntityUid? removedItem, bool silent = false, bool force = false, bool predicted = false,
- InventoryComponent? inventory = null, SharedClothingComponent? clothing = null) => TryUnequip(uid, uid, slot, out removedItem, silent, force, predicted, inventory, clothing);
+ InventoryComponent? inventory = null, ClothingComponent? clothing = null) => TryUnequip(uid, uid, slot, out removedItem, silent, force, predicted, inventory, clothing);
public bool TryUnequip(EntityUid actor, EntityUid target, string slot, [NotNullWhen(true)] out EntityUid? removedItem, bool silent = false,
- bool force = false, bool predicted = false, InventoryComponent? inventory = null, SharedClothingComponent? clothing = null)
+ bool force = false, bool predicted = false, InventoryComponent? inventory = null, ClothingComponent? clothing = null)
{
removedItem = null;
if (!Resolve(target, ref inventory, false))
diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/wintercoats.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/wintercoats.yml
index d801bc815a..208d139fee 100644
--- a/Resources/Prototypes/Entities/Clothing/OuterClothing/wintercoats.yml
+++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/wintercoats.yml
@@ -8,9 +8,10 @@
sprite: Clothing/OuterClothing/WinterCoats/coat.rsi
- type: Clothing
sprite: Clothing/OuterClothing/WinterCoats/coat.rsi
- size: 10
- type: TemperatureProtection
coefficient: 0.1
+ - type: Item
+ size: 10
- type: Armor
modifiers:
coefficients:
diff --git a/Resources/Prototypes/Entities/Objects/Materials/materials.yml b/Resources/Prototypes/Entities/Objects/Materials/materials.yml
index 8a27b2124a..a01f8336d9 100644
--- a/Resources/Prototypes/Entities/Objects/Materials/materials.yml
+++ b/Resources/Prototypes/Entities/Objects/Materials/materials.yml
@@ -156,9 +156,9 @@
state: bearpelt
- type: Item
sprite: Clothing/Head/Misc/hides.rsi
+ heldPrefix: bear
- type: Clothing
sprite: Clothing/Head/Misc/hides.rsi
- heldPrefix: bear
slots:
- HEAD
diff --git a/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml b/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml
index cabeb1d9d3..a687ef7d83 100644
--- a/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml
+++ b/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml
@@ -45,8 +45,7 @@
type: GasTankBoundUserInterface
- type: Clothing
sprite: Objects/Tanks/Jetpacks/blue.rsi
- QuickEquip: false
- size: 100
+ quickEquip: false
slots:
- Back
- type: GasTank
diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml
index 2a794b47c4..79cd9fc79f 100644
--- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml
+++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml
@@ -308,11 +308,12 @@
- state: mag-unshaded-0
map: ["enum.GunVisualLayers.MagUnshaded"]
shader: unshaded
+ - type: Item
+ heldPrefix: taser4
- type: Clothing
quickEquip: false
slots:
- Belt
- heldPrefix: taser4
- type: Gun
soundGunshot:
path: /Audio/Weapons/Guns/Gunshots/taser.ogg
diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml
index 88af331893..e1156ce4e8 100644
--- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml
+++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml
@@ -74,7 +74,7 @@
- type: Sprite
sprite: Objects/Weapons/Guns/Snipers/musket.rsi
- type: Clothing
- icon: Objects/Weapons/Guns/Snipers/musket.rsi
+ sprite: Objects/Weapons/Guns/Snipers/musket.rsi
- type: Gun
selectedMode: SemiAuto
availableModes:
@@ -95,7 +95,7 @@
- type: Sprite
sprite: Objects/Weapons/Guns/Snipers/flintlock.rsi
- type: Clothing
- icon: Objects/Weapons/Guns/Snipers/flintlock.rsi
+ sprite: Objects/Weapons/Guns/Snipers/flintlock.rsi
- type: BallisticAmmoProvider
whitelist:
tags:
diff --git a/Resources/Prototypes/Entities/Objects/Weapons/security.yml b/Resources/Prototypes/Entities/Objects/Weapons/security.yml
index 398d6e4376..3bfec3d583 100644
--- a/Resources/Prototypes/Entities/Objects/Weapons/security.yml
+++ b/Resources/Prototypes/Entities/Objects/Weapons/security.yml
@@ -30,7 +30,6 @@
size: 20
- type: Clothing
sprite: Objects/Weapons/Melee/stunbaton.rsi
- heldPrefix: off
quickEquip: false
slots:
- Belt