diff --git a/Content.Client/Clothing/ClothingComponent.cs b/Content.Client/Clothing/ClothingComponent.cs index cb7edaac69..28dfcf38a2 100644 --- a/Content.Client/Clothing/ClothingComponent.cs +++ b/Content.Client/Clothing/ClothingComponent.cs @@ -1,18 +1,15 @@ -using Content.Client.Items.Components; -using Content.Shared.Item; +using Content.Shared.Clothing.Components; using Robust.Shared.GameStates; namespace Content.Client.Clothing { [RegisterComponent] - [ComponentReference(typeof(SharedItemComponent))] - [ComponentReference(typeof(ItemComponent))] - [NetworkedComponent()] - public sealed class ClothingComponent : ItemComponent + [ComponentReference(typeof(SharedClothingComponent))] + public sealed class ClothingComponent : SharedClothingComponent { [ViewVariables(VVAccess.ReadWrite)] [DataField("femaleMask")] - public FemaleClothingMask FemaleMask { get; } = FemaleClothingMask.UniformFull; + public FemaleClothingMask FemaleMask = FemaleClothingMask.UniformFull; public string? InSlot; } diff --git a/Content.Client/Clothing/ClothingSystem.cs b/Content.Client/Clothing/ClothingVisualsSystem.cs similarity index 94% rename from Content.Client/Clothing/ClothingSystem.cs rename to Content.Client/Clothing/ClothingVisualsSystem.cs index f640ef028f..967a96d34d 100644 --- a/Content.Client/Clothing/ClothingSystem.cs +++ b/Content.Client/Clothing/ClothingVisualsSystem.cs @@ -4,6 +4,7 @@ using System.Linq; using Content.Client.Inventory; using Content.Shared.CharacterAppearance; using Content.Shared.Clothing; +using Content.Shared.Clothing.Components; using Content.Shared.Inventory; using Content.Shared.Inventory.Events; using Content.Shared.Item; @@ -16,7 +17,7 @@ using static Robust.Shared.GameObjects.SharedSpriteComponent; namespace Content.Client.Clothing; -public sealed class ClothingSystem : EntitySystem +public sealed class ClothingVisualsSystem : EntitySystem { /// /// This is a shitty hotfix written by me (Paul) to save me from renaming all files. @@ -52,13 +53,13 @@ public sealed class ClothingSystem : EntitySystem SubscribeLocalEvent(OnGotEquipped); SubscribeLocalEvent(OnGotUnequipped); - SubscribeLocalEvent(OnGetVisuals); + SubscribeLocalEvent(OnGetVisuals); SubscribeLocalEvent(OnVisualsChanged); SubscribeLocalEvent(OnDidUnequip); } - private void OnGetVisuals(EntityUid uid, SharedItemComponent item, GetEquipmentVisualsEvent args) + private void OnGetVisuals(EntityUid uid, ClothingComponent item, GetEquipmentVisualsEvent args) { if (!TryComp(args.Equipee, out ClientInventoryComponent? inventory)) return; @@ -99,15 +100,15 @@ public sealed class ClothingSystem : EntitySystem /// /// Useful for lazily adding clothing sprites without modifying yaml. And for backwards compatibility. /// - private bool TryGetDefaultVisuals(EntityUid uid, SharedItemComponent item, string slot, string? speciesId, + private bool TryGetDefaultVisuals(EntityUid uid, ClothingComponent clothing, string slot, string? speciesId, [NotNullWhen(true)] out List? layers) { layers = null; RSI? rsi = null; - if (item.RsiPath != null) - rsi = _cache.GetResource(TextureRoot / item.RsiPath).RSI; + if (clothing.RsiPath != null) + rsi = _cache.GetResource(TextureRoot / clothing.RsiPath).RSI; else if (TryComp(uid, out SpriteComponent? sprite)) rsi = sprite.BaseRSI; @@ -117,9 +118,9 @@ public sealed class ClothingSystem : EntitySystem var correctedSlot = slot; TemporarySlotMap.TryGetValue(correctedSlot, out correctedSlot); - var state = (item.EquippedPrefix == null) + var state = (clothing.EquippedPrefix == null) ? $"equipped-{correctedSlot}" - : $"{item.EquippedPrefix}-equipped-{correctedSlot}"; + : $"{clothing.EquippedPrefix}-equipped-{correctedSlot}"; // species specific if (speciesId != null && rsi.TryGetState($"{state}-{speciesId}", out _)) diff --git a/Content.Client/Inventory/ClientInventorySystem.cs b/Content.Client/Inventory/ClientInventorySystem.cs index ce9aae6ca4..1207556b54 100644 --- a/Content.Client/Inventory/ClientInventorySystem.cs +++ b/Content.Client/Inventory/ClientInventorySystem.cs @@ -36,7 +36,7 @@ namespace Content.Client.Inventory [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly IConfigurationManager _config = default!; [Dependency] private readonly IItemSlotManager _itemSlotManager = default!; - [Dependency] private readonly ClothingSystem _clothingSystem = default!; + [Dependency] private readonly ClothingVisualsSystem _clothingVisualsSystem = default!; public const int ButtonSize = 64; private const int ButtonSeparation = 4; @@ -165,7 +165,7 @@ namespace Content.Client.Inventory private void OnInit(EntityUid uid, ClientInventoryComponent component, ComponentInit args) { - _clothingSystem.InitClothing(uid, component); + _clothingVisualsSystem.InitClothing(uid, component); if (!TryGetUIElements(uid, out var window, out var bottomLeft, out var bottomRight, out var topQuick, component)) diff --git a/Content.Client/Items/Components/ItemComponent.cs b/Content.Client/Items/Components/ItemComponent.cs deleted file mode 100644 index fce89fb009..0000000000 --- a/Content.Client/Items/Components/ItemComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Content.Shared.Item; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; - -namespace Content.Client.Items.Components -{ - [RegisterComponent] - [ComponentReference(typeof(SharedItemComponent))] - [Virtual] - public class ItemComponent : SharedItemComponent { } -} diff --git a/Content.Client/Items/Systems/ItemSystem.cs b/Content.Client/Items/Systems/ItemSystem.cs index 333be889db..2277712235 100644 --- a/Content.Client/Items/Systems/ItemSystem.cs +++ b/Content.Client/Items/Systems/ItemSystem.cs @@ -1,11 +1,11 @@ +using System.Diagnostics.CodeAnalysis; +using System.Linq; using Content.Shared.Hands; using Content.Shared.Item; using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.ResourceManagement; using Robust.Shared.Containers; -using System.Diagnostics.CodeAnalysis; -using System.Linq; using static Robust.Shared.GameObjects.SharedSpriteComponent; namespace Content.Client.Items.Systems; @@ -19,18 +19,16 @@ public sealed class ItemSystem : SharedItemSystem { base.Initialize(); - SubscribeLocalEvent(OnGetVisuals); + SubscribeLocalEvent(OnGetVisuals); } #region InhandVisuals + /// /// When an items visual state changes, notify and entities that are holding this item that their sprite may need updating. /// - public override void VisualsChanged(EntityUid uid, SharedItemComponent? item = null) + public override void VisualsChanged(EntityUid uid) { - if (!Resolve(uid, ref item, false)) - return; - // if the item is in a container, it might be equipped to hands or inventory slots --> update visuals. if (_containerSystem.TryGetContainingContainer(uid, out var container)) RaiseLocalEvent(container.Owner, new VisualsChangedEvent(uid, container.ID), true); @@ -39,12 +37,12 @@ public sealed class ItemSystem : SharedItemSystem /// /// An entity holding this item is requesting visual information for in-hand sprites. /// - private void OnGetVisuals(EntityUid uid, SharedItemComponent item, GetInhandVisualsEvent args) + private void OnGetVisuals(EntityUid uid, ItemComponent item, GetInhandVisualsEvent args) { var defaultKey = $"inhand-{args.Location.ToString().ToLowerInvariant()}"; // try get explicit visuals - if (item.InhandVisuals == null || !item.InhandVisuals.TryGetValue(args.Location, out var layers)) + if (!item.InhandVisuals.TryGetValue(args.Location, out var layers)) { // get defaults if (!TryGetDefaultVisuals(uid, item, defaultKey, out layers)) @@ -71,7 +69,7 @@ public sealed class ItemSystem : SharedItemSystem /// /// Useful for lazily adding in-hand sprites without modifying yaml. And backwards compatibility. /// - private bool TryGetDefaultVisuals(EntityUid uid, SharedItemComponent item, string defaultKey, [NotNullWhen(true)] out List? result) + private bool TryGetDefaultVisuals(EntityUid uid, ItemComponent item, string defaultKey, [NotNullWhen(true)] out List? result) { result = null; @@ -85,9 +83,9 @@ public sealed class ItemSystem : SharedItemSystem if (rsi == null || rsi.Path == null) return false; - var state = (item.EquippedPrefix == null) + var state = (item.HeldPrefix == null) ? defaultKey - : $"{item.EquippedPrefix}-{defaultKey}"; + : $"{item.HeldPrefix}-{defaultKey}"; if (!rsi.TryGetState(state, out var _)) return false; diff --git a/Content.Client/Light/HandheldLightSystem.cs b/Content.Client/Light/HandheldLightSystem.cs index 68f4438b20..1f248c497a 100644 --- a/Content.Client/Light/HandheldLightSystem.cs +++ b/Content.Client/Light/HandheldLightSystem.cs @@ -30,10 +30,9 @@ public sealed class HandheldLightSystem : EntitySystem // really hand-held lights should be using a separate unshaded layer. (see FlashlightVisualizer) // this prefix stuff is largely for backwards compatibility with RSIs/yamls that have not been updated. - if (component.AddPrefix && TryComp(uid, out SharedItemComponent? item)) + if (component.AddPrefix && TryComp(uid, out ItemComponent? item)) { - item.EquippedPrefix = state.Activated ? "on" : "off"; - _itemSys.VisualsChanged(uid); + _itemSys.SetHeldPrefix(uid, state.Activated ? "on" : "off", item); } } } diff --git a/Content.Client/Movement/Systems/JetpackSystem.cs b/Content.Client/Movement/Systems/JetpackSystem.cs index 727c3cefa3..8c48b55694 100644 --- a/Content.Client/Movement/Systems/JetpackSystem.cs +++ b/Content.Client/Movement/Systems/JetpackSystem.cs @@ -1,4 +1,5 @@ using Content.Client.Clothing; +using Content.Shared.Clothing.EntitySystems; using Content.Shared.Movement.Components; using Content.Shared.Movement.Systems; using Content.Shared.Weapons.Ranged.Systems; @@ -14,6 +15,7 @@ public sealed class JetpackSystem : SharedJetpackSystem { [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly IMapManager _mapManager = default!; + [Dependency] private readonly ClothingSystem _clothing = default!; public override void Initialize() { @@ -35,7 +37,7 @@ public sealed class JetpackSystem : SharedJetpackSystem args.Sprite?.LayerSetState(0, state); if (TryComp(uid, out var clothing)) - clothing.EquippedPrefix = enabled ? "on" : null; + _clothing.SetEquippedPrefix(uid, enabled ? "on" : null, clothing); } public override void Update(float frameTime) diff --git a/Content.Client/Storage/UI/StorageWindow.cs b/Content.Client/Storage/UI/StorageWindow.cs index b8629eaa55..5a2b28a9ee 100644 --- a/Content.Client/Storage/UI/StorageWindow.cs +++ b/Content.Client/Storage/UI/StorageWindow.cs @@ -4,6 +4,7 @@ using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; using Content.Client.Items.Components; using Content.Client.UserInterface.Controls; +using Content.Shared.Item; using Robust.Client.UserInterface; using static Robust.Client.UserInterface.Controls.BoxContainer; using static Content.Shared.Storage.SharedStorageComponent; diff --git a/Content.Client/Toggleable/ToggleableLightVisualsSystem.cs b/Content.Client/Toggleable/ToggleableLightVisualsSystem.cs index f87a618dd5..6a3cccb0de 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(ClothingSystem) }); + SubscribeLocalEvent(OnGetEquipmentVisuals, after: new[] { typeof(ClothingVisualsSystem) }); } 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 37eaedfb65..168cbcd9be 100644 --- a/Content.IntegrationTests/Tests/DeleteInventoryTest.cs +++ b/Content.IntegrationTests/Tests/DeleteInventoryTest.cs @@ -2,6 +2,7 @@ using Content.Server.Clothing.Components; using Content.Server.Inventory; using Content.Shared.Inventory; +using Content.Shared.Item; using NUnit.Framework; using Robust.Shared.Containers; using Robust.Shared.GameObjects; @@ -35,8 +36,8 @@ namespace Content.IntegrationTests.Tests entMgr.AddComponent(container); var child = entMgr.SpawnEntity(null, MapCoordinates.Nullspace); - var item = entMgr.AddComponent(child); - item.SlotFlags = SlotFlags.HEAD; + var item = entMgr.AddComponent(child); + item.Slots = SlotFlags.HEAD; // Equip item. Assert.That(invSystem.TryEquip(container, child, "head"), Is.True); diff --git a/Content.IntegrationTests/Tests/HumanInventoryUniformSlotsTest.cs b/Content.IntegrationTests/Tests/HumanInventoryUniformSlotsTest.cs index 4ebb5cd38c..bc1cce5222 100644 --- a/Content.IntegrationTests/Tests/HumanInventoryUniformSlotsTest.cs +++ b/Content.IntegrationTests/Tests/HumanInventoryUniformSlotsTest.cs @@ -26,7 +26,8 @@ namespace Content.IntegrationTests.Tests id: UniformDummy components: - type: Clothing - Slots: [innerclothing] + slots: [innerclothing] + - type: Item size: 5 - type: entity @@ -34,8 +35,9 @@ namespace Content.IntegrationTests.Tests id: IDCardDummy components: - type: Clothing - Slots: + slots: - idcard + - type: Item size: 5 - type: IdCard diff --git a/Content.IntegrationTests/Tests/Interaction/Click/InteractionSystemTests.cs b/Content.IntegrationTests/Tests/Interaction/Click/InteractionSystemTests.cs index be084762cc..29de7ba73e 100644 --- a/Content.IntegrationTests/Tests/Interaction/Click/InteractionSystemTests.cs +++ b/Content.IntegrationTests/Tests/Interaction/Click/InteractionSystemTests.cs @@ -5,6 +5,7 @@ using Content.Server.Interaction; using Content.Shared.Hands.Components; using Content.Shared.Hands.EntitySystems; using Content.Shared.Interaction; +using Content.Shared.Item; using Content.Shared.Weapons.Melee; using NUnit.Framework; using Robust.Shared.Containers; @@ -13,7 +14,6 @@ using Robust.Shared.IoC; using Robust.Shared.Map; using Robust.Shared.Maths; using Robust.Shared.Reflection; -using ItemComponent = Content.Server.Clothing.Components.ItemComponent; namespace Content.IntegrationTests.Tests.Interaction.Click { diff --git a/Content.IntegrationTests/Tests/InventoryHelpersTest.cs b/Content.IntegrationTests/Tests/InventoryHelpersTest.cs index 54400ab61d..5ef3c2990d 100644 --- a/Content.IntegrationTests/Tests/InventoryHelpersTest.cs +++ b/Content.IntegrationTests/Tests/InventoryHelpersTest.cs @@ -28,7 +28,7 @@ namespace Content.IntegrationTests.Tests id: InventoryJumpsuitJanitorDummy components: - type: Clothing - Slots: [innerclothing] + slots: [innerclothing] - type: entity name: InventoryIDCardDummy @@ -36,7 +36,7 @@ namespace Content.IntegrationTests.Tests components: - type: Clothing QuickEquip: false - Slots: + slots: - idcard - type: PDA "; diff --git a/Content.Server/AI/Operators/Inventory/PickupEntityOperator.cs b/Content.Server/AI/Operators/Inventory/PickupEntityOperator.cs index 38479ac52f..ef76ed1ec9 100644 --- a/Content.Server/AI/Operators/Inventory/PickupEntityOperator.cs +++ b/Content.Server/AI/Operators/Inventory/PickupEntityOperator.cs @@ -25,7 +25,7 @@ namespace Content.Server.AI.Operators.Inventory var handsSys = sysMan.GetEntitySystem(); if (entMan.Deleted(_target) - || !entMan.HasComponent(_target) + || !entMan.HasComponent(_target) || _target.IsInContainer() || !interactionSystem.InRangeUnobstructed(_owner, _target, popup: true)) { @@ -35,7 +35,7 @@ namespace Content.Server.AI.Operators.Inventory // select empty hand if (!handsSys.TrySelectEmptyHand(_owner)) return Outcome.Failed; - + interactionSystem.InteractHand(_owner, _target); return Outcome.Success; } diff --git a/Content.Server/AI/Utility/Considerations/Clothing/ClothingInInventoryCon.cs b/Content.Server/AI/Utility/Considerations/Clothing/ClothingInInventoryCon.cs index d49f8d6394..dbedc4dc9a 100644 --- a/Content.Server/AI/Utility/Considerations/Clothing/ClothingInInventoryCon.cs +++ b/Content.Server/AI/Utility/Considerations/Clothing/ClothingInInventoryCon.cs @@ -29,7 +29,7 @@ namespace Content.Server.AI.Utility.Considerations.Clothing continue; } - if ((clothingComponent.SlotFlags & slotDef.SlotFlags) != 0) + if ((clothingComponent.Slots & slotDef.SlotFlags) != 0) { return 1.0f; } diff --git a/Content.Server/AI/Utility/Considerations/Inventory/CanPutTargetInInventoryCon.cs b/Content.Server/AI/Utility/Considerations/Inventory/CanPutTargetInInventoryCon.cs index 4d47356d45..0b5c86484f 100644 --- a/Content.Server/AI/Utility/Considerations/Inventory/CanPutTargetInInventoryCon.cs +++ b/Content.Server/AI/Utility/Considerations/Inventory/CanPutTargetInInventoryCon.cs @@ -14,7 +14,7 @@ namespace Content.Server.AI.Utility.Considerations.Inventory // If not then check if we have a free hand var target = context.GetState().GetValue(); - if (target == null || !IoCManager.Resolve().HasComponent(target)) + if (target == null || !IoCManager.Resolve().HasComponent(target)) { return 0.0f; } diff --git a/Content.Server/AI/Utility/Considerations/Inventory/TargetInOurInventoryCon.cs b/Content.Server/AI/Utility/Considerations/Inventory/TargetInOurInventoryCon.cs index 0eaccfcfea..fc1ccd18a5 100644 --- a/Content.Server/AI/Utility/Considerations/Inventory/TargetInOurInventoryCon.cs +++ b/Content.Server/AI/Utility/Considerations/Inventory/TargetInOurInventoryCon.cs @@ -11,7 +11,7 @@ namespace Content.Server.AI.Utility.Considerations.Inventory { var target = context.GetState().GetValue(); - if (target == null || !IoCManager.Resolve().HasComponent(target)) + if (target == null || !IoCManager.Resolve().HasComponent(target)) { return 0.0f; } diff --git a/Content.Server/AI/Utility/ExpandableActions/Clothing/Gloves/EquipAnyGlovesExp.cs b/Content.Server/AI/Utility/ExpandableActions/Clothing/Gloves/EquipAnyGlovesExp.cs index 79994cced2..65eeb013dd 100644 --- a/Content.Server/AI/Utility/ExpandableActions/Clothing/Gloves/EquipAnyGlovesExp.cs +++ b/Content.Server/AI/Utility/ExpandableActions/Clothing/Gloves/EquipAnyGlovesExp.cs @@ -35,7 +35,7 @@ namespace Content.Server.AI.Utility.ExpandableActions.Clothing.Gloves foreach (var entity in context.GetState().GetValue()) { if (IoCManager.Resolve().TryGetComponent(entity, out ClothingComponent? clothing) && - (clothing.SlotFlags & SlotFlags.GLOVES) != 0) + (clothing.Slots & SlotFlags.GLOVES) != 0) { yield return new EquipGloves {Owner = owner, Target = entity, Bonus = Bonus}; } diff --git a/Content.Server/AI/Utility/ExpandableActions/Clothing/Gloves/PickUpAnyNearbyGlovesExp.cs b/Content.Server/AI/Utility/ExpandableActions/Clothing/Gloves/PickUpAnyNearbyGlovesExp.cs index 50ea0ee9ca..1d7ec7637b 100644 --- a/Content.Server/AI/Utility/ExpandableActions/Clothing/Gloves/PickUpAnyNearbyGlovesExp.cs +++ b/Content.Server/AI/Utility/ExpandableActions/Clothing/Gloves/PickUpAnyNearbyGlovesExp.cs @@ -33,7 +33,7 @@ namespace Content.Server.AI.Utility.ExpandableActions.Clothing.Gloves foreach (var entity in context.GetState().GetValue()) { if (IoCManager.Resolve().TryGetComponent(entity, out ClothingComponent? clothing) && - (clothing.SlotFlags & SlotFlags.GLOVES) != 0) + (clothing.Slots & SlotFlags.GLOVES) != 0) { yield return new PickUpGloves {Owner = owner, Target = entity, Bonus = Bonus}; } diff --git a/Content.Server/AI/Utility/ExpandableActions/Clothing/Head/EquipAnyHeadExp.cs b/Content.Server/AI/Utility/ExpandableActions/Clothing/Head/EquipAnyHeadExp.cs index ee2658ecde..c15ca9e80e 100644 --- a/Content.Server/AI/Utility/ExpandableActions/Clothing/Head/EquipAnyHeadExp.cs +++ b/Content.Server/AI/Utility/ExpandableActions/Clothing/Head/EquipAnyHeadExp.cs @@ -34,7 +34,7 @@ namespace Content.Server.AI.Utility.ExpandableActions.Clothing.Head foreach (var entity in context.GetState().GetValue()) { if (IoCManager.Resolve().TryGetComponent(entity, out ClothingComponent? clothing) && - (clothing.SlotFlags & SlotFlags.HEAD) != 0) + (clothing.Slots & SlotFlags.HEAD) != 0) { yield return new EquipHead {Owner = owner, Target = entity, Bonus = Bonus}; } diff --git a/Content.Server/AI/Utility/ExpandableActions/Clothing/Head/PickUpAnyNearbyHeadExp.cs b/Content.Server/AI/Utility/ExpandableActions/Clothing/Head/PickUpAnyNearbyHeadExp.cs index 74b95c917b..d159a99741 100644 --- a/Content.Server/AI/Utility/ExpandableActions/Clothing/Head/PickUpAnyNearbyHeadExp.cs +++ b/Content.Server/AI/Utility/ExpandableActions/Clothing/Head/PickUpAnyNearbyHeadExp.cs @@ -33,7 +33,7 @@ namespace Content.Server.AI.Utility.ExpandableActions.Clothing.Head foreach (var entity in context.GetState().GetValue()) { if (IoCManager.Resolve().TryGetComponent(entity, out ClothingComponent? clothing) && - (clothing.SlotFlags & SlotFlags.HEAD) != 0) + (clothing.Slots & SlotFlags.HEAD) != 0) { yield return new PickUpHead {Owner = owner, Target = entity, Bonus = Bonus}; } diff --git a/Content.Server/AI/Utility/ExpandableActions/Clothing/OuterClothing/EquipAnyOuterClothingExp.cs b/Content.Server/AI/Utility/ExpandableActions/Clothing/OuterClothing/EquipAnyOuterClothingExp.cs index d8f37644d9..bc20c66401 100644 --- a/Content.Server/AI/Utility/ExpandableActions/Clothing/OuterClothing/EquipAnyOuterClothingExp.cs +++ b/Content.Server/AI/Utility/ExpandableActions/Clothing/OuterClothing/EquipAnyOuterClothingExp.cs @@ -35,7 +35,7 @@ namespace Content.Server.AI.Utility.ExpandableActions.Clothing.OuterClothing foreach (var entity in context.GetState().GetValue()) { if (IoCManager.Resolve().TryGetComponent(entity, out ClothingComponent? clothing) && - (clothing.SlotFlags & SlotFlags.OUTERCLOTHING) != 0) + (clothing.Slots & SlotFlags.OUTERCLOTHING) != 0) { yield return new EquipOuterClothing {Owner = owner, Target = entity, Bonus = Bonus}; } diff --git a/Content.Server/AI/Utility/ExpandableActions/Clothing/OuterClothing/PickUpAnyNearbyOuterClothingExp.cs b/Content.Server/AI/Utility/ExpandableActions/Clothing/OuterClothing/PickUpAnyNearbyOuterClothingExp.cs index a1c6164337..156757f2ab 100644 --- a/Content.Server/AI/Utility/ExpandableActions/Clothing/OuterClothing/PickUpAnyNearbyOuterClothingExp.cs +++ b/Content.Server/AI/Utility/ExpandableActions/Clothing/OuterClothing/PickUpAnyNearbyOuterClothingExp.cs @@ -34,7 +34,7 @@ namespace Content.Server.AI.Utility.ExpandableActions.Clothing.OuterClothing foreach (var entity in context.GetState().GetValue()) { if (IoCManager.Resolve().TryGetComponent(entity, out ClothingComponent? clothing) && - (clothing.SlotFlags & SlotFlags.OUTERCLOTHING) != 0) + (clothing.Slots & SlotFlags.OUTERCLOTHING) != 0) { yield return new PickUpOuterClothing {Owner = owner, Target = entity, Bonus = Bonus}; } diff --git a/Content.Server/AI/Utility/ExpandableActions/Clothing/Shoes/EquipAnyShoesExp.cs b/Content.Server/AI/Utility/ExpandableActions/Clothing/Shoes/EquipAnyShoesExp.cs index 84235e8cad..d0493fe736 100644 --- a/Content.Server/AI/Utility/ExpandableActions/Clothing/Shoes/EquipAnyShoesExp.cs +++ b/Content.Server/AI/Utility/ExpandableActions/Clothing/Shoes/EquipAnyShoesExp.cs @@ -35,7 +35,7 @@ namespace Content.Server.AI.Utility.ExpandableActions.Clothing.Shoes foreach (var entity in context.GetState().GetValue()) { if (IoCManager.Resolve().TryGetComponent(entity, out ClothingComponent? clothing) && - (clothing.SlotFlags & SlotFlags.FEET) != 0) + (clothing.Slots & SlotFlags.FEET) != 0) { yield return new EquipShoes {Owner = owner, Target = entity, Bonus = Bonus}; } diff --git a/Content.Server/AI/Utility/ExpandableActions/Clothing/Shoes/PickUpAnyNearbyShoesExp.cs b/Content.Server/AI/Utility/ExpandableActions/Clothing/Shoes/PickUpAnyNearbyShoesExp.cs index f60402a1d9..6512c16ebe 100644 --- a/Content.Server/AI/Utility/ExpandableActions/Clothing/Shoes/PickUpAnyNearbyShoesExp.cs +++ b/Content.Server/AI/Utility/ExpandableActions/Clothing/Shoes/PickUpAnyNearbyShoesExp.cs @@ -34,7 +34,7 @@ namespace Content.Server.AI.Utility.ExpandableActions.Clothing.Shoes foreach (var entity in context.GetState().GetValue()) { if (IoCManager.Resolve().TryGetComponent(entity, out ClothingComponent? clothing) && - (clothing.SlotFlags & SlotFlags.FEET) != 0) + (clothing.Slots & SlotFlags.FEET) != 0) { yield return new PickUpShoes {Owner = owner, Target = entity, Bonus = Bonus}; } diff --git a/Content.Server/Chat/SuicideSystem.cs b/Content.Server/Chat/SuicideSystem.cs index 54e78115a1..f7f35e2b87 100644 --- a/Content.Server/Chat/SuicideSystem.cs +++ b/Content.Server/Chat/SuicideSystem.cs @@ -82,7 +82,7 @@ namespace Content.Server.Chat return; } - var itemQuery = GetEntityQuery(); + var itemQuery = GetEntityQuery(); // Suicide by nearby entity (ex: Microwave) foreach (var entity in _entityLookupSystem.GetEntitiesInRange(victim, 1, LookupFlags.Approximate | LookupFlags.Anchored)) diff --git a/Content.Server/Clothing/Components/ClothingComponent.cs b/Content.Server/Clothing/Components/ClothingComponent.cs index 93db5d6e58..b4f36b9e13 100644 --- a/Content.Server/Clothing/Components/ClothingComponent.cs +++ b/Content.Server/Clothing/Components/ClothingComponent.cs @@ -1,22 +1,13 @@ +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(SharedItemComponent))] - [Virtual] - public class ItemComponent : SharedItemComponent{} - - [RegisterComponent] - [NetworkedComponent] - [ComponentReference(typeof(SharedItemComponent))] - public sealed class ClothingComponent : ItemComponent + [ComponentReference(typeof(SharedClothingComponent))] + public sealed class ClothingComponent : SharedClothingComponent { - [DataField("HeatResistance")] - private int _heatResistance = 323; - - [ViewVariables(VVAccess.ReadWrite)] - public int HeatResistance => _heatResistance; } } diff --git a/Content.Server/Clothing/Components/GloveHeatResistanceComponent.cs b/Content.Server/Clothing/Components/GloveHeatResistanceComponent.cs new file mode 100644 index 0000000000..ce3d46e97f --- /dev/null +++ b/Content.Server/Clothing/Components/GloveHeatResistanceComponent.cs @@ -0,0 +1,12 @@ +namespace Content.Server.Clothing.Components; + +/// +/// TODO this needs removed somehow. +/// Handles 'heat resistance' for gloves touching bulbs and that's it, ick. +/// +[RegisterComponent] +public sealed class GloveHeatResistanceComponent : Component +{ + [DataField("heatResistance")] + public int HeatResistance = 323; +} diff --git a/Content.Server/Clothing/MagbootsSystem.cs b/Content.Server/Clothing/MagbootsSystem.cs index caae1ee2d7..1b3820d8d7 100644 --- a/Content.Server/Clothing/MagbootsSystem.cs +++ b/Content.Server/Clothing/MagbootsSystem.cs @@ -1,7 +1,11 @@ using Content.Server.Atmos.Components; +using Content.Server.Clothing.Components; using Content.Shared.Alert; using Content.Shared.Clothing; +using Content.Shared.Clothing.EntitySystems; +using Content.Shared.Inventory; using Content.Shared.Inventory.Events; +using Robust.Shared.Containers; using Robust.Shared.GameStates; using static Content.Shared.Clothing.MagbootsComponent; diff --git a/Content.Server/Clothing/MaskSystem.cs b/Content.Server/Clothing/MaskSystem.cs index b03787288e..c9f92a76b4 100644 --- a/Content.Server/Clothing/MaskSystem.cs +++ b/Content.Server/Clothing/MaskSystem.cs @@ -13,6 +13,7 @@ using Content.Server.Disease.Components; using Content.Server.IdentityManagement; using Content.Server.Nutrition.EntitySystems; using Content.Server.Popups; +using Content.Shared.Clothing.EntitySystems; using Content.Shared.IdentityManagement.Components; using Robust.Shared.Player; @@ -26,6 +27,7 @@ namespace Content.Server.Clothing [Dependency] private readonly InventorySystem _inventorySystem = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly IdentitySystem _identity = default!; + [Dependency] private readonly ClothingSystem _clothing = default!; public override void Initialize() { @@ -79,11 +81,10 @@ namespace Content.Server.Clothing private void ToggleMaskComponents(EntityUid uid, MaskComponent mask, EntityUid wearer, bool isEquip = false) { //toggle visuals - if (TryComp(mask.Owner, out var item)) + if (TryComp(mask.Owner, out var clothing)) { //TODO: sprites for 'pulled down' state. defaults to invisible due to no sprite with this prefix - item.EquippedPrefix = mask.IsToggled ? "toggled" : null; - Dirty(item); + _clothing.SetEquippedPrefix(uid, mask.IsToggled ? "toggled" : null, clothing); } // toggle ingestion blocking diff --git a/Content.Server/Conveyor/ConveyorSystem.cs b/Content.Server/Conveyor/ConveyorSystem.cs index 7925c7730d..32afa82395 100644 --- a/Content.Server/Conveyor/ConveyorSystem.cs +++ b/Content.Server/Conveyor/ConveyorSystem.cs @@ -68,7 +68,7 @@ namespace Content.Server.Conveyor public bool CanRun(ConveyorComponent component) { return component.State != ConveyorState.Off && - !EntityManager.HasComponent(component.Owner) && + !EntityManager.HasComponent(component.Owner) && this.IsPowered(component.Owner, EntityManager); } } diff --git a/Content.Server/Disease/DiseaseSystem.cs b/Content.Server/Disease/DiseaseSystem.cs index f60b3fe346..7e0571b09f 100644 --- a/Content.Server/Disease/DiseaseSystem.cs +++ b/Content.Server/Disease/DiseaseSystem.cs @@ -199,7 +199,7 @@ namespace Content.Server.Disease if (!TryComp(uid, out var clothing)) return; // Is the clothing in its actual slot? - if (!clothing.SlotFlags.HasFlag(args.SlotFlags)) + if (!clothing.Slots.HasFlag(args.SlotFlags)) return; // Give the user the component's disease resist if(TryComp(args.Equipee, out var carrier)) diff --git a/Content.Server/Disposal/Unit/Components/DisposalHolderComponent.cs b/Content.Server/Disposal/Unit/Components/DisposalHolderComponent.cs index 3b41e7e46f..e4602de4c2 100644 --- a/Content.Server/Disposal/Unit/Components/DisposalHolderComponent.cs +++ b/Content.Server/Disposal/Unit/Components/DisposalHolderComponent.cs @@ -73,7 +73,7 @@ namespace Content.Server.Disposal.Unit.Components return false; } - return _entMan.HasComponent(entity) || + return _entMan.HasComponent(entity) || _entMan.HasComponent(entity); } diff --git a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs index 3e52655cd2..a5aa6a443f 100644 --- a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs +++ b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs @@ -455,7 +455,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems { // TODO: We need to use a specific collision method (which sloth hasn't coded yet) for actual bounds overlaps. // Check for itemcomp as we won't just block the disposal unit "sleeping" for something it can't collide with anyway. - if (!EntityManager.HasComponent(uid) && body.GetWorldAABB().Intersects(disposalsBounds!.Value)) continue; + if (!EntityManager.HasComponent(uid) && body.GetWorldAABB().Intersects(disposalsBounds!.Value)) continue; component.RecentlyEjected.RemoveAt(i); } } diff --git a/Content.Server/Drone/DroneSystem.cs b/Content.Server/Drone/DroneSystem.cs index 416b58d986..db77db8e06 100644 --- a/Content.Server/Drone/DroneSystem.cs +++ b/Content.Server/Drone/DroneSystem.cs @@ -58,7 +58,7 @@ namespace Content.Server.Drone if (args.Target != null && !HasComp(args.Target) && NonDronesInRange(uid, component)) args.Cancel(); - if (HasComp(args.Target) && !HasComp(args.Target)) + if (HasComp(args.Target) && !HasComp(args.Target)) { if (!_tagSystem.HasAnyTag(args.Target.Value, "DroneUsable", "Trash")) args.Cancel(); diff --git a/Content.Server/Fluids/EntitySystems/SpillableSystem.cs b/Content.Server/Fluids/EntitySystems/SpillableSystem.cs index 2017885667..8d043e1ff6 100644 --- a/Content.Server/Fluids/EntitySystems/SpillableSystem.cs +++ b/Content.Server/Fluids/EntitySystems/SpillableSystem.cs @@ -56,7 +56,7 @@ public sealed class SpillableSystem : EntitySystem // check if entity was actually used as clothing // not just taken in pockets or something - var isCorrectSlot = clothing.SlotFlags.HasFlag(args.SlotFlags); + var isCorrectSlot = clothing.Slots.HasFlag(args.SlotFlags); if (!isCorrectSlot) return; if (!_solutionContainerSystem.TryGetSolution(uid, component.SolutionName, out var solution)) diff --git a/Content.Server/Interaction/InteractionSystem.cs b/Content.Server/Interaction/InteractionSystem.cs index ef839529d2..232ed960ba 100644 --- a/Content.Server/Interaction/InteractionSystem.cs +++ b/Content.Server/Interaction/InteractionSystem.cs @@ -252,7 +252,7 @@ namespace Content.Server.Interaction } } } - else if (!wideAttack && target != null && HasComp(target.Value)) + else if (!wideAttack && target != null && HasComp(target.Value)) { // We pick up items if our hand is empty, even if we're in combat mode. InteractHand(user, target.Value); diff --git a/Content.Server/Items/ItemSystem.cs b/Content.Server/Item/ItemSystem.cs similarity index 65% rename from Content.Server/Items/ItemSystem.cs rename to Content.Server/Item/ItemSystem.cs index 51e62044db..9053ec05cd 100644 --- a/Content.Server/Items/ItemSystem.cs +++ b/Content.Server/Item/ItemSystem.cs @@ -1,8 +1,7 @@ -using Content.Shared.Item; +using Content.Shared.Item; namespace Content.Server.Item; public sealed class ItemSystem : SharedItemSystem { - // Ello Guvna } diff --git a/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs b/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs index e234e7b6a5..0d9bb0701b 100644 --- a/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs @@ -107,7 +107,7 @@ namespace Content.Server.Kitchen.EntitySystems return; } - if (!HasComp(args.Used)) + if (!HasComp(args.Used)) { _popupSystem.PopupEntity(Loc.GetString("microwave-component-interact-using-transfer-fail"), uid, Filter.Entities(args.User)); return; diff --git a/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs b/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs index 43b576727b..5a9b0453bf 100644 --- a/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs +++ b/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs @@ -1,5 +1,6 @@ using Content.Server.Clothing.Components; using Content.Server.Light.Components; +using Content.Shared.Clothing.EntitySystems; using Content.Shared.Interaction.Events; using Content.Shared.Item; using Content.Shared.Light.Component; @@ -14,6 +15,9 @@ namespace Content.Server.Light.EntitySystems [UsedImplicitly] public sealed class ExpendableLightSystem : EntitySystem { + [Dependency] private readonly SharedItemSystem _item = default!; + [Dependency] private readonly ClothingSystem _clothing = default!; + public override void Initialize() { base.Initialize(); @@ -59,9 +63,9 @@ namespace Content.Server.Light.EntitySystems UpdateSpriteAndSounds(component); UpdateVisualizer(component); - if (TryComp(component.Owner, out var item)) + if (TryComp(component.Owner, out var item)) { - item.EquippedPrefix = "unlit"; + _item.SetHeldPrefix(component.Owner, "unlit", item); } break; @@ -76,9 +80,9 @@ namespace Content.Server.Light.EntitySystems { if (!component.Activated && component.CurrentState == ExpendableLightState.BrandNew) { - if (TryComp(component.Owner, out var item)) + if (TryComp(component.Owner, out var item)) { - item.EquippedPrefix = "lit"; + _item.SetHeldPrefix(component.Owner, "lit", item); } component.CurrentState = ExpendableLightState.Lit; @@ -154,15 +158,15 @@ namespace Content.Server.Light.EntitySystems if (TryComp(component.Owner, out var clothing)) { - clothing.EquippedPrefix = component.Activated ? "Activated" : string.Empty; + _clothing.SetEquippedPrefix(component.Owner, component.Activated ? "Activated" : string.Empty, clothing); } } private void OnExpLightInit(EntityUid uid, ExpendableLightComponent component, ComponentInit args) { - if (TryComp(uid, out var item)) + if (TryComp(uid, out var item)) { - item.EquippedPrefix = "unlit"; + _item.SetHeldPrefix(uid, "unlit", item); } component.CurrentState = ExpendableLightState.BrandNew; diff --git a/Content.Server/Light/EntitySystems/MatchstickSystem.cs b/Content.Server/Light/EntitySystems/MatchstickSystem.cs index 171b07f44f..a1a54205ab 100644 --- a/Content.Server/Light/EntitySystems/MatchstickSystem.cs +++ b/Content.Server/Light/EntitySystems/MatchstickSystem.cs @@ -16,6 +16,7 @@ namespace Content.Server.Light.EntitySystems private HashSet _litMatches = new(); [Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!; [Dependency] private readonly TransformSystem _transformSystem = default!; + [Dependency] private readonly SharedItemSystem _item = default!; public override void Initialize() { @@ -94,15 +95,15 @@ namespace Content.Server.Light.EntitySystems pointLightComponent.Enabled = component.CurrentState == SmokableState.Lit; } - if (EntityManager.TryGetComponent(component.Owner, out SharedItemComponent? item)) + if (EntityManager.TryGetComponent(component.Owner, out ItemComponent? item)) { switch (component.CurrentState) { case SmokableState.Lit: - item.EquippedPrefix = "lit"; + _item.SetHeldPrefix(component.Owner, "lit", item); break; default: - item.EquippedPrefix = "unlit"; + _item.SetHeldPrefix(component.Owner, "unlit", item); break; } } diff --git a/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs b/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs index fd86bae88e..e8b0c19721 100644 --- a/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs +++ b/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs @@ -41,7 +41,7 @@ namespace Content.Server.Medical if (!TryComp(uid, out var clothing)) return; // Is the clothing in its actual slot? - if (!clothing.SlotFlags.HasFlag(args.SlotFlags)) + if (!clothing.Slots.HasFlag(args.SlotFlags)) return; component.IsActive = true; diff --git a/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs b/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs index 60547510b5..286e1b39f4 100644 --- a/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs @@ -7,6 +7,7 @@ using Content.Server.Clothing.Components; using Content.Server.Nutrition.Components; using Content.Shared.Chemistry; using Content.Shared.Chemistry.Reagent; +using Content.Shared.Clothing.EntitySystems; using Content.Shared.FixedPoint; using Content.Shared.Inventory; using Content.Shared.Smoking; @@ -24,6 +25,8 @@ namespace Content.Server.Nutrition.EntitySystems [Dependency] private readonly AtmosphereSystem _atmos = default!; [Dependency] private readonly TransformSystem _transformSystem = default!; [Dependency] private readonly InventorySystem _inventorySystem = default!; + [Dependency] private readonly ClothingSystem _clothing = default!; + private const float UpdateTimer = 3f; private float _timer = 0f; @@ -50,13 +53,15 @@ namespace Content.Server.Nutrition.EntitySystems smokable.State = state; appearance.SetData(SmokingVisuals.Smoking, state); - clothing.EquippedPrefix = state switch + var newState = state switch { SmokableState.Lit => smokable.LitPrefix, SmokableState.Burnt => smokable.BurntPrefix, _ => smokable.UnlitPrefix }; + _clothing.SetEquippedPrefix(uid, newState, clothing); + if (state == SmokableState.Lit) _active.Add(uid); else diff --git a/Content.Server/PneumaticCannon/PneumaticCannonSystem.cs b/Content.Server/PneumaticCannon/PneumaticCannonSystem.cs index dfd6c2db31..e7b808f5b9 100644 --- a/Content.Server/PneumaticCannon/PneumaticCannonSystem.cs +++ b/Content.Server/PneumaticCannon/PneumaticCannonSystem.cs @@ -134,7 +134,7 @@ namespace Content.Server.PneumaticCannon // this overrides the ServerStorageComponent's insertion stuff because // it's not event-based yet and I can't cancel it, so tools and stuff // will modify mode/power then get put in anyway - if (EntityManager.TryGetComponent(args.Used, out var item) + if (EntityManager.TryGetComponent(args.Used, out var item) && EntityManager.TryGetComponent(component.Owner, out var storage)) { if (_storageSystem.CanInsert(component.Owner, args.Used, out _, storage)) diff --git a/Content.Server/Speech/EntitySystems/AddAccentClothingSystem.cs b/Content.Server/Speech/EntitySystems/AddAccentClothingSystem.cs index c06bbf5a2c..74d390d62f 100644 --- a/Content.Server/Speech/EntitySystems/AddAccentClothingSystem.cs +++ b/Content.Server/Speech/EntitySystems/AddAccentClothingSystem.cs @@ -22,7 +22,7 @@ public sealed class AddAccentClothingSystem : EntitySystem // check if entity was actually used as clothing // not just taken in pockets or something - var isCorrectSlot = clothing.SlotFlags.HasFlag(args.SlotFlags); + var isCorrectSlot = clothing.Slots.HasFlag(args.SlotFlags); if (!isCorrectSlot) return; // does the user already has this accent? diff --git a/Content.Server/Storage/EntitySystems/EntityStorageSystem.cs b/Content.Server/Storage/EntitySystems/EntityStorageSystem.cs index 43e4100630..792c9ecec7 100644 --- a/Content.Server/Storage/EntitySystems/EntityStorageSystem.cs +++ b/Content.Server/Storage/EntitySystems/EntityStorageSystem.cs @@ -305,10 +305,10 @@ public sealed class EntityStorageSystem : EntitySystem return false; var targetIsMob = HasComp(toInsert); - var storageIsItem = HasComp(container); + var storageIsItem = HasComp(container); var allowedToEat = whitelist == null - ? HasComp(toInsert) + ? HasComp(toInsert) : whitelist.IsValid(toInsert); // BEFORE REPLACING THIS WITH, I.E. A PROPERTY: diff --git a/Content.Server/Storage/EntitySystems/SecretStashSystem.cs b/Content.Server/Storage/EntitySystems/SecretStashSystem.cs index 5ffebe988e..484cda4d5a 100644 --- a/Content.Server/Storage/EntitySystems/SecretStashSystem.cs +++ b/Content.Server/Storage/EntitySystems/SecretStashSystem.cs @@ -54,7 +54,7 @@ namespace Content.Server.Storage.EntitySystems /// /// True if item was hidden inside stash public bool TryHideItem(EntityUid uid, EntityUid userUid, EntityUid itemToHideUid, - SecretStashComponent? component = null, SharedItemComponent? item = null, + SecretStashComponent? component = null, ItemComponent? item = null, MetaDataComponent? itemMeta = null, SharedHandsComponent? hands = null) { if (!Resolve(uid, ref component)) diff --git a/Content.Server/Storage/EntitySystems/StorageSystem.cs b/Content.Server/Storage/EntitySystems/StorageSystem.cs index a8af74e613..66a6b6f23c 100644 --- a/Content.Server/Storage/EntitySystems/StorageSystem.cs +++ b/Content.Server/Storage/EntitySystems/StorageSystem.cs @@ -236,13 +236,13 @@ namespace Content.Server.Storage.EntitySystems // Pick up all entities in a radius around the clicked location. // The last half of the if is because carpets exist and this is terrible - if (storageComp.AreaInsert && (eventArgs.Target == null || !HasComp(eventArgs.Target.Value))) + if (storageComp.AreaInsert && (eventArgs.Target == null || !HasComp(eventArgs.Target.Value))) { var validStorables = new List(); foreach (var entity in _entityLookupSystem.GetEntitiesInRange(eventArgs.ClickLocation, storageComp.AreaInsertRadius, LookupFlags.None)) { if (entity == eventArgs.User - || !HasComp(entity) + || !HasComp(entity) || !_interactionSystem.InRangeUnobstructed(eventArgs.User, entity)) continue; @@ -272,7 +272,7 @@ namespace Content.Server.Storage.EntitySystems // Check again, situation may have changed for some entities, but we'll still pick up any that are valid if (_containerSystem.IsEntityInContainer(entity) || entity == eventArgs.User - || !HasComp(entity)) + || !HasComp(entity)) continue; if (TryComp(uid, out var transformOwner) && TryComp(entity, out var transformEnt)) @@ -304,7 +304,7 @@ namespace Content.Server.Storage.EntitySystems if (_containerSystem.IsEntityInContainer(target) || target == eventArgs.User - || !HasComp(target)) + || !HasComp(target)) return; if (TryComp(uid, out var transformOwner) && TryComp(target, out var transformEnt)) @@ -432,7 +432,7 @@ namespace Content.Server.Storage.EntitySystems if (storageComp.Storage == null) return; - var itemQuery = GetEntityQuery(); + var itemQuery = GetEntityQuery(); foreach (var entity in storageComp.Storage.ContainedEntities) { @@ -491,7 +491,7 @@ namespace Content.Server.Storage.EntitySystems return false; } - if (TryComp(insertEnt, out SharedItemComponent? itemComp) && + if (TryComp(insertEnt, out ItemComponent? itemComp) && itemComp.Size > storageComp.StorageCapacityMax - storageComp.StorageUsed) { reason = "comp-storage-insufficient-capacity"; diff --git a/Content.Server/Stunnable/Systems/StunbatonSystem.cs b/Content.Server/Stunnable/Systems/StunbatonSystem.cs index 237d34cde2..daee202c6a 100644 --- a/Content.Server/Stunnable/Systems/StunbatonSystem.cs +++ b/Content.Server/Stunnable/Systems/StunbatonSystem.cs @@ -24,6 +24,8 @@ namespace Content.Server.Stunnable.Systems { public sealed class StunbatonSystem : EntitySystem { + [Dependency] private readonly SharedItemSystem _item = default!; + public override void Initialize() { base.Initialize(); @@ -88,11 +90,12 @@ namespace Content.Server.Stunnable.Systems if (!comp.Activated) return; - if (TryComp(comp.Owner, out var item)) - item.EquippedPrefix = "off"; - - if (TryComp(comp.Owner, out AppearanceComponent? appearance)) + if (TryComp(comp.Owner, out var appearance) && + TryComp(comp.Owner, out var item)) + { + _item.SetHeldPrefix(comp.Owner, "off", item); appearance.SetData(ToggleVisuals.Toggled, false); + } SoundSystem.Play(comp.SparksSound.GetSound(), Filter.Pvs(comp.Owner), comp.Owner, AudioHelpers.WithVariation(0.25f)); @@ -112,12 +115,12 @@ namespace Content.Server.Stunnable.Systems return; } - - if (TryComp(comp.Owner, out var item)) - item.EquippedPrefix = "on"; - - if (TryComp(comp.Owner, out AppearanceComponent? appearance)) + if (EntityManager.TryGetComponent(comp.Owner, out var appearance) && + EntityManager.TryGetComponent(comp.Owner, out var item)) + { + _item.SetHeldPrefix(comp.Owner, "on", item); appearance.SetData(ToggleVisuals.Toggled, true); + } SoundSystem.Play(comp.SparksSound.GetSound(), playerFilter, comp.Owner, AudioHelpers.WithVariation(0.25f)); comp.Activated = true; diff --git a/Content.Server/Temperature/Components/HeatResistanceComponent.cs b/Content.Server/Temperature/Components/HeatResistanceComponent.cs index b5d3b7f216..586b30c64d 100644 --- a/Content.Server/Temperature/Components/HeatResistanceComponent.cs +++ b/Content.Server/Temperature/Components/HeatResistanceComponent.cs @@ -11,7 +11,7 @@ namespace Content.Server.Temperature.Components // TODO: When making into system: Any animal that touches bulb that has no // InventoryComponent but still would have default heat resistance in the future (maybe) if (EntitySystem.Get().TryGetSlotEntity(Owner, "gloves", out var slotEntity) && - IoCManager.Resolve().TryGetComponent(slotEntity, out var gloves)) + IoCManager.Resolve().TryGetComponent(slotEntity, out var gloves)) { return gloves.HeatResistance; } diff --git a/Content.Server/Tools/ToolSystem.Welder.cs b/Content.Server/Tools/ToolSystem.Welder.cs index 108d6d11ed..1a26904f31 100644 --- a/Content.Server/Tools/ToolSystem.Welder.cs +++ b/Content.Server/Tools/ToolSystem.Welder.cs @@ -59,7 +59,7 @@ namespace Content.Server.Tools public bool TryToggleWelder(EntityUid uid, EntityUid? user, WelderComponent? welder = null, SolutionContainerManagerComponent? solutionContainer = null, - SharedItemComponent? item = null, + ItemComponent? item = null, PointLightComponent? light = null, AppearanceComponent? appearance = null) { @@ -76,7 +76,7 @@ namespace Content.Server.Tools public bool TryTurnWelderOn(EntityUid uid, EntityUid? user, WelderComponent? welder = null, SolutionContainerManagerComponent? solutionContainer = null, - SharedItemComponent? item = null, + ItemComponent? item = null, PointLightComponent? light = null, AppearanceComponent? appearance = null, TransformComponent? transform = null) @@ -105,7 +105,7 @@ namespace Content.Server.Tools welder.Lit = true; if(item != null) - item.EquippedPrefix = "on"; + _itemSystem.SetHeldPrefix(uid, "on", item); appearance?.SetData(WelderVisuals.Lit, true); @@ -128,7 +128,7 @@ namespace Content.Server.Tools public bool TryTurnWelderOff(EntityUid uid, EntityUid? user, WelderComponent? welder = null, - SharedItemComponent? item = null, + ItemComponent? item = null, PointLightComponent? light = null, AppearanceComponent? appearance = null) { @@ -142,7 +142,7 @@ namespace Content.Server.Tools // TODO: Make all this use visualizers. if (item != null) - item.EquippedPrefix = "off"; + _itemSystem.SetHeldPrefix(uid, "off", item); // Layer 1 is the flame. appearance?.SetData(WelderVisuals.Lit, false); diff --git a/Content.Server/Tools/ToolSystem.cs b/Content.Server/Tools/ToolSystem.cs index 6302698050..f4d2f82167 100644 --- a/Content.Server/Tools/ToolSystem.cs +++ b/Content.Server/Tools/ToolSystem.cs @@ -5,6 +5,7 @@ using Content.Server.Chemistry.EntitySystems; using Content.Server.DoAfter; using Content.Server.Popups; using Content.Shared.Audio; +using Content.Shared.Item; using Content.Shared.Tools.Components; using Robust.Server.GameObjects; using Robust.Shared.Audio; @@ -25,7 +26,7 @@ namespace Content.Server.Tools [Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly TransformSystem _transformSystem = default!; - + [Dependency] private readonly SharedItemSystem _itemSystem = default!; public override void Initialize() { diff --git a/Content.Server/Weapon/Melee/EnergySword/EnergySwordSystem.cs b/Content.Server/Weapon/Melee/EnergySword/EnergySwordSystem.cs index 8f55b2359e..07c3e5d6f4 100644 --- a/Content.Server/Weapon/Melee/EnergySword/EnergySwordSystem.cs +++ b/Content.Server/Weapon/Melee/EnergySword/EnergySwordSystem.cs @@ -19,6 +19,7 @@ namespace Content.Server.Weapon.Melee.EnergySword { [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly SharedRgbLightControllerSystem _rgbSystem = default!; + [Dependency] private readonly SharedItemSystem _item = default!; public override void Initialize() { @@ -67,9 +68,9 @@ namespace Content.Server.Weapon.Melee.EnergySword if (!comp.Activated) return; - if (TryComp(comp.Owner, out SharedItemComponent? item)) + if (TryComp(comp.Owner, out ItemComponent? item)) { - item.Size = 5; + _item.SetSize(comp.Owner, 5, item); } if (TryComp(comp.Owner, out var malus)) @@ -92,9 +93,9 @@ namespace Content.Server.Weapon.Melee.EnergySword if (comp.Activated) return; - if (TryComp(comp.Owner, out SharedItemComponent? item)) + if (TryComp(comp.Owner, out ItemComponent? item)) { - item.Size = 9999; + _item.SetSize(comp.Owner, 9999, item); } EnsureComp(comp.Owner); diff --git a/Content.Server/Wieldable/WieldableSystem.cs b/Content.Server/Wieldable/WieldableSystem.cs index 4bd5e3f38b..91b15f1ed6 100644 --- a/Content.Server/Wieldable/WieldableSystem.cs +++ b/Content.Server/Wieldable/WieldableSystem.cs @@ -22,6 +22,7 @@ namespace Content.Server.Wieldable [Dependency] private readonly DoAfterSystem _doAfter = default!; [Dependency] private readonly HandVirtualItemSystem _virtualItemSystem = default!; [Dependency] private readonly SharedHandsSystem _handsSystem = default!; + [Dependency] private readonly SharedItemSystem _itemSystem = default!; public override void Initialize() { @@ -167,10 +168,10 @@ namespace Content.Server.Wieldable if (!CanWield(uid, component, args.User.Value) || component.Wielded) return; - if (TryComp(uid, out var item)) + if (TryComp(uid, out var item)) { - component.OldInhandPrefix = item.EquippedPrefix; - item.EquippedPrefix = component.WieldedInhandPrefix; + component.OldInhandPrefix = item.HeldPrefix; + _itemSystem.SetHeldPrefix(uid, component.WieldedInhandPrefix, item); } component.Wielded = true; @@ -196,9 +197,9 @@ namespace Content.Server.Wieldable if (!component.Wielded) return; - if (TryComp(uid, out var item)) + if (TryComp(uid, out var item)) { - item.EquippedPrefix = component.OldInhandPrefix; + _itemSystem.SetHeldPrefix(uid, component.OldInhandPrefix, item); } component.Wielded = false; diff --git a/Content.Shared/Clothing/Components/SharedClothingComponent.cs b/Content.Shared/Clothing/Components/SharedClothingComponent.cs new file mode 100644 index 0000000000..8830703d20 --- /dev/null +++ b/Content.Shared/Clothing/Components/SharedClothingComponent.cs @@ -0,0 +1,53 @@ +using Content.Shared.Clothing.EntitySystems; +using Content.Shared.Inventory; +using Content.Shared.Sound; +using Robust.Shared.GameStates; +using Robust.Shared.Serialization; + +namespace Content.Shared.Clothing.Components; + +/// +/// This handles entities which can be equipped. +/// +[NetworkedComponent] +public abstract class SharedClothingComponent : Component +{ + [DataField("clothingVisuals")] + public Dictionary> ClothingVisuals = new(); + + [ViewVariables(VVAccess.ReadWrite)] + [DataField("quickEquip")] + public bool QuickEquip = true; + + [ViewVariables(VVAccess.ReadWrite)] + [DataField("slots", required: true)] + public SlotFlags Slots = SlotFlags.NONE; + + [ViewVariables(VVAccess.ReadWrite)] + [DataField("equipSound")] + public SoundSpecifier? EquipSound; + + [ViewVariables(VVAccess.ReadWrite)] + [DataField("unequipSound")] + public SoundSpecifier? UnequipSound; + + [Access(typeof(ClothingSystem))] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("equippedPrefix")] + public string? EquippedPrefix; + + [ViewVariables(VVAccess.ReadWrite)] + [DataField("sprite")] + public string? RsiPath; +} + +[Serializable, NetSerializable] +public sealed class ClothingComponentState : ComponentState +{ + public string? EquippedPrefix; + + public ClothingComponentState(string? equippedPrefix) + { + EquippedPrefix = equippedPrefix; + } +} diff --git a/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs b/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs new file mode 100644 index 0000000000..7fa515f852 --- /dev/null +++ b/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs @@ -0,0 +1,39 @@ +using Content.Shared.Clothing.Components; +using Robust.Shared.GameStates; + +namespace Content.Shared.Clothing.EntitySystems; + +public sealed class ClothingSystem : EntitySystem +{ + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnGetState); + SubscribeLocalEvent(OnHandleState); + } + + private void OnGetState(EntityUid uid, SharedClothingComponent component, ref ComponentGetState args) + { + args.State = new ClothingComponentState(component.EquippedPrefix); + } + + private void OnHandleState(EntityUid uid, SharedClothingComponent component, ref ComponentHandleState args) + { + if (args.Current is ClothingComponentState state) + component.EquippedPrefix = state.EquippedPrefix; + } + + #region Public API + + public void SetEquippedPrefix(EntityUid uid, string? prefix, SharedClothingComponent? clothing = null) + { + if (!Resolve(uid, ref clothing)) + return; + + clothing.EquippedPrefix = prefix; + Dirty(clothing); + } + + #endregion +} diff --git a/Content.Shared/Clothing/SharedMagbootsSystem.cs b/Content.Shared/Clothing/SharedMagbootsSystem.cs index e00a978484..194a29a895 100644 --- a/Content.Shared/Clothing/SharedMagbootsSystem.cs +++ b/Content.Shared/Clothing/SharedMagbootsSystem.cs @@ -1,4 +1,5 @@ using Content.Shared.Actions; +using Content.Shared.Clothing.EntitySystems; using Content.Shared.Inventory; using Content.Shared.Item; using Content.Shared.Slippery; @@ -13,6 +14,8 @@ public abstract class SharedMagbootsSystem : EntitySystem [Dependency] private readonly SharedActionsSystem _sharedActions = default!; [Dependency] private readonly ClothingSpeedModifierSystem _clothingSpeedModifier = default!; [Dependency] private readonly InventorySystem _inventory = default!; + [Dependency] private readonly SharedItemSystem _item = default!; + [Dependency] private readonly ClothingSystem _clothing = default!; [Dependency] private readonly SharedContainerSystem _sharedContainer = default!; public override void Initialize() @@ -37,8 +40,11 @@ public abstract class SharedMagbootsSystem : EntitySystem _inventory.TryGetSlotEntity(container.Owner, "shoes", out var entityUid) && entityUid == component.Owner) UpdateMagbootEffects(container.Owner, uid, true, component); - if (TryComp(uid, out var item)) - item.EquippedPrefix = component.On ? "on" : null; + if (TryComp(uid, out var item)) + { + _item.SetHeldPrefix(uid, component.On ? "on" : null, item); + _clothing.SetEquippedPrefix(uid, component.On ? "on" : null); + } if (TryComp(uid, out AppearanceComponent? appearance)) appearance.SetData(ToggleVisuals.Toggled, component.On); diff --git a/Content.Shared/Disposal/SharedDisposalUnitSystem.cs b/Content.Shared/Disposal/SharedDisposalUnitSystem.cs index 1ecc0161b4..6b11d77d76 100644 --- a/Content.Shared/Disposal/SharedDisposalUnitSystem.cs +++ b/Content.Shared/Disposal/SharedDisposalUnitSystem.cs @@ -33,7 +33,7 @@ namespace Content.Shared.Disposal var otherBody = args.BodyB.Owner; // Items dropped shouldn't collide but items thrown should - if (EntityManager.HasComponent(otherBody) && + if (EntityManager.HasComponent(otherBody) && !EntityManager.HasComponent(otherBody)) { args.Cancel(); @@ -60,7 +60,7 @@ namespace Content.Shared.Disposal return false; // TODO: Probably just need a disposable tag. - if (!EntityManager.TryGetComponent(entity, out SharedItemComponent? storable) && + if (!EntityManager.TryGetComponent(entity, out ItemComponent? storable) && !EntityManager.HasComponent(entity)) { return false; diff --git a/Content.Shared/Eye/Blinding/SharedBlindingSystem.cs b/Content.Shared/Eye/Blinding/SharedBlindingSystem.cs index af9c4e0924..8f5cec54f9 100644 --- a/Content.Shared/Eye/Blinding/SharedBlindingSystem.cs +++ b/Content.Shared/Eye/Blinding/SharedBlindingSystem.cs @@ -1,3 +1,4 @@ +using Content.Shared.Clothing.Components; using Content.Shared.Inventory.Events; using Content.Shared.Inventory; using Content.Shared.Item; @@ -16,10 +17,10 @@ namespace Content.Shared.Eye.Blinding private void OnEquipped(EntityUid uid, BlindfoldComponent component, GotEquippedEvent args) { - if (!TryComp(uid, out var clothing) || clothing.SlotFlags == 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.SlotFlags.HasFlag(args.SlotFlags)) + if (!clothing.Slots.HasFlag(args.SlotFlags)) return; component.IsActive = true; diff --git a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs index 7e6e990527..205f1bdab9 100644 --- a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs +++ b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs @@ -12,7 +12,7 @@ public abstract partial class SharedHandsSystem : EntitySystem /// /// Tries to pick up an entity to a specific hand. If no explicit hand is specified, defaults to using the currently active hand. /// - public bool TryPickup(EntityUid uid, EntityUid entity, string? handName = null, bool checkActionBlocker = true, bool animateUser = false, SharedHandsComponent? handsComp = null, SharedItemComponent? item = null) + public bool TryPickup(EntityUid uid, EntityUid entity, string? handName = null, bool checkActionBlocker = true, bool animateUser = false, SharedHandsComponent? handsComp = null, ItemComponent? item = null) { if (!Resolve(uid, ref handsComp, false)) return false; @@ -34,7 +34,7 @@ public abstract partial class SharedHandsSystem : EntitySystem /// If one empty hand fails to pick up the item, this will NOT check other hands. If ever hand-specific item /// restrictions are added, there a might need to be a TryPickupAllHands or something like that. /// - public bool TryPickupAnyHand(EntityUid uid, EntityUid entity, bool checkActionBlocker = true, bool animateUser = false, SharedHandsComponent? handsComp = null, SharedItemComponent? item = null) + public bool TryPickupAnyHand(EntityUid uid, EntityUid entity, bool checkActionBlocker = true, bool animateUser = false, SharedHandsComponent? handsComp = null, ItemComponent? item = null) { if (!Resolve(uid, ref handsComp, false)) return false; @@ -45,7 +45,7 @@ public abstract partial class SharedHandsSystem : EntitySystem return TryPickup(uid, entity, hand, checkActionBlocker, animateUser, handsComp, item); } - public bool TryPickup(EntityUid uid, EntityUid entity, Hand hand, bool checkActionBlocker = true, bool animateUser = false, SharedHandsComponent? handsComp = null, SharedItemComponent? item = null) + public bool TryPickup(EntityUid uid, EntityUid entity, Hand hand, bool checkActionBlocker = true, bool animateUser = false, SharedHandsComponent? handsComp = null, ItemComponent? item = null) { if (!Resolve(uid, ref handsComp, false)) return false; @@ -67,7 +67,7 @@ public abstract partial class SharedHandsSystem : EntitySystem return true; } - public bool CanPickupAnyHand(EntityUid uid, EntityUid entity, bool checkActionBlocker = true, SharedHandsComponent? handsComp = null, SharedItemComponent? item = null) + public bool CanPickupAnyHand(EntityUid uid, EntityUid entity, bool checkActionBlocker = true, SharedHandsComponent? handsComp = null, ItemComponent? item = null) { if (!Resolve(uid, ref handsComp, false)) return false; @@ -81,7 +81,7 @@ public abstract partial class SharedHandsSystem : EntitySystem /// /// Checks whether a given item will fit into a specific user's hand. Unless otherwise specified, this will also check the general CanPickup action blocker. /// - public bool CanPickupToHand(EntityUid uid, EntityUid entity, Hand hand, bool checkActionBlocker = true, SharedHandsComponent? handsComp = null, SharedItemComponent? item = null) + public bool CanPickupToHand(EntityUid uid, EntityUid entity, Hand hand, bool checkActionBlocker = true, SharedHandsComponent? handsComp = null, ItemComponent? item = null) { if (!Resolve(uid, ref handsComp, false)) return false; @@ -90,7 +90,7 @@ public abstract partial class SharedHandsSystem : EntitySystem if (handContainer == null || handContainer.ContainedEntity != null) return false; - if (!Resolve(entity, ref item, false) || !item.CanPickup) + if (!Resolve(entity, ref item, false)) return false; if (TryComp(entity, out PhysicsComponent? physics) && physics.BodyType == BodyType.Static) @@ -106,7 +106,7 @@ public abstract partial class SharedHandsSystem : EntitySystem /// /// Puts an item into any hand, preferring the active hand, or puts it on the floor. /// - public void PickupOrDrop(EntityUid? uid, EntityUid entity, bool checkActionBlocker = true, bool animateUser = false, SharedHandsComponent? handsComp = null, SharedItemComponent? item = null) + public void PickupOrDrop(EntityUid? uid, EntityUid entity, bool checkActionBlocker = true, bool animateUser = false, SharedHandsComponent? handsComp = null, ItemComponent? item = null) { if (uid == null || !Resolve(uid.Value, ref handsComp, false) diff --git a/Content.Shared/Interaction/SharedInteractionSystem.cs b/Content.Shared/Interaction/SharedInteractionSystem.cs index f8c37c462b..50647529b8 100644 --- a/Content.Shared/Interaction/SharedInteractionSystem.cs +++ b/Content.Shared/Interaction/SharedInteractionSystem.cs @@ -470,7 +470,7 @@ namespace Content.Shared.Interaction bool ignoreAnchored = false; - if (HasComp(target) && TryComp(target, out PhysicsComponent? physics) && physics.CanCollide) + if (HasComp(target) && TryComp(target, out PhysicsComponent? physics) && physics.CanCollide) { // If the target is an item, we ignore any colliding entities. Currently done so that if items get stuck // inside of walls, users can still pick them up. diff --git a/Content.Shared/Inventory/InventorySystem.Equip.cs b/Content.Shared/Inventory/InventorySystem.Equip.cs index 6dc5270a0e..6fc9bfb8b1 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, SharedItemComponent component, UseInHandEvent args) + protected void QuickEquip(EntityUid uid, SharedClothingComponent 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 SharedItemComponent? item) && !item.QuickEquip) + if (TryComp(slotEntity, out SharedClothingComponent? item) && !item.QuickEquip) continue; if (!TryUnequip(args.User, slotDef.Name, true, inventory: inv)) @@ -157,19 +157,23 @@ 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, SharedItemComponent? item = null) => - TryEquip(uid, uid, itemUid, slot, silent, force, predicted, inventory, item); + InventoryComponent? inventory = null, SharedClothingComponent? 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, SharedItemComponent? item = null) + InventoryComponent? inventory = null, SharedClothingComponent? clothing = null) { - if (!Resolve(target, ref inventory, false) || !Resolve(itemUid, ref item, false)) + if (!Resolve(target, ref inventory, false)) { if(!silent && _gameTiming.IsFirstTimePredicted) _popup.PopupCursor(Loc.GetString("inventory-component-can-equip-cannot"), Filter.Local()); return false; } + // Not required to have, since pockets can take any item. + // CanEquip will still check, so we don't have to worry about it. + Resolve(itemUid, ref clothing, false); + if (!TryGetSlotContainer(target, slot, out var slotContainer, out var slotDefinition, inventory)) { if(!silent && _gameTiming.IsFirstTimePredicted) @@ -177,7 +181,7 @@ public abstract partial class InventorySystem return false; } - if (!force && !CanEquip(actor, target, itemUid, slot, out var reason, slotDefinition, inventory, item)) + if (!force && !CanEquip(actor, target, itemUid, slot, out var reason, slotDefinition, inventory, clothing)) { if(!silent && _gameTiming.IsFirstTimePredicted) _popup.PopupCursor(Loc.GetString(reason), Filter.Local()); @@ -191,7 +195,7 @@ public abstract partial class InventorySystem return false; } - if(!silent && item.EquipSound != null && _gameTiming.IsFirstTimePredicted) + if(!silent && clothing != null && clothing.EquipSound != null && _gameTiming.IsFirstTimePredicted) { Filter filter; @@ -206,7 +210,7 @@ public abstract partial class InventorySystem filter.RemoveWhereAttachedEntity(entity => entity == actor); } - SoundSystem.Play(item.EquipSound.GetSound(), filter, target, item.EquipSound.Params.WithVolume(-2f)); + SoundSystem.Play(clothing.EquipSound.GetSound(), filter, target, clothing.EquipSound.Params.WithVolume(-2f)); } inventory.Dirty(); @@ -245,22 +249,27 @@ 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, - SharedItemComponent? item = null) => - CanEquip(uid, uid, itemUid, slot, out reason, slotDefinition, inventory, item); + SharedClothingComponent? 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, SharedItemComponent? item = null) + 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) { reason = "inventory-component-can-equip-cannot"; - if (!Resolve(target, ref inventory, false) || !Resolve(itemUid, ref item, false)) + if (!Resolve(target, ref inventory, false)) return false; + Resolve(itemUid, ref clothing, ref item, false); + if (slotDefinition == null && !TryGetSlot(target, slot, out slotDefinition, inventory: inventory)) return false; if (slotDefinition.DependsOn != null && !TryGetSlotEntity(target, slotDefinition.DependsOn, out _, inventory)) return false; - if(!item.SlotFlags.HasFlag(slotDefinition.SlotFlags) && (!slotDefinition.SlotFlags.HasFlag(SlotFlags.POCKET) || item.Size > (int) ReferenceSizes.Pocket)) + var fittingInPocket = slotDefinition.SlotFlags.HasFlag(SlotFlags.POCKET) && item is { Size: <= (int) ReferenceSizes.Pocket }; + if (clothing == null && !fittingInPocket + || clothing != null && !clothing.Slots.HasFlag(slotDefinition.SlotFlags) && !fittingInPocket) { reason = "inventory-component-can-equip-does-not-fit"; return false; @@ -304,17 +313,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, SharedItemComponent? item = null) => TryUnequip(uid, uid, slot, silent, force, predicted, inventory, item); + InventoryComponent? inventory = null, SharedClothingComponent? 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, SharedItemComponent? item = null) => - TryUnequip(actor, target, slot, out _, silent, force, predicted, inventory, item); + bool force = false, bool predicted = false, InventoryComponent? inventory = null, SharedClothingComponent? 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, SharedItemComponent? item = null) => TryUnequip(uid, uid, slot, out removedItem, silent, force, predicted, inventory, item); + InventoryComponent? inventory = null, SharedClothingComponent? 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, SharedItemComponent? item = null) + bool force = false, bool predicted = false, InventoryComponent? inventory = null, SharedClothingComponent? clothing = null) { removedItem = null; if (!Resolve(target, ref inventory, false)) @@ -370,7 +379,7 @@ public abstract partial class InventorySystem Transform(removedItem.Value).Coordinates = Transform(target).Coordinates; - if (!silent && Resolve(removedItem.Value, ref item) && item.UnequipSound != null && _gameTiming.IsFirstTimePredicted) + if (!silent && Resolve(removedItem.Value, ref clothing, false) && clothing.UnequipSound != null && _gameTiming.IsFirstTimePredicted) { Filter filter; @@ -385,7 +394,7 @@ public abstract partial class InventorySystem filter.RemoveWhereAttachedEntity(entity => entity == actor); } - SoundSystem.Play(item.UnequipSound.GetSound(), filter, target, item.UnequipSound.Params.WithVolume(-2f)); + SoundSystem.Play(clothing.UnequipSound.GetSound(), filter, target, clothing.UnequipSound.Params.WithVolume(-2f)); } inventory.Dirty(); diff --git a/Content.Shared/Inventory/InventorySystem.Helpers.cs b/Content.Shared/Inventory/InventorySystem.Helpers.cs index 8f20a48467..c2f48939a4 100644 --- a/Content.Shared/Inventory/InventorySystem.Helpers.cs +++ b/Content.Shared/Inventory/InventorySystem.Helpers.cs @@ -1,4 +1,5 @@ -using Content.Shared.Item; +using Content.Shared.Clothing.Components; +using Content.Shared.Item; using Robust.Shared.Prototypes; namespace Content.Shared.Inventory; @@ -32,10 +33,6 @@ public partial class InventorySystem return false; } - // If this doesn't have an item component, then we can't do anything with it. - if (!HasComp(item)) - return DeleteItem(); - // We finally try to equip the item, otherwise we delete it. return TryEquip(uid, item, slot, silent, force) || DeleteItem(); } diff --git a/Content.Shared/Item/ItemComponent.cs b/Content.Shared/Item/ItemComponent.cs new file mode 100644 index 0000000000..2fae763578 --- /dev/null +++ b/Content.Shared/Item/ItemComponent.cs @@ -0,0 +1,76 @@ +using Content.Shared.Hands.Components; +using Robust.Shared.Serialization; + +namespace Content.Shared.Item; + +/// +/// Handles items which can be picked up to hands and placed in pockets, as well as storage containers +/// like backpacks. +/// +[RegisterComponent] +public sealed class ItemComponent : Component +{ + [Access(typeof(SharedItemSystem), Other = AccessPermissions.ReadExecute)] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("size")] + public int Size = 5; + + [DataField("inhandVisuals")] + public Dictionary> InhandVisuals = new(); + + [Access(typeof(SharedItemSystem))] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("heldPrefix")] + public string? HeldPrefix; + + /// + /// Rsi of the sprite shown on the player when this item is in their hands. Used to generate a default entry for + /// + [ViewVariables(VVAccess.ReadWrite)] + [DataField("sprite")] + public readonly string? RsiPath; +} + +[Serializable, NetSerializable] +public sealed class ItemComponentState : ComponentState +{ + public int Size { get; } + public string? HeldPrefix { get; } + + public ItemComponentState(int size, string? heldPrefix) + { + Size = size; + HeldPrefix = heldPrefix; + } +} + +/// +/// Raised when an item's visual state is changed. The event is directed at the entity that contains this item, so +/// that it can properly update its hands or inventory sprites and GUI. +/// +[Serializable, NetSerializable] +public sealed class VisualsChangedEvent : EntityEventArgs +{ + public readonly EntityUid Item; + public readonly string ContainerId; + + public VisualsChangedEvent(EntityUid item, string containerId) + { + Item = item; + ContainerId = containerId; + } +} + +/// +/// Reference sizes for common containers and items. +/// +public enum ReferenceSizes +{ + Wallet = 4, + Pocket = 12, + Box = 24, + Belt = 30, + Toolbox = 60, + Backpack = 100, + NoStoring = 9999 +} diff --git a/Content.Shared/Item/SharedItemComponent.cs b/Content.Shared/Item/SharedItemComponent.cs deleted file mode 100644 index ba0d353901..0000000000 --- a/Content.Shared/Item/SharedItemComponent.cs +++ /dev/null @@ -1,147 +0,0 @@ -using Content.Shared.Hands.Components; -using Content.Shared.Inventory; -using Content.Shared.Sound; -using Robust.Shared.GameStates; -using Robust.Shared.Serialization; -using static Robust.Shared.GameObjects.SharedSpriteComponent; - -namespace Content.Shared.Item -{ - /// - /// Players can pick up, drop, and put items in bags, and they can be seen in player's hands. - /// - [NetworkedComponent()] - public abstract class SharedItemComponent : Component - { - [Dependency] private readonly IEntityManager _entMan = default!; - - /// - /// How much big this item is. - /// - [ViewVariables(VVAccess.ReadWrite)] - public int Size - { - get => _size; - set - { - _size = value; - Dirty(); - } - } - [DataField("size")] - private int _size; - - [DataField("inhandVisuals")] - public Dictionary> InhandVisuals = new(); - - [DataField("clothingVisuals")] - public Dictionary> ClothingVisuals = new(); - - /// - /// Whether or not this item can be picked up. - /// - /// - /// This should almost always be true for items. But in some special cases, an item can be equipped but not - /// picked up. E.g., hardsuit helmets are attached to the suit, so we want to disable things like the pickup - /// verb. - /// - [DataField("canPickup")] - public bool CanPickup = true; - - [DataField("quickEquip")] - public bool QuickEquip = true; - - /// - /// Part of the state of the sprite shown on the player when this item is in their hands or inventory. - /// - /// - /// Only used if or are unspecified. - /// - [ViewVariables(VVAccess.ReadWrite)] - public string? EquippedPrefix - { - get => _equippedPrefix; - set - { - _equippedPrefix = value; - EntitySystem.Get().VisualsChanged(Owner, this); - Dirty(); - } - } - [DataField("HeldPrefix")] - private string? _equippedPrefix; - - [ViewVariables] - [DataField("Slots")] - public SlotFlags SlotFlags = SlotFlags.PREVENTEQUIP; //Different from None, NONE allows equips if no slot flags are required - - [DataField("equipSound")] - public SoundSpecifier? EquipSound { get; set; } = default!; - - [DataField("unequipSound")] - public SoundSpecifier? UnequipSound = default!; - - /// - /// Rsi of the sprite shown on the player when this item is in their hands. Used to generate a default entry for - /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("sprite")] - public readonly string? RsiPath; - - public void RemovedFromSlot() - { - if (_entMan.TryGetComponent(Owner, out SharedSpriteComponent? component)) - component.Visible = true; - } - - public virtual void EquippedToSlot() - { - if (_entMan.TryGetComponent(Owner, out SharedSpriteComponent? component)) - component.Visible = false; - } - } - - [Serializable, NetSerializable] - public sealed class ItemComponentState : ComponentState - { - public int Size { get; } - public string? EquippedPrefix { get; } - - public ItemComponentState(int size, string? equippedPrefix) - { - Size = size; - EquippedPrefix = equippedPrefix; - } - } - - /// - /// Raised when an item's visual state is changed. The event is directed at the entity that contains this item, so - /// that it can properly update its hands or inventory sprites and GUI. - /// - [Serializable, NetSerializable] - public sealed class VisualsChangedEvent : EntityEventArgs - { - public readonly EntityUid Item; - public readonly string ContainerId; - - public VisualsChangedEvent(EntityUid item, string containerId) - { - Item = item; - ContainerId = containerId; - } - } - - /// - /// Reference sizes for common containers and items. - /// - public enum ReferenceSizes - { - Wallet = 4, - Pocket = 12, - Box = 24, - Belt = 30, - Toolbox = 60, - Backpack = 100, - NoStoring = 9999 - } -} diff --git a/Content.Shared/Item/SharedItemSystem.cs b/Content.Shared/Item/SharedItemSystem.cs index ff70b9fe76..117e8657a1 100644 --- a/Content.Shared/Item/SharedItemSystem.cs +++ b/Content.Shared/Item/SharedItemSystem.cs @@ -1,95 +1,124 @@ -using Content.Shared.Hands.EntitySystems; +using Content.Shared.Hands.EntitySystems; using Content.Shared.Interaction; using Content.Shared.Inventory.Events; using Content.Shared.Verbs; using Robust.Shared.Containers; using Robust.Shared.GameStates; -namespace Content.Shared.Item +namespace Content.Shared.Item; + +public abstract class SharedItemSystem : EntitySystem { - public abstract class SharedItemSystem : EntitySystem + [Dependency] private readonly SharedHandsSystem _handsSystem = default!; + [Dependency] private readonly SharedContainerSystem _container = default!; + + public override void Initialize() { - [Dependency] private readonly SharedHandsSystem _handsSystem = default!; + base.Initialize(); + SubscribeLocalEvent>(AddPickupVerb); - public override void Initialize() - { - base.Initialize(); - SubscribeLocalEvent>(AddPickupVerb); + SubscribeLocalEvent(OnEquipped); + SubscribeLocalEvent(OnUnequipped); + SubscribeLocalEvent(OnHandInteract); - SubscribeLocalEvent(OnEquipped); - SubscribeLocalEvent(OnUnequipped); - SubscribeLocalEvent(OnHandInteract); + SubscribeLocalEvent(OnGetState); + SubscribeLocalEvent(OnHandleState); + } - SubscribeLocalEvent(OnGetState); - SubscribeLocalEvent(OnHandleState); - } + #region Public API - private void OnHandInteract(EntityUid uid, SharedItemComponent component, InteractHandEvent args) - { - if (args.Handled || !component.CanPickup) - return; + public void SetSize(EntityUid uid, int size, ItemComponent? component = null) + { + if (!Resolve(uid, ref component)) + return; - args.Handled = _handsSystem.TryPickup(args.User, uid, animateUser: false); - } + component.Size = size; + Dirty(component); + } - private void OnHandleState(EntityUid uid, SharedItemComponent component, ref ComponentHandleState args) - { - if (args.Current is not ItemComponentState state) - return; + public void SetHeldPrefix(EntityUid uid, string? heldPrefix, ItemComponent? component = null) + { + if (!Resolve(uid, ref component)) + return; - component.Size = state.Size; - component.EquippedPrefix = state.EquippedPrefix; - } + component.HeldPrefix = heldPrefix; + Dirty(component); + VisualsChanged(uid); + } - private void OnGetState(EntityUid uid, SharedItemComponent component, ref ComponentGetState args) - { - args.State = new ItemComponentState(component.Size, component.EquippedPrefix); - } + #endregion - // Although netsync is being set to false for items client can still update these - // Realistically: - // Container should already hide these - // Client is the only thing that matters. + private void OnHandInteract(EntityUid uid, ItemComponent component, InteractHandEvent args) + { + if (args.Handled) + return; - private void OnUnequipped(EntityUid uid, SharedSpriteComponent component, GotUnequippedEvent args) - { - component.Visible = true; - } + args.Handled = _handsSystem.TryPickup(args.User, uid, animateUser: false); + } - private void OnEquipped(EntityUid uid, SharedSpriteComponent component, GotEquippedEvent args) - { - component.Visible = false; - } + private void OnHandleState(EntityUid uid, ItemComponent component, ref ComponentHandleState args) + { + if (args.Current is not ItemComponentState state) + return; - private void AddPickupVerb(EntityUid uid, SharedItemComponent component, GetVerbsEvent args) - { - if (args.Hands == null || - args.Using != null || - !args.CanAccess || - !args.CanInteract || - !component.CanPickup || - !_handsSystem.CanPickupAnyHand(args.User, args.Target, handsComp: args.Hands, item: component)) - return; + component.Size = state.Size; + component.HeldPrefix = state.HeldPrefix; + } - InteractionVerb verb = new(); - verb.Act = () => _handsSystem.TryPickupAnyHand(args.User, args.Target, checkActionBlocker: false, handsComp: args.Hands, item: component); - verb.IconTexture = "/Textures/Interface/VerbIcons/pickup.svg.192dpi.png"; + private void OnGetState(EntityUid uid, ItemComponent component, ref ComponentGetState args) + { + args.State = new ItemComponentState(component.Size, component.HeldPrefix); + } - // if the item already in a container (that is not the same as the user's), then change the text. - // this occurs when the item is in their inventory or in an open backpack - args.User.TryGetContainer(out var userContainer); - if (args.Target.TryGetContainer(out var container) && container != userContainer) - verb.Text = Loc.GetString("pick-up-verb-get-data-text-inventory"); - else - verb.Text = Loc.GetString("pick-up-verb-get-data-text"); + // Although netsync is being set to false for items client can still update these + // Realistically: + // Container should already hide these + // Client is the only thing that matters. - args.Verbs.Add(verb); - } + private void OnUnequipped(EntityUid uid, SharedSpriteComponent component, GotUnequippedEvent args) + { + component.Visible = true; + } - /// - /// Notifies any entity that is holding or wearing this item that they may need to update their sprite. - /// - public virtual void VisualsChanged(EntityUid owner, SharedItemComponent? item = null) - { } + private void OnEquipped(EntityUid uid, SharedSpriteComponent component, GotEquippedEvent args) + { + component.Visible = false; + } + + private void AddPickupVerb(EntityUid uid, ItemComponent component, GetVerbsEvent args) + { + if (args.Hands == null || + args.Using != null || + !args.CanAccess || + !args.CanInteract) //|| + //!_handsSystem.CanPickupAnyHand(args.User, args.Target, handsComp: args.Hands, item: component)) + return; + + InteractionVerb verb = new(); + // TODO ITEM + //verb.Act = () => _handsSystem.TryPickupAnyHand(args.User, args.Target, checkActionBlocker: false, + // handsComp: args.Hands, item: component); + verb.IconTexture = "/Textures/Interface/VerbIcons/pickup.svg.192dpi.png"; + + // if the item already in a container (that is not the same as the user's), then change the text. + // this occurs when the item is in their inventory or in an open backpack + _container.TryGetContainingContainer(args.User, out var userContainer); + if (_container.TryGetContainingContainer(args.Target, out var container) && container != userContainer) + verb.Text = Loc.GetString("pick-up-verb-get-data-text-inventory"); + else + verb.Text = Loc.GetString("pick-up-verb-get-data-text"); + + args.Verbs.Add(verb); + } + + /// + /// Notifies any entity that is holding or wearing this item that they may need to update their sprite. + /// + /// + /// This is used for updating both inhand sprites and clothing sprites, but it's here just cause it needs to + /// be in one place. + /// + public virtual void VisualsChanged(EntityUid owner) + { } } diff --git a/Resources/Prototypes/Catalog/Fills/Boxes/emergency.yml b/Resources/Prototypes/Catalog/Fills/Boxes/emergency.yml index bb7fe28238..24064c3072 100644 --- a/Resources/Prototypes/Catalog/Fills/Boxes/emergency.yml +++ b/Resources/Prototypes/Catalog/Fills/Boxes/emergency.yml @@ -87,7 +87,7 @@ - state: box_hug - state: heart - type: Item - HeldPrefix: hug + heldPrefix: hug - type: StorageFill contents: - id: ClothingMaskBreath diff --git a/Resources/Prototypes/Catalog/Fills/Boxes/general.yml b/Resources/Prototypes/Catalog/Fills/Boxes/general.yml index c564c814ac..5f659abe16 100644 --- a/Resources/Prototypes/Catalog/Fills/Boxes/general.yml +++ b/Resources/Prototypes/Catalog/Fills/Boxes/general.yml @@ -177,7 +177,7 @@ - state: box_hug - state: heart - type: Item - HeldPrefix: hug + heldPrefix: hug - type: StorageFill contents: - id: Brutepack diff --git a/Resources/Prototypes/Entities/Clothing/Back/backpacks.yml b/Resources/Prototypes/Entities/Clothing/Back/backpacks.yml index b196406a37..8ddbe7d648 100644 --- a/Resources/Prototypes/Entities/Clothing/Back/backpacks.yml +++ b/Resources/Prototypes/Entities/Clothing/Back/backpacks.yml @@ -7,10 +7,12 @@ - type: Sprite sprite: Clothing/Back/Backpacks/backpack.rsi state: icon - - type: Clothing + - type: Item size: 9999 + sprite: Clothing/Back/Backpacks/backpack.rsi + - type: Clothing quickEquip: false - Slots: + slots: - back sprite: Clothing/Back/Backpacks/backpack.rsi - type: Storage @@ -32,7 +34,7 @@ sprite: Clothing/Back/Backpacks/clown.rsi - type: Storage storageOpenSound: - collection: BikeHorn + collection: BikeHorn - type: entity parent: ClothingBackpack @@ -88,11 +90,7 @@ sprite: Clothing/Back/Backpacks/mime.rsi - type: Clothing sprite: Clothing/Back/Backpacks/mime.rsi - storageOpenSound: - collection: null - storageInsertSound: - collection: null - + - type: entity parent: ClothingBackpack id: ClothingBackpackChemistry @@ -136,7 +134,7 @@ sprite: Clothing/Back/Backpacks/virology.rsi - type: Clothing sprite: Clothing/Back/Backpacks/virology.rsi - + #ERT - type: entity parent: ClothingBackpack diff --git a/Resources/Prototypes/Entities/Clothing/Back/duffel.yml b/Resources/Prototypes/Entities/Clothing/Back/duffel.yml index 861a781d6a..43f560fb2e 100644 --- a/Resources/Prototypes/Entities/Clothing/Back/duffel.yml +++ b/Resources/Prototypes/Entities/Clothing/Back/duffel.yml @@ -7,11 +7,13 @@ - type: Sprite sprite: Clothing/Back/Duffels/duffel.rsi state: icon - - type: Clothing + - type: Item sprite: Clothing/Back/Duffels/duffel.rsi size: 9999 + - type: Clothing + sprite: Clothing/Back/Duffels/duffel.rsi quickEquip: false - Slots: + slots: - back - type: Storage capacity: 120 @@ -66,6 +68,7 @@ sprite: Clothing/Back/Duffels/clown.rsi - type: Clothing sprite: Clothing/Back/Duffels/clown.rsi + - type: Storage storageOpenSound: collection: BikeHorn @@ -102,9 +105,9 @@ - type: Clothing sprite: Clothing/Back/Duffels/mime.rsi storageOpenSound: - collection: null + collection: null storageInsertSound: - collection: null + collection: null - type: entity parent: ClothingBackpackDuffel @@ -140,7 +143,7 @@ state: icon-ammo - type: Clothing sprite: Clothing/Back/Duffels/syndicate.rsi - HeldPrefix: ammo + heldPrefix: ammo - type: entity parent: ClothingBackpackDuffelSyndicate @@ -152,7 +155,7 @@ state: icon-med - type: Clothing sprite: Clothing/Back/Duffels/syndicate.rsi - HeldPrefix: med + heldPrefix: med - type: entity parent: ClothingBackpackDuffel diff --git a/Resources/Prototypes/Entities/Clothing/Back/satchel.yml b/Resources/Prototypes/Entities/Clothing/Back/satchel.yml index 8b02102527..10b60eb945 100644 --- a/Resources/Prototypes/Entities/Clothing/Back/satchel.yml +++ b/Resources/Prototypes/Entities/Clothing/Back/satchel.yml @@ -7,10 +7,11 @@ - type: Sprite sprite: Clothing/Back/Satchels/satchel.rsi state: icon - - type: Clothing + - type: Item size: 9999 + - type: Clothing quickEquip: false - Slots: + slots: - back sprite: Clothing/Back/Satchels/satchel.rsi - type: Storage diff --git a/Resources/Prototypes/Entities/Clothing/Belt/base_clothingbelt.yml b/Resources/Prototypes/Entities/Clothing/Belt/base_clothingbelt.yml index 464f5e5270..a7893d096e 100644 --- a/Resources/Prototypes/Entities/Clothing/Belt/base_clothingbelt.yml +++ b/Resources/Prototypes/Entities/Clothing/Belt/base_clothingbelt.yml @@ -5,10 +5,12 @@ components: - type: Sprite state: icon - - type: Clothing - Slots: [belt] + - type: Item size: 50 + - type: Clothing + slots: [belt] quickEquip: false + - type: Storage equipSound: path: /Audio/Items/belt_equip.ogg diff --git a/Resources/Prototypes/Entities/Clothing/Ears/headsets.yml b/Resources/Prototypes/Entities/Clothing/Ears/headsets.yml index 628c1c06c7..09899d627a 100644 --- a/Resources/Prototypes/Entities/Clothing/Ears/headsets.yml +++ b/Resources/Prototypes/Entities/Clothing/Ears/headsets.yml @@ -9,7 +9,7 @@ - type: Sprite state: icon - type: Clothing - Slots: + slots: - ears sprite: Clothing/Ears/Headsets/base.rsi diff --git a/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml b/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml index 3ca1232477..09e3a66dcf 100644 --- a/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml +++ b/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml @@ -9,7 +9,7 @@ - type: Sprite state: icon_alt - type: Clothing - Slots: + slots: - ears - type: entity diff --git a/Resources/Prototypes/Entities/Clothing/Eyes/base_clothingeyes.yml b/Resources/Prototypes/Entities/Clothing/Eyes/base_clothingeyes.yml index dd2044c6aa..dc37811fb8 100644 --- a/Resources/Prototypes/Entities/Clothing/Eyes/base_clothingeyes.yml +++ b/Resources/Prototypes/Entities/Clothing/Eyes/base_clothingeyes.yml @@ -6,4 +6,4 @@ - type: Sprite state: icon - type: Clothing - Slots: [eyes] + slots: [eyes] diff --git a/Resources/Prototypes/Entities/Clothing/Eyes/glasses.yml b/Resources/Prototypes/Entities/Clothing/Eyes/glasses.yml index 22a0ab4977..d18a070b2d 100644 --- a/Resources/Prototypes/Entities/Clothing/Eyes/glasses.yml +++ b/Resources/Prototypes/Entities/Clothing/Eyes/glasses.yml @@ -35,7 +35,9 @@ state: icon-alt - type: Clothing sprite: Clothing/Eyes/Glasses/gar.rsi - HeldPrefix: alt + equippedPrefix: alt + - type: Item + heldPrefix: alt - type: MeleeWeapon damage: types: @@ -52,7 +54,9 @@ state: icon-super - type: Clothing sprite: Clothing/Eyes/Glasses/gar.rsi - HeldPrefix: super + equippedPrefix: super + - type: Item + heldPrefix: super - type: MeleeWeapon damage: types: diff --git a/Resources/Prototypes/Entities/Clothing/Hands/base_clothinghands.yml b/Resources/Prototypes/Entities/Clothing/Hands/base_clothinghands.yml index c549933051..694f2fc3fa 100644 --- a/Resources/Prototypes/Entities/Clothing/Hands/base_clothinghands.yml +++ b/Resources/Prototypes/Entities/Clothing/Hands/base_clothinghands.yml @@ -6,6 +6,6 @@ - type: Sprite state: icon - type: Clothing - Slots: [gloves] + slots: [gloves] - type: DiseaseProtection protection: 0.05 diff --git a/Resources/Prototypes/Entities/Clothing/Hands/colored.yml b/Resources/Prototypes/Entities/Clothing/Hands/colored.yml index 9db664b706..aec4e12e3d 100644 --- a/Resources/Prototypes/Entities/Clothing/Hands/colored.yml +++ b/Resources/Prototypes/Entities/Clothing/Hands/colored.yml @@ -38,7 +38,8 @@ sprite: Clothing/Hands/Gloves/Color/black.rsi - type: Clothing sprite: Clothing/Hands/Gloves/Color/black.rsi - HeatResistance: 1400 + - type: GloveHeatResistance + heatResistance: 1400 - type: Fiber fiberMaterial: fibers-synthetic fiberColor: fibers-black @@ -159,7 +160,8 @@ sprite: Clothing/Hands/Gloves/Color/yellow.rsi - type: Clothing sprite: Clothing/Hands/Gloves/Color/yellow.rsi - HeatResistance: 1400 + - type: GloveHeatResistance + heatResistance: 1400 - type: Insulated - type: Fiber fiberMaterial: fibers-insulative @@ -173,7 +175,8 @@ description: These gloves are cheap knockoffs of the coveted ones - no way this can end badly. components: - type: Clothing - HeatResistance: 0 + - type: GloveHeatResistance + heatResistance: 0 - type: Insulated - type: Fiber fiberMaterial: fibers-insulative diff --git a/Resources/Prototypes/Entities/Clothing/Hands/gloves.yml b/Resources/Prototypes/Entities/Clothing/Hands/gloves.yml index 6c5d05ea6d..add4312658 100644 --- a/Resources/Prototypes/Entities/Clothing/Hands/gloves.yml +++ b/Resources/Prototypes/Entities/Clothing/Hands/gloves.yml @@ -34,7 +34,7 @@ state: icon-blue - type: Clothing sprite: Clothing/Hands/Gloves/boxing.rsi - HeldPrefix: blue + heldPrefix: blue - type: Fiber fiberMaterial: fibers-leather fiberColor: fibers-blue @@ -51,7 +51,7 @@ state: icon-green - type: Clothing sprite: Clothing/Hands/Gloves/boxing.rsi - HeldPrefix: green + heldPrefix: green - type: Fiber fiberMaterial: fibers-leather fiberColor: fibers-green @@ -68,7 +68,7 @@ state: icon-yellow - type: Clothing sprite: Clothing/Hands/Gloves/boxing.rsi - HeldPrefix: yellow + heldPrefix: yellow - type: Fiber fiberMaterial: fibers-leather fiberColor: fibers-yellow @@ -84,7 +84,8 @@ sprite: Clothing/Hands/Gloves/captain.rsi - type: Clothing sprite: Clothing/Hands/Gloves/captain.rsi - HeatResistance: 1400 + - type: GloveHeatResistance + heatResistance: 1400 - type: Insulated - type: Fiber fiberMaterial: fibers-durathread @@ -148,7 +149,8 @@ sprite: Clothing/Hands/Gloves/leather.rsi - type: Clothing sprite: Clothing/Hands/Gloves/leather.rsi - HeatResistance: 1400 + - type: GloveHeatResistance + heatResistance: 1400 - type: Fiber fiberMaterial: fibers-leather fiberColor: fibers-brown @@ -193,7 +195,8 @@ sprite: Clothing/Hands/Gloves/spaceninja.rsi - type: Clothing sprite: Clothing/Hands/Gloves/spaceninja.rsi - HeatResistance: 1400 + - type: GloveHeatResistance + heatResistance: 1400 - type: Insulated - type: Fiber fiberMaterial: fibers-nanomachines @@ -212,7 +215,8 @@ sprite: Clothing/Hands/Gloves/Color/black.rsi - type: Clothing sprite: Clothing/Hands/Gloves/Color/black.rsi - HeatResistance: 1400 + - type: GloveHeatResistance + heatResistance: 1400 - type: Insulated - type: Fiber fiberMaterial: fibers-insulative diff --git a/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml b/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml index 2d5537b857..08a4a34540 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml @@ -4,7 +4,7 @@ id: ClothingHeadBase components: - type: Clothing - Slots: + slots: - HEAD - type: Sprite state: icon @@ -18,18 +18,54 @@ id: HatBase components: - type: Clothing - Slots: + slots: - HEAD - type: Sprite state: icon +- type: entity + abstract: true + parent: ClothingHeadBase + id: ClothingHeadLightBase + name: base helmet with light + noSpawn: true + components: + - type: Sprite + netsync: false + layers: + - state: icon + - state: icon-flash + visible: false + map: [ "light" ] + - type: Clothing + heldPrefix: off + - type: ToggleableLightVisuals + - type: PointLight + netsync: false + enabled: false + radius: 6 + energy: 2 + mask: /Textures/Effects/LightMasks/cone.png + autoRot: true + - type: Appearance + visuals: + - type: FlashLightVisualizer + - type: HandheldLight + addPrefix: true + - type: Battery + maxCharge: 600 #lights drain 3/s but recharge of 2 makes this 1/s. Therefore 600 is 10 minutes of light. + startingCharge: 600 + - type: BatterySelfRecharger + autoRecharge: true + autoRechargeRate: 2 #recharge of 2 makes total drain 1w / s so max charge is 1:1 with time. Time to fully charge should be 5 minutes. Having recharge gives light an extended flicker period which gives you some warning to return to light area. + - type: entity abstract: true parent: ClothingHeadBase id: ClothingHeadEVAHelmetBase name: base space helmet components: - - type: Clothing + - type: Item size: 10 - type: PressureProtection highPressureMultiplier: 0.6 @@ -46,18 +82,19 @@ - type: entity abstract: true - parent: ClothingHeadBase + # No parent since we aren't actually an item. id: ClothingHeadHardsuitBase name: base hardsuit helmet noSpawn: true components: + - type: Clickable + - type: InteractionOutline - type: Clothing #Apparently the hardsuit helmet equip sound is from a walking mech? equipSound: /Audio/Mecha/mechmove03.ogg unequipSound: /Audio/Mecha/mechmove03.ogg - size: 15 - canPickup: false # attached to suit. quickEquip: false + slots: [ HEAD ] - type: PressureProtection highPressureMultiplier: 0.3 lowPressureMultiplier: 1000 @@ -94,7 +131,7 @@ visible: false map: [ "light" ] - type: Clothing - HeldPrefix: off + equippedPrefix: off - type: ToggleableLightVisuals - type: PointLight netsync: false diff --git a/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml b/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml index f40a561fac..b50c336fce 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml @@ -12,7 +12,7 @@ visible: false map: [ "light" ] - type: Clothing - HeldPrefix: off + equippedPrefix: off - type: PointLight netsync: false enabled: false diff --git a/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml b/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml index 6945f861ac..ec3687f783 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml @@ -20,13 +20,6 @@ addPrefix: false - type: ToggleableLightVisuals spriteLayer: light - inhandVisuals: - left: - - state: inhand-left-light - shader: unshaded - right: - - state: inhand-right-light - shader: unshaded clothingVisuals: head: - state: equipped-head-light @@ -37,15 +30,6 @@ - state: equipped-head - state: equipped-head-unshaded shader: unshaded - inhandVisuals: - left: - - state: inhand-left - - state: inhand-left-unshaded - shader: unshaded - right: - - state: inhand-right - - state: inhand-right-unshaded - shader: unshaded - type: PressureProtection highPressureMultiplier: 0.08 lowPressureMultiplier: 10000 @@ -59,7 +43,7 @@ Radiation: 0.5 - type: TemperatureProtection coefficient: 0.005 - + - type: entity parent: ClothingHeadHardsuitBase id: ClothingHeadHelmetHardsuitCap @@ -186,7 +170,7 @@ coefficients: Blunt: 0.8 Slash: 0.8 - Piercing: 0.8 + Piercing: 0.8 - type: PointLight radius: 7 energy: 3 @@ -211,7 +195,7 @@ Blunt: 0.8 Slash: 0.8 Piercing: 0.8 - + - type: entity parent: ClothingHeadHardsuitWithLightBase id: ClothingHeadHelmetHardsuitSecurityRed @@ -287,13 +271,13 @@ - type: PressureProtection highPressureMultiplier: 0.225 lowPressureMultiplier: 10000 - + - type: entity parent: ClothingHeadHardsuitWithLightBase id: ClothingHeadHelmetHardsuitSpatio noSpawn: true name: spationaut hardsuit helmet - description: A sturdy helmet designed for complex industrial operations in space. + description: A sturdy helmet designed for complex industrial operations in space. components: - type: Sprite netsync: false @@ -308,13 +292,6 @@ map: [ "light" ] - type: HandheldLight addPrefix: false - inhandVisuals: - left: - - state: inhand-left-light - shader: unshaded - right: - - state: inhand-right-light - shader: unshaded clothingVisuals: head: - state: equipped-head-light @@ -325,15 +302,6 @@ - state: equipped-head - state: equipped-head-unshaded shader: unshaded - inhandVisuals: - left: - - state: inhand-left - - state: inhand-left-unshaded - shader: unshaded - right: - - state: inhand-right - - state: inhand-right-unshaded - shader: unshaded - type: PressureProtection highPressureMultiplier: 0.72 lowPressureMultiplier: 10000 @@ -351,7 +319,7 @@ sprite: Clothing/Head/Hardsuits/cybersun.rsi - type: PressureProtection highPressureMultiplier: 0.3 - lowPressureMultiplier: 1000 + lowPressureMultiplier: 1000 - type: entity parent: ClothingHeadHardsuitWithLightBase @@ -395,7 +363,7 @@ highPressureMultiplier: 0.08 lowPressureMultiplier: 1000 - type: TemperatureProtection - coefficient: 0.005 + coefficient: 0.005 - type: Armor modifiers: coefficients: @@ -429,22 +397,13 @@ - state: equipped-head - state: equipped-head-unshaded shader: unshaded - inhandVisuals: - left: - - state: inhand-left - - state: inhand-left-unshaded - shader: unshaded - right: - - state: inhand-right - - state: inhand-right-unshaded - shader: unshaded - type: PointLight color: orange - type: PressureProtection highPressureMultiplier: 0.08 lowPressureMultiplier: 1000 - type: TemperatureProtection - coefficient: 0.005 + coefficient: 0.005 - type: Armor modifiers: coefficients: @@ -467,7 +426,7 @@ sprite: Clothing/Head/Hardsuits/ERThelmets/ertleader.rsi - type: Clothing sprite: Clothing/Head/Hardsuits/ERThelmets/ertleader.rsi - + - type: entity parent: ClothingHeadHelmetHardsuitERTLeader id: ClothingHeadHelmetHardsuitERTEngineer @@ -477,7 +436,7 @@ sprite: Clothing/Head/Hardsuits/ERThelmets/ertengineer.rsi - type: Clothing sprite: Clothing/Head/Hardsuits/ERThelmets/ertengineer.rsi - + - type: entity parent: ClothingHeadHelmetHardsuitERTLeader id: ClothingHeadHelmetHardsuitERTMedical @@ -487,7 +446,7 @@ sprite: Clothing/Head/Hardsuits/ERThelmets/ertmedical.rsi - type: Clothing sprite: Clothing/Head/Hardsuits/ERThelmets/ertmedical.rsi - + - type: entity parent: ClothingHeadHelmetHardsuitERTLeader id: ClothingHeadHelmetHardsuitERTSecurity @@ -497,7 +456,7 @@ sprite: Clothing/Head/Hardsuits/ERThelmets/ertsecurity.rsi - type: Clothing sprite: Clothing/Head/Hardsuits/ERThelmets/ertsecurity.rsi - + - type: entity parent: ClothingHeadHelmetHardsuitERTLeader id: ClothingHeadHelmetHardsuitERTJanitor diff --git a/Resources/Prototypes/Entities/Clothing/Head/helmets.yml b/Resources/Prototypes/Entities/Clothing/Head/helmets.yml index 140a2686cf..fa8c59618e 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/helmets.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/helmets.yml @@ -196,7 +196,7 @@ - type: IdentityBlocker - type: entity - parent: ClothingHeadHardsuitWithLightBase + parent: ClothingHeadLightBase id: ClothingHeadHelmetFire name: fire helmet description: An atmos techs best friend. Provides some heat resistance and looks cool. @@ -205,8 +205,6 @@ sprite: Clothing/Head/Helmets/firehelmet.rsi - type: Clothing sprite: Clothing/Head/Helmets/firehelmet.rsi - size: 5 - canPickup: true quickEquip: true - type: IngestionBlocker - type: PowerCellSlot @@ -228,7 +226,7 @@ - type: IdentityBlocker - type: entity - parent: ClothingHeadHardsuitWithLightBase + parent: ClothingHeadLightBase id: ClothingHeadHelmetAtmosFire name: atmos fire helmet description: An atmos fire helmet, able to keep the user cool in any situation. @@ -237,8 +235,6 @@ sprite: Clothing/Head/Helmets/atmos_firehelmet.rsi - type: Clothing sprite: Clothing/Head/Helmets/atmos_firehelmet.rsi - size: 5 - canPickup: true quickEquip: true - type: IngestionBlocker - type: TemperatureProtection diff --git a/Resources/Prototypes/Entities/Clothing/Masks/base_clothingmask.yml b/Resources/Prototypes/Entities/Clothing/Masks/base_clothingmask.yml index d194d0fe18..c7b841bdfb 100644 --- a/Resources/Prototypes/Entities/Clothing/Masks/base_clothingmask.yml +++ b/Resources/Prototypes/Entities/Clothing/Masks/base_clothingmask.yml @@ -6,7 +6,7 @@ - type: Sprite state: icon - type: Clothing - Slots: [mask] + slots: [mask] - type: entity abstract: true @@ -19,4 +19,4 @@ description: action-description-mask-toggle icon: Clothing/Mask/gas.rsi/icon.png iconOn: Interface/Inventory/blocked.png - event: !type:ToggleMaskEvent \ No newline at end of file + event: !type:ToggleMaskEvent diff --git a/Resources/Prototypes/Entities/Clothing/Neck/base_clothingneck.yml b/Resources/Prototypes/Entities/Clothing/Neck/base_clothingneck.yml index da6a584513..c8b18fafa1 100644 --- a/Resources/Prototypes/Entities/Clothing/Neck/base_clothingneck.yml +++ b/Resources/Prototypes/Entities/Clothing/Neck/base_clothingneck.yml @@ -3,10 +3,11 @@ parent: Clothing id: ClothingNeckBase components: - - type: Clothing + - type: Item size: 10 + - type: Clothing quickEquip: true - Slots: + slots: - neck - type: Sprite state: icon diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml index ea67a74d23..75d860235d 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml @@ -4,7 +4,7 @@ id: ClothingOuterBase components: - type: Clothing - Slots: + slots: - outerClothing - type: Sprite state: icon @@ -14,9 +14,10 @@ parent: ClothingOuterBase id: ClothingOuterBaseLarge components: + - type: Item + size: 80 - type: Clothing - Size: 80 - Slots: + slots: - outerClothing - type: ClothingSpeedModifier walkModifier: 0.9 @@ -48,7 +49,7 @@ - type: ClothingSpeedModifier walkModifier: 0.4 sprintModifier: 0.6 - - type: Clothing + - type: Item size: 121 - type: Armor modifiers: @@ -76,7 +77,7 @@ - type: ClothingSpeedModifier walkModifier: 0.8 sprintModifier: 0.8 - - type: Clothing + - type: Item size: 80 - type: DiseaseProtection protection: 0.05 diff --git a/Resources/Prototypes/Entities/Clothing/Shoes/base_clothingshoes.yml b/Resources/Prototypes/Entities/Clothing/Shoes/base_clothingshoes.yml index 247f7eb5fa..f13b3c3b2d 100644 --- a/Resources/Prototypes/Entities/Clothing/Shoes/base_clothingshoes.yml +++ b/Resources/Prototypes/Entities/Clothing/Shoes/base_clothingshoes.yml @@ -4,7 +4,7 @@ id: ClothingShoesBase components: - type: Clothing - Slots: + slots: - FEET - type: Sprite state: icon diff --git a/Resources/Prototypes/Entities/Clothing/Uniforms/base_clothinguniforms.yml b/Resources/Prototypes/Entities/Clothing/Uniforms/base_clothinguniforms.yml index e7075936f8..e564824e41 100644 --- a/Resources/Prototypes/Entities/Clothing/Uniforms/base_clothinguniforms.yml +++ b/Resources/Prototypes/Entities/Clothing/Uniforms/base_clothinguniforms.yml @@ -18,7 +18,7 @@ - type: Sprite state: icon - type: Clothing - Slots: [innerclothing] + slots: [innerclothing] equipSound: path: /Audio/Items/jumpsuit_equip.ogg - type: Butcherable @@ -35,7 +35,7 @@ - type: Sprite state: icon - type: Clothing - Slots: [innerclothing] + slots: [innerclothing] femaleMask: UniformTop equipSound: path: /Audio/Items/jumpsuit_equip.ogg diff --git a/Resources/Prototypes/Entities/Clothing/base_clothing.yml b/Resources/Prototypes/Entities/Clothing/base_clothing.yml index b8b2438ec1..60b0545d47 100644 --- a/Resources/Prototypes/Entities/Clothing/base_clothing.yml +++ b/Resources/Prototypes/Entities/Clothing/base_clothing.yml @@ -5,5 +5,3 @@ components: - type: Sprite netsync: false - - type: Clothing - size: 5 diff --git a/Resources/Prototypes/Entities/Debugging/debug_sweps.yml b/Resources/Prototypes/Entities/Debugging/debug_sweps.yml index eb24f901d1..4bf01590d3 100644 --- a/Resources/Prototypes/Entities/Debugging/debug_sweps.yml +++ b/Resources/Prototypes/Entities/Debugging/debug_sweps.yml @@ -83,7 +83,6 @@ - type: Item size: 1 sprite: Objects/Weapons/Melee/debug.rsi - prefix: inhand - type: entity name: bang stick 100dmg diff --git a/Resources/Prototypes/Entities/Debugging/spanisharmyknife.yml b/Resources/Prototypes/Entities/Debugging/spanisharmyknife.yml index 64fdc843c3..66e2b35ad8 100644 --- a/Resources/Prototypes/Entities/Debugging/spanisharmyknife.yml +++ b/Resources/Prototypes/Entities/Debugging/spanisharmyknife.yml @@ -14,7 +14,7 @@ - type: Clothing sprite: Objects/Tools/debug.rsi quickEquip: false - Slots: + slots: - Belt - type: MeleeWeapon damage: diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index fd7cfda3ef..4da0da6c1f 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -756,12 +756,13 @@ layers: - map: ["enum.DamageStateVisualLayers.Base"] state: mouse-0 - - type: Clothing + - type: Item size: 5 + - type: Clothing quickEquip: false sprite: Mobs/Animals/mouse.rsi - HeldPrefix: 0 - Slots: + equippedPrefix: 0 + slots: - HEAD - type: Physics - type: Fixtures @@ -861,7 +862,7 @@ state: mouse-1 sprite: Mobs/Animals/mouse.rsi - type: Clothing - HeldPrefix: 1 + equippedPrefix: 1 - type: Appearance - type: DamageStateVisuals states: @@ -887,7 +888,7 @@ state: mouse-2 sprite: Mobs/Animals/mouse.rsi - type: Clothing - HeldPrefix: 1 + equippedPrefix: 1 - type: Appearance - type: DamageStateVisuals states: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml index 453cf74dfd..885d5f8393 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml @@ -69,7 +69,7 @@ - type: Sprite state: homer - type: Item - HeldPrefix: pink + heldPrefix: pink - type: entity name: chaos donut @@ -100,7 +100,7 @@ - type: Sprite state: pink - type: Item - HeldPrefix: pink + heldPrefix: pink - type: entity name: spaceman's donut @@ -202,7 +202,7 @@ - type: Sprite state: jelly-homer - type: Item - HeldPrefix: pink + heldPrefix: pink - type: SolutionContainerManager solutions: food: @@ -222,7 +222,7 @@ - type: Sprite state: jelly-pink - type: Item - HeldPrefix: pink + heldPrefix: pink - type: SolutionContainerManager solutions: food: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/box.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/box.yml index c4edd40606..65aa08db09 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/box.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/box.yml @@ -23,7 +23,7 @@ - type: Item sprite: Objects/Consumable/Food/Baked/donut.rsi size: 6 - HeldPrefix: box + heldPrefix: box - type: StorageFill contents: - id: FoodDonutPink @@ -66,7 +66,6 @@ - Egg - type: Item sprite: Objects/Consumable/Food/egg.rsi - state: box-closed size: 12 - type: StorageFill contents: @@ -159,7 +158,7 @@ - Pizza - type: Item sprite: Objects/Consumable/Food/Baked/pizza.rsi - HeldPrefix: box + heldPrefix: box - type: Appearance visuals: - type: StorageVisualizer @@ -224,7 +223,7 @@ - type: Item sprite: Objects/Consumable/Food/Baked/nuggets.rsi size: 6 - HeldPrefix: box + heldPrefix: box - type: StorageFill contents: - id: FoodBakedNugget @@ -266,7 +265,6 @@ - type: Item sprite: Objects/Consumable/Food/Baked/donkpocket.rsi size: 6 - color: red - type: StorageFill contents: - id: FoodDonkpocket @@ -309,7 +307,6 @@ state: pizza-box - type: Item sprite: Objects/Consumable/Food/Baked/donkpocket.rsi - color: white - type: StorageFill contents: - id: FoodDonkpocketPizza @@ -324,7 +321,6 @@ state: gondola-box - type: Item sprite: Objects/Consumable/Food/Baked/donkpocket.rsi - color: brown - type: StorageFill contents: - id: FoodDonkpocketGondola @@ -353,7 +349,6 @@ state: banana-box - type: Item sprite: Objects/Consumable/Food/Baked/donkpocket.rsi - color: yellow - type: StorageFill contents: - id: FoodDonkpocketHonk @@ -369,7 +364,6 @@ state: dink-box - type: Item sprite: Objects/Consumable/Food/Baked/donkpocket.rsi - color: green - type: StorageFill contents: - id: FoodDonkpocketDink diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/tin.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/tin.yml index 5f1a037f94..480e486410 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/tin.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/tin.yml @@ -16,9 +16,8 @@ netsync: false - type: Item sprite: Objects/Consumable/Food/snacks.rsi - HeldPrefix: packet + heldPrefix: packet size: 3 - color: gray - type: DamageOnLand damage: types: @@ -42,8 +41,7 @@ netsync: false - type: Item sprite: Objects/Consumable/Food/snacks.rsi - HeldPrefix: packet - color: gray + heldPrefix: packet size: 3 # Tins diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml index 1a08573510..398ff4fe0f 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml @@ -118,7 +118,6 @@ - type: Item size: 10 sprite: Objects/Specific/Hydroponics/nettle.rsi - prefix: inhand - type: MeleeWeapon damage: types: @@ -175,7 +174,7 @@ state: peel - type: Item sprite: Objects/Specific/Hydroponics/banana.rsi - HeldPrefix: peel + heldPrefix: peel - type: Slippery launchForwardsMultiplier: 1.5 - type: StepTrigger @@ -723,7 +722,7 @@ grindableSolutionName: food - type: Clothing sprite: Objects/Specific/Hydroponics/ambrosia_vulgaris.rsi - Slots: + slots: - HEAD - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml index 58ae892d56..ed5173a0a3 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml @@ -18,7 +18,7 @@ Quantity: 10 - type: Item sprite: Objects/Consumable/Food/snacks.rsi - HeldPrefix: packet + heldPrefix: packet size: 3 # Snacks @@ -34,7 +34,6 @@ - type: Sprite state: boritos - type: Item - color: blue - type: Food trash: FoodPacketBoritosTrash @@ -47,7 +46,6 @@ - type: Sprite state: cheesiehonkers - type: Item - color: orange - type: Food trash: FoodPacketCheesieTrash @@ -60,7 +58,6 @@ - type: Sprite state: chips - type: Item - color: green - type: Food trash: FoodPacketChipsTrash @@ -75,7 +72,7 @@ state: chocolatebar netsync: false - type: Item - HeldPrefix: chocolatebar + heldPrefix: chocolatebar size: 3 - type: SpawnItemsOnUse items: @@ -93,7 +90,6 @@ - type: Sprite state: chocolatebar-open - type: Item - color: brown - type: SolutionContainerManager solutions: food: @@ -113,7 +109,6 @@ - type: Sprite state: energybar - type: Item - color: lime - type: SpawnItemsOnUse items: - id: FoodPacketEnergyTrash @@ -130,7 +125,6 @@ - type: Sprite state: energybar-open - type: Item - color: yellow - type: entity name: popcorn @@ -141,7 +135,7 @@ - type: Sprite state: popcorn - type: Item - HeldPrefix: popcorn + heldPrefix: popcorn - type: Food trash: FoodPacketPopcornTrash @@ -154,7 +148,6 @@ - type: Sprite state: raisins - type: Item - color: red - type: Food trash: FoodPacketRaisinsTrash @@ -167,7 +160,6 @@ - type: Sprite state: susjerky - type: Item - color: red - type: Food trash: FoodPacketSusTrash @@ -180,10 +172,9 @@ - type: Sprite state: syndicakes - type: Item - color: white - type: Food trash: FoodPacketSyndiTrash - + - type: entity name: chow mein parent: FoodSnackBase @@ -193,7 +184,6 @@ - type: Sprite state: chinese1 - type: Item - color: red - type: SolutionContainerManager solutions: food: @@ -205,7 +195,7 @@ Quantity: 2 - type: Food trash: FoodPacketChowMeinTrash - + - type: entity name: dan dan noodles parent: FoodSnackBase @@ -246,7 +236,7 @@ Quantity: 1 - type: Item sprite: Objects/Consumable/Food/snacks.rsi - HeldPrefix: packet + heldPrefix: packet size: 1 - type: Food trash: FoodCookieFortune @@ -291,7 +281,7 @@ - type: entity id: FoodSnackMREBrownie - parent: BaseItem + parent: BaseItem name: brownie description: A precisely mixed brownie, made to withstand blunt trauma and harsh conditions. Tastes like shit. components: @@ -305,7 +295,7 @@ - id: FoodSnackMREBrownieOpen sound: path: /Audio/Effects/unwrap.ogg - + - type: entity id: FoodSnackMREBrownieOpen @@ -339,7 +329,7 @@ netsync: false - type: Item sprite: Objects/Consumable/Food/snacks.rsi - HeldPrefix: packet + heldPrefix: packet - type: Tag tags: - Trash @@ -355,7 +345,6 @@ - type: Sprite state: boritos-trash - type: Item - color: blue - type: entity noSpawn: true @@ -366,7 +355,6 @@ - type: Sprite state: cheesiehonkers-trash - type: Item - color: orange - type: entity noSpawn: true @@ -377,7 +365,6 @@ - type: Sprite state: chips-trash - type: Item - color: green - type: entity noSpawn: true @@ -388,7 +375,6 @@ - type: Sprite state: chocolatebar-trash - type: Item - color: red - type: entity noSpawn: true @@ -399,7 +385,6 @@ - type: Sprite state: energybar-trash - type: Item - color: green - type: entity noSpawn: true @@ -410,7 +395,6 @@ - type: Sprite state: pistachio-trash - type: Item - color: green - type: entity noSpawn: true @@ -421,7 +405,6 @@ - type: Sprite state: popcorn-trash - type: Item - state: blue - type: entity noSpawn: true @@ -432,7 +415,6 @@ - type: Sprite state: raisins-trash - type: Item - color: red - type: entity noSpawn: true @@ -443,7 +425,6 @@ - type: Sprite state: semki-trash - type: Item - color: orange - type: entity noSpawn: true @@ -454,7 +435,6 @@ - type: Sprite state: susjerky-trash - type: Item - color: red - type: entity noSpawn: true @@ -465,7 +445,6 @@ - type: Sprite state: syndicakes-trash - type: Item - color: white - type: entity noSpawn: true @@ -476,8 +455,7 @@ - type: Sprite state: chinese1 - type: Item - color: red - + - type: entity noSpawn: true parent: FoodPacketTrash @@ -487,8 +465,7 @@ - type: Sprite state: chinese2 - type: Item - color: white - + - type: entity noSpawn: true parent: FoodPacketTrash @@ -499,7 +476,6 @@ - type: Sprite state: fortune - type: Item - color: white - type: entity noSpawn: true diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml index 1b26e0d7e7..87b84eeb16 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml @@ -19,8 +19,9 @@ - type: SpaceGarbage - type: Clothing sprite: Objects/Consumable/Smokeables/Cigarettes/cigarette.rsi - Slots: [ mask ] - HeldPrefix: unlit + slots: [ mask ] + equippedPrefix: unlit + - type: Item size: 1 - type: Construction graph: smokeableCigarette diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/joints.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/joints.yml index fc8d98c68c..fa3442c6db 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/joints.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/joints.yml @@ -16,8 +16,9 @@ - type: SpaceGarbage - type: Clothing sprite: Objects/Consumable/Smokeables/Cigarettes/blunt.rsi - Slots: [ mask ] - HeldPrefix: unlit + slots: [ mask ] + equippedPrefix: unlit + - type: Item size: 1 - type: Construction graph: smokeableJoint @@ -48,8 +49,9 @@ - type: SpaceGarbage - type: Clothing sprite: Objects/Consumable/Smokeables/Cigarettes/blunt.rsi - Slots: [ mask ] - HeldPrefix: unlit + slots: [ mask ] + equippedPrefix: unlit + - type: Item size: 1 - type: Construction graph: smokeableBlunt diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/cigar.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/cigar.yml index feda9610d7..4b873c7ca5 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/cigar.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/cigar.yml @@ -17,8 +17,9 @@ - Trash - type: Clothing sprite: Objects/Consumable/Smokeables/Cigars/cigar.rsi - Slots: [ mask ] - HeldPrefix: unlit + slots: [ mask ] + equippedPrefix: unlit + - type: Item size: 1 - type: entity @@ -33,6 +34,7 @@ state: unlit-icon - type: Clothing sprite: Objects/Consumable/Smokeables/Cigars/cigar-gold.rsi - Slots: [ mask ] - HeldPrefix: unlit + slots: [ mask ] + equippedPrefix: unlit + - type: Item size: 1 diff --git a/Resources/Prototypes/Entities/Objects/Devices/forensic_scanner.yml b/Resources/Prototypes/Entities/Objects/Devices/forensic_scanner.yml index 0bf63af029..1e116fef2f 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/forensic_scanner.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/forensic_scanner.yml @@ -8,11 +8,12 @@ netsync: false sprite: Objects/Devices/forensic_scanner.rsi state: forensicnew - - type: Clothing + - type: Item size: 5 + - type: Clothing sprite: Objects/Devices/forensic_scanner.rsi quickEquip: false - Slots: + slots: - Belt - type: ActivatableUI key: enum.ForensicScannerUiKey.Key diff --git a/Resources/Prototypes/Entities/Objects/Devices/pda.yml b/Resources/Prototypes/Entities/Objects/Devices/pda.yml index 2dbbc402ae..734b6b5a01 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/pda.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/pda.yml @@ -15,10 +15,11 @@ - type: Icon sprite: Objects/Devices/pda.rsi state: pda + - type: Item + size: 10 - type: Clothing quickEquip: false - size: 10 - Slots: + slots: - idcard - Belt - type: UnpoweredFlashlight diff --git a/Resources/Prototypes/Entities/Objects/Devices/radio.yml b/Resources/Prototypes/Entities/Objects/Devices/radio.yml index 3dbe515d07..223c109021 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/radio.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/radio.yml @@ -19,4 +19,4 @@ state: walkietalkie - type: Item sprite: Objects/Devices/communication.rsi - HeldPrefix: walkietalkie + heldPrefix: walkietalkie diff --git a/Resources/Prototypes/Entities/Objects/Fun/bike_horn.yml b/Resources/Prototypes/Entities/Objects/Fun/bike_horn.yml index 9b0749c73f..508d1f0fc7 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/bike_horn.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/bike_horn.yml @@ -7,10 +7,12 @@ - type: Sprite sprite: Objects/Fun/bikehorn.rsi state: icon - - type: Clothing + - type: Item sprite: Objects/Fun/bikehorn.rsi size: 5 - Slots: [Belt] + - type: Clothing + sprite: Objects/Fun/bikehorn.rsi + slots: [Belt] quickEquip: false - type: ItemCooldown - type: EmitSoundOnUse diff --git a/Resources/Prototypes/Entities/Objects/Fun/crayons.yml b/Resources/Prototypes/Entities/Objects/Fun/crayons.yml index 8dad5bfdb1..f7c2f2eaa2 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/crayons.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/crayons.yml @@ -39,7 +39,7 @@ - type: Item sprite: Objects/Fun/crayons.rsi size: 1 - HeldPrefix: white + heldPrefix: white - type: Crayon color: white capacity: 5 @@ -62,7 +62,7 @@ - type: Item sprite: Objects/Fun/crayons.rsi size: 1 - HeldPrefix: mime + heldPrefix: mime - type: Crayon color: white capacity: 5 @@ -85,7 +85,7 @@ - type: Item sprite: Objects/Fun/crayons.rsi size: 1 - HeldPrefix: rainbow + heldPrefix: rainbow - type: Crayon color: Red selectableColor: true @@ -108,7 +108,7 @@ - type: Item sprite: Objects/Fun/crayons.rsi size: 1 - HeldPrefix: black + heldPrefix: black - type: Crayon color: black capacity: 5 @@ -131,7 +131,7 @@ - type: Item sprite: Objects/Fun/crayons.rsi size: 1 - HeldPrefix: red + heldPrefix: red - type: Crayon color: red capacity: 5 @@ -154,7 +154,7 @@ - type: Item sprite: Objects/Fun/crayons.rsi size: 1 - HeldPrefix: orange + heldPrefix: orange - type: Crayon color: orange capacity: 5 @@ -177,7 +177,7 @@ - type: Item sprite: Objects/Fun/crayons.rsi size: 1 - HeldPrefix: yellow + heldPrefix: yellow - type: Crayon color: yellow capacity: 5 @@ -200,7 +200,7 @@ - type: Item sprite: Objects/Fun/crayons.rsi size: 1 - HeldPrefix: green + heldPrefix: green - type: Crayon color: green capacity: 5 @@ -223,7 +223,7 @@ - type: Item sprite: Objects/Fun/crayons.rsi size: 1 - HeldPrefix: blue + heldPrefix: blue - type: Crayon color: lightblue capacity: 5 @@ -246,7 +246,7 @@ - type: Item sprite: Objects/Fun/crayons.rsi size: 1 - HeldPrefix: purple + heldPrefix: purple - type: Crayon color: purple capacity: 5 @@ -273,7 +273,7 @@ - type: Item sprite: Objects/Fun/crayons.rsi size: 7 - HeldPrefix: box + heldPrefix: box - type: StorageFill contents: - id: CrayonRed diff --git a/Resources/Prototypes/Entities/Objects/Fun/instruments.yml b/Resources/Prototypes/Entities/Objects/Fun/instruments.yml index 7dd8b43082..9efd4955ba 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/instruments.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/instruments.yml @@ -58,10 +58,12 @@ - type: Tag tags: - StringInstrument - - type: Clothing + - type: Item + sprite: Objects/Fun/Instruments/guitar.rsi size: 24 + - type: Clothing quickEquip: false - Slots: + slots: - back sprite: Objects/Fun/Instruments/guitar.rsi @@ -267,7 +269,7 @@ "Soprano": {64: 0} "Alto": {65: 0} "Tenor": {66: 0} - "Baritone": {67: 0} + "Baritone": {67: 0} - type: Sprite sprite: Objects/Fun/Instruments/saxophone.rsi state: icon @@ -335,10 +337,12 @@ - type: Tag tags: - BrassInstrument #Go figure. - - type: Clothing - size: 24 + - type: Item sprite: Objects/Fun/Instruments/bike_horn.rsi - Slots: [Belt] + size: 24 + - type: Clothing + sprite: Objects/Fun/Instruments/bike_horn.rsi + slots: [Belt] quickEquip: false - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Fun/toys.yml b/Resources/Prototypes/Entities/Objects/Fun/toys.yml index cfc2bb12cd..128b541a6f 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/toys.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/toys.yml @@ -157,7 +157,7 @@ - type: Sprite state: carpplush - type: Item - HeldPrefix: carpplush + heldPrefix: carpplush - type: EmitSoundOnUse sound: path: /Audio/Effects/bite.ogg @@ -222,7 +222,7 @@ - type: Clothing quickEquip: false sprite: Objects/Fun/ducky.rsi - Slots: + slots: - HEAD - type: EmitSoundOnUse sound: @@ -279,7 +279,7 @@ state: doll - type: Item sprite: Objects/Fun/toys.rsi - HeldPrefix: doll + heldPrefix: doll - type: entity parent: BaseItem @@ -463,7 +463,6 @@ netsync: false - type: Item size: 24 - state: icon - type: entity parent: FoamWeaponBase @@ -477,7 +476,7 @@ - type: Item size: 24 sprite: Objects/Fun/toys.rsi - HeldPrefix: foamcrossbow + heldPrefix: foamcrossbow - type: Gun fireRate: 0.5 selectedMode: SemiAuto @@ -516,7 +515,7 @@ map: ["enum.GunVisualLayers.Base"] - type: Item sprite: Objects/Fun/toys.rsi - HeldPrefix: capgun + heldPrefix: capgun - type: Gun selectedMode: SemiAuto availableModes: @@ -551,7 +550,7 @@ - type: Item size: 24 sprite: Objects/Fun/toys.rsi - HeldPrefix: foamblade + heldPrefix: foamblade - type: ItemCooldown # MISC @@ -568,7 +567,7 @@ - type: Item size: 24 sprite: Objects/Fun/toys.rsi - HeldPrefix: bask + heldPrefix: bask - type: entity parent: BaseItem @@ -582,7 +581,7 @@ - type: Item size: 12 sprite: Objects/Fun/toys.rsi - HeldPrefix: footb + heldPrefix: footb - type: entity parent: BaseItem @@ -596,7 +595,7 @@ - type: Item size: 24 sprite: Objects/Fun/toys.rsi - HeldPrefix: synb + heldPrefix: synb - type: entity parent: BaseItem @@ -610,7 +609,7 @@ - type: Item size: 24 sprite: Objects/Fun/toys.rsi - HeldPrefix: corgib + heldPrefix: corgib - type: entity parent: BaseItem @@ -630,7 +629,7 @@ - type: Item size: 12 sprite: Objects/Fun/toys.rsi - HeldPrefix: singularitytoy + heldPrefix: singularitytoy - type: entity parent: BaseItem @@ -648,4 +647,4 @@ - type: Item size: 24 sprite: Objects/Fun/toys.rsi - HeldPrefix: orb + heldPrefix: orb diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml index 74a806e598..2cfa9d1ab7 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml @@ -58,7 +58,7 @@ - type: Sprite state: glass_3 - type: Item - HeldPrefix: glass + heldPrefix: glass - type: Appearance visuals: - type: StackVisualizer @@ -99,7 +99,7 @@ - type: Sprite state: rglass_3 - type: Item - HeldPrefix: rglass + heldPrefix: rglass - type: Appearance visuals: - type: StackVisualizer @@ -140,7 +140,7 @@ - type: Sprite state: pglass_3 - type: Item - HeldPrefix: pglass + heldPrefix: pglass - type: Appearance visuals: - type: StackVisualizer @@ -178,7 +178,7 @@ - type: Sprite state: rpglass_3 - type: Item - HeldPrefix: rpglass + heldPrefix: rpglass - type: Appearance visuals: - type: StackVisualizer diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml index 50ac4b03bf..374180e6df 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml @@ -43,7 +43,7 @@ - type: Sprite state: steel_3 - type: Item - HeldPrefix: steel + heldPrefix: steel - type: Appearance visuals: - type: StackVisualizer @@ -81,7 +81,7 @@ - type: Sprite state: plasteel_3 - type: Item - HeldPrefix: plasteel + heldPrefix: plasteel - type: Appearance visuals: - type: StackVisualizer diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml index d3eb020a3e..be10a0001f 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml @@ -36,7 +36,7 @@ - type: Sprite state: paper_3 - type: Item - HeldPrefix: paper + heldPrefix: paper - type: Appearance visuals: - type: StackVisualizer @@ -70,7 +70,7 @@ - type: Sprite state: plasma_3 - type: Item - HeldPrefix: plasma + heldPrefix: plasma - type: Appearance visuals: - type: StackVisualizer @@ -120,7 +120,7 @@ - type: Sprite state: plastic_3 - type: Item - HeldPrefix: plastic + heldPrefix: plastic - type: Appearance visuals: - type: StackVisualizer @@ -154,7 +154,7 @@ - type: Sprite state: uranium - type: Item - HeldPrefix: uranium + heldPrefix: uranium - type: Extractable grindableSolutionName: uranium - type: SolutionContainerManager diff --git a/Resources/Prototypes/Entities/Objects/Materials/ingots.yml b/Resources/Prototypes/Entities/Objects/Materials/ingots.yml index 963027b594..13092cdb5e 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/ingots.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/ingots.yml @@ -41,7 +41,7 @@ - type: Sprite state: gold_3 - type: Item - HeldPrefix: gold + heldPrefix: gold - type: Appearance visuals: - type: StackVisualizer @@ -75,7 +75,7 @@ - type: Sprite state: silver_3 - type: Item - HeldPrefix: silver + heldPrefix: silver - type: Appearance visuals: - type: StackVisualizer diff --git a/Resources/Prototypes/Entities/Objects/Materials/materials.yml b/Resources/Prototypes/Entities/Objects/Materials/materials.yml index a9a4244d2a..97fca70b2d 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/materials.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/materials.yml @@ -109,7 +109,7 @@ - type: Sprite state: wood - type: Item - HeldPrefix: wood + heldPrefix: wood - type: entity parent: MaterialWoodPlank @@ -128,10 +128,12 @@ - type: Sprite sprite: Objects/Materials/materials.rsi state: bearpelt + - type: Item + sprite: Clothing/Head/Misc/hides.rsi - type: Clothing sprite: Clothing/Head/Misc/hides.rsi - HeldPrefix: bear - Slots: + heldPrefix: bear + slots: - HEAD - type: entity @@ -145,7 +147,7 @@ - type: Sprite state: diamond - type: Item - HeldPrefix: diamond + heldPrefix: diamond - type: entity parent: MaterialDiamond diff --git a/Resources/Prototypes/Entities/Objects/Materials/parts.yml b/Resources/Prototypes/Entities/Objects/Materials/parts.yml index 769f0fa498..ae93a7d923 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/parts.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/parts.yml @@ -36,7 +36,7 @@ - type: Sprite state: rods_5 # - type: Item -# HeldPrefix: rods +# heldPrefix: rods - type: Construction graph: MetalRod node: MetalRod diff --git a/Resources/Prototypes/Entities/Objects/Materials/shards.yml b/Resources/Prototypes/Entities/Objects/Materials/shards.yml index e6fd0f9617..801f62c2cd 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/shards.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/shards.yml @@ -78,8 +78,6 @@ components: - type: Sprite color: "#bbeeff" - - type: Item - color: "#bbeeff" - type: WelderRefinable refineResult: - SheetGlass1 @@ -96,8 +94,6 @@ components: - type: Sprite color: "#96cdef" - - type: Item - color: "#96cdef" - type: WelderRefinable refineResult: - SheetGlass1 @@ -115,8 +111,6 @@ components: - type: Sprite color: "#f3b489" - - type: Item - color: "#f3b489" - type: WelderRefinable refineResult: - SheetGlass1 diff --git a/Resources/Prototypes/Entities/Objects/Misc/bedsheets.yml b/Resources/Prototypes/Entities/Objects/Misc/bedsheets.yml index 64a6fb9fb5..3060df4e29 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/bedsheets.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/bedsheets.yml @@ -12,10 +12,11 @@ - type: Sprite sprite: Objects/Misc/bedsheets.rsi netsync: false - - type: Clothing + - type: Item size: 10 + - type: Clothing quickEquip: true - Slots: + slots: - neck - type: entity @@ -26,7 +27,6 @@ - type: Sprite state: sheetblack - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/black.rsi - type: entity @@ -37,7 +37,6 @@ - type: Sprite state: sheetblue - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/blue.rsi - type: entity @@ -48,7 +47,6 @@ - type: Sprite state: sheetbrown - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/brown.rsi - type: entity @@ -60,7 +58,6 @@ - type: Sprite state: sheetcaptain - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/captain.rsi - type: entity @@ -72,7 +69,6 @@ - type: Sprite state: sheetce - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/ce.rsi - type: entity @@ -84,7 +80,6 @@ - type: Sprite state: sheetcentcom - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/centcom.rsi - type: entity @@ -96,7 +91,6 @@ - type: Sprite state: sheetclown - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/rainbow.rsi - type: entity @@ -108,7 +102,6 @@ - type: Sprite state: sheetcmo - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/cmo.rsi - type: entity @@ -120,7 +113,6 @@ - type: Sprite state: sheetcosmos - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/cosmos.rsi - type: entity @@ -132,7 +124,6 @@ - type: Sprite state: sheetcult - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/cult.rsi - type: entity @@ -143,7 +134,6 @@ - type: Sprite state: sheetgreen - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/green.rsi - type: entity @@ -154,7 +144,6 @@ - type: Sprite state: sheetgrey - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/grey.rsi - type: entity @@ -166,7 +155,6 @@ - type: Sprite state: sheethop - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/hop.rsi - type: entity @@ -178,7 +166,6 @@ - type: Sprite state: sheethos - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/hos.rsi - type: entity @@ -189,7 +176,6 @@ - type: Sprite state: sheetian - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/ian.rsi - type: entity @@ -201,7 +187,6 @@ - type: Sprite state: sheetmedical - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/medical.rsi - type: entity @@ -213,7 +198,6 @@ - type: Sprite state: sheetmime - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/mime.rsi - type: entity @@ -225,7 +209,6 @@ - type: Sprite state: sheetNT - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/NT.rsi - type: entity @@ -236,7 +219,6 @@ - type: Sprite state: sheetorange - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/orange.rsi - type: entity @@ -247,7 +229,6 @@ - type: Sprite state: sheetpurple - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/purple.rsi - type: entity @@ -258,7 +239,6 @@ - type: Sprite state: sheetqm - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/qm.rsi - type: entity @@ -269,7 +249,6 @@ - type: Sprite state: sheetrainbow - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/rainbow.rsi - type: entity @@ -281,7 +260,6 @@ - type: Sprite state: sheetrd - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/rd.rsi - type: entity @@ -292,7 +270,6 @@ - type: Sprite state: sheetred - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/red.rsi - type: entity @@ -304,7 +281,6 @@ - type: Sprite state: sheetsyndie - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/syndie.rsi - type: entity @@ -315,7 +291,6 @@ - type: Sprite state: sheetUSA - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/USA.rsi - type: entity @@ -326,7 +301,6 @@ - type: Sprite state: sheetwhite - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/white.rsi - type: entity @@ -338,7 +312,6 @@ - type: Sprite state: sheetwiz - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/wiz.rsi - type: entity @@ -349,5 +322,4 @@ - type: Sprite state: sheetyellow - type: Clothing - size: 10 sprite: Clothing/Neck/Bedsheets/yellow.rsi diff --git a/Resources/Prototypes/Entities/Objects/Misc/carpets.yml b/Resources/Prototypes/Entities/Objects/Misc/carpets.yml index 6d317b6eab..4f28695328 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/carpets.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/carpets.yml @@ -7,7 +7,7 @@ - type: Sprite state: carpet-red - type: Item - HeldPrefix: carpet-red + heldPrefix: carpet-red - type: FloorTile outputs: - plating @@ -22,7 +22,7 @@ - type: Sprite state: carpet-black - type: Item - HeldPrefix: carpet-black + heldPrefix: carpet-black - type: FloorTile outputs: - plating @@ -37,7 +37,7 @@ - type: Sprite state: carpet-blue - type: Item - HeldPrefix: carpet-blue + heldPrefix: carpet-blue - type: FloorTile outputs: - plating @@ -52,7 +52,7 @@ - type: Sprite state: carpet-green - type: Item - HeldPrefix: carpet-green + heldPrefix: carpet-green - type: FloorTile outputs: - plating @@ -67,7 +67,7 @@ - type: Sprite state: carpet-orange - type: Item - HeldPrefix: carpet-orange + heldPrefix: carpet-orange - type: FloorTile outputs: - plating @@ -82,7 +82,7 @@ - type: Sprite state: carpet-skyblue - type: Item - HeldPrefix: carpet-skyblue + heldPrefix: carpet-skyblue - type: FloorTile outputs: - plating @@ -97,7 +97,7 @@ - type: Sprite state: carpet-purple - type: Item - HeldPrefix: carpet-purple + heldPrefix: carpet-purple - type: FloorTile outputs: - plating @@ -112,7 +112,7 @@ - type: Sprite state: carpet-pink - type: Item - HeldPrefix: carpet-pink + heldPrefix: carpet-pink - type: FloorTile outputs: - plating diff --git a/Resources/Prototypes/Entities/Objects/Misc/dat_fukken_disk.yml b/Resources/Prototypes/Entities/Objects/Misc/dat_fukken_disk.yml index 12752b8126..90dad3a889 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/dat_fukken_disk.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/dat_fukken_disk.yml @@ -12,7 +12,6 @@ - type: Item size: 12 sprite: Objects/Misc/nukedisk.rsi - state: icon - type: StaticPrice price: 2000 - type: WarpPoint @@ -32,6 +31,5 @@ - type: Item size: 12 sprite: Objects/Misc/nukedisk.rsi - state: icon - type: StaticPrice price: 1 # it's worth even less than normal items. Perfection. diff --git a/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml b/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml index 05de3ba21e..745154c2f7 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml @@ -8,10 +8,11 @@ - type: Sprite sprite: Objects/Misc/id_cards.rsi - type: Clothing - Slots: + slots: - idcard sprite: Objects/Misc/id_cards.rsi - HeldPrefix: default + - type: Item + heldPrefix: default - type: Access - type: IdCard - type: Tag @@ -89,8 +90,8 @@ layers: - state: gold - state: idcaptain - - type: Clothing - HeldPrefix: gold + - type: Item + heldPrefix: gold - type: PresetIdCard job: Captain @@ -319,8 +320,8 @@ layers: - state: silver - state: idheadofpersonnel - - type: Clothing - HeldPrefix: silver + - type: Item + heldPrefix: silver - type: PresetIdCard job: HeadOfPersonnel @@ -333,8 +334,8 @@ layers: - state: silver - state: idchiefengineer - - type: Clothing - HeldPrefix: silver + - type: Item + heldPrefix: silver - type: PresetIdCard job: ChiefEngineer @@ -347,8 +348,8 @@ layers: - state: silver - state: idchiefmedicalofficer - - type: Clothing - HeldPrefix: silver + - type: Item + heldPrefix: silver - type: PresetIdCard job: ChiefMedicalOfficer @@ -361,8 +362,8 @@ layers: - state: silver - state: idresearchdirector - - type: Clothing - HeldPrefix: silver + - type: Item + heldPrefix: silver - type: PresetIdCard job: ResearchDirector @@ -375,8 +376,8 @@ layers: - state: silver - state: idheadofsecurity - - type: Clothing - HeldPrefix: silver + - type: Item + heldPrefix: silver - type: PresetIdCard job: HeadOfSecurity @@ -389,8 +390,8 @@ layers: - state: gold - state: idcentcom - - type: Clothing - HeldPrefix: gold + - type: Item + heldPrefix: gold - type: IdCard jobTitle: Central Commander - type: Access @@ -406,8 +407,8 @@ layers: - state: gold - state: ert_commander # we have the sprites but don't need individual ID entities for now. - - type: Clothing - HeldPrefix: gold + - type: Item + heldPrefix: gold - type: entity parent: IDCardStandard @@ -417,8 +418,8 @@ - type: Sprite layers: - state: centcom - - type: Clothing - HeldPrefix: blue + - type: Item + heldPrefix: blue - type: IdCard jobTitle: Central Commander - type: Access @@ -445,8 +446,8 @@ - type: Sprite layers: - state: centcom - - type: Clothing - HeldPrefix: blue + - type: Item + heldPrefix: blue - type: IdCard jobTitle: Centcom Agent diff --git a/Resources/Prototypes/Entities/Objects/Misc/paper.yml b/Resources/Prototypes/Entities/Objects/Misc/paper.yml index 5ffeb25795..5b0d6ebe41 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/paper.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/paper.yml @@ -73,7 +73,7 @@ state: pen - type: Item sprite: Objects/Misc/bureaucracy.rsi - HeldPrefix: pen + heldPrefix: pen size: 2 - type: entity @@ -102,7 +102,7 @@ collection: Screwdriver - type: Item sprite: Objects/Misc/bureaucracy.rsi - HeldPrefix: overpriced_pen + heldPrefix: overpriced_pen size: 2 - type: entity @@ -114,7 +114,7 @@ - type: Sprite sprite: Objects/Misc/bureaucracy.rsi state: pen_cap - + - type: entity name: hop's fountain pen parent: Pen @@ -124,7 +124,7 @@ - type: Sprite sprite: Objects/Misc/bureaucracy.rsi state: pen_hop - + - type: entity id: BoxFolderBase parent: BoxBase diff --git a/Resources/Prototypes/Entities/Objects/Misc/tiles.yml b/Resources/Prototypes/Entities/Objects/Misc/tiles.yml index 420d472d62..28ee655bba 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/tiles.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/tiles.yml @@ -43,7 +43,7 @@ - type: Sprite state: steel - type: Item - HeldPrefix: steel + heldPrefix: steel - type: FloorTile outputs: - plating @@ -53,7 +53,7 @@ - type: Construction graph: TileSteel node: steeltile - + - type: entity name: steel tile parent: FloorTileItemBase @@ -62,7 +62,7 @@ - type: Sprite state: metaldiamond - type: Item - HeldPrefix: steel + heldPrefix: steel - type: FloorTile outputs: - plating @@ -81,7 +81,7 @@ - type: Sprite state: wood - type: Item - HeldPrefix: wood + heldPrefix: wood - type: FloorTile outputs: - plating @@ -100,7 +100,7 @@ - type: Sprite state: white - type: Item - HeldPrefix: white + heldPrefix: white - type: FloorTile outputs: - plating @@ -119,7 +119,7 @@ - type: Sprite state: dark - type: Item - HeldPrefix: dark + heldPrefix: dark - type: FloorTile outputs: - plating @@ -138,7 +138,7 @@ - type: Sprite state: techfloor - type: Item - HeldPrefix: dark + heldPrefix: dark - type: FloorTile outputs: - plating @@ -154,7 +154,7 @@ - type: Sprite state: reinforced - type: Item - HeldPrefix: reinforced + heldPrefix: reinforced - type: FloorTile outputs: - plating @@ -172,7 +172,7 @@ - type: Sprite state: monofloor - type: Item - HeldPrefix: steel + heldPrefix: steel - type: FloorTile outputs: - plating @@ -188,7 +188,7 @@ - type: Sprite state: lino - type: Item - HeldPrefix: steel + heldPrefix: steel - type: FloorTile outputs: - plating @@ -204,7 +204,7 @@ - type: Sprite state: dirty - type: Item - HeldPrefix: dirty + heldPrefix: dirty - type: FloorTile outputs: - plating @@ -220,7 +220,7 @@ - type: Sprite state: dark - type: Item - HeldPrefix: dark + heldPrefix: dark - type: FloorTile outputs: - plating @@ -236,7 +236,7 @@ - type: Sprite state: rockvault - type: Item - HeldPrefix: steel + heldPrefix: steel - type: FloorTile outputs: - plating @@ -252,7 +252,7 @@ - type: Sprite state: blue - type: Item - HeldPrefix: carpet-blue + heldPrefix: carpet-blue - type: FloorTile outputs: - plating @@ -269,7 +269,7 @@ - type: Sprite state: showroom - type: Item - HeldPrefix: showroom + heldPrefix: showroom - type: FloorTile outputs: - plating @@ -285,7 +285,7 @@ - type: Sprite state: showroom - type: Item - HeldPrefix: showroom + heldPrefix: showroom - type: FloorTile outputs: - plating @@ -301,7 +301,7 @@ - type: Sprite state: hydro - type: Item - HeldPrefix: hydro + heldPrefix: hydro - type: FloorTile outputs: - plating @@ -317,7 +317,7 @@ - type: Sprite state: bar - type: Item - HeldPrefix: steel + heldPrefix: steel - type: FloorTile outputs: - plating @@ -333,7 +333,7 @@ - type: Sprite state: clown - type: Item - HeldPrefix: steel + heldPrefix: steel - type: FloorTile outputs: - plating @@ -349,7 +349,7 @@ - type: Sprite state: mime - type: Item - HeldPrefix: steel + heldPrefix: steel - type: FloorTile outputs: - plating @@ -365,7 +365,7 @@ - type: Sprite state: kitchen - type: Item - HeldPrefix: dark + heldPrefix: dark - type: FloorTile outputs: - plating @@ -381,7 +381,7 @@ - type: Sprite state: laundry - type: Item - HeldPrefix: steel + heldPrefix: steel - type: FloorTile outputs: - plating @@ -398,14 +398,14 @@ - type: Sprite state: arcadeblue - type: Item - HeldPrefix: arcadeblue + heldPrefix: arcadeblue - type: FloorTile outputs: - plating - FloorArcadeBlue - type: Stack stackType: FloorTileStackArcadeBlue - + - type: entity name: blue arcade floor parent: FloorTileItemBase @@ -414,7 +414,7 @@ - type: Sprite state: arcadeblue2 - type: Item - HeldPrefix: generic + heldPrefix: generic - type: FloorTile outputs: - plating @@ -430,7 +430,7 @@ - type: Sprite state: arcadered - type: Item - HeldPrefix: arcadered + heldPrefix: arcadered - type: FloorTile outputs: - plating @@ -446,14 +446,14 @@ - type: Sprite state: eighties - type: Item - HeldPrefix: eighties + heldPrefix: eighties - type: FloorTile outputs: - plating - FloorEighties - type: Stack stackType: FloorTileStackEighties - + - type: entity name: clown carpet floor parent: FloorTileItemBase @@ -462,14 +462,14 @@ - type: Sprite state: carpetclown - type: Item - HeldPrefix: generic + heldPrefix: generic - type: FloorTile outputs: - plating - FloorCarpetClown - type: Stack stackType: FloorTileStackCarpetClown - + - type: entity name: office carpet floor parent: FloorTileItemBase @@ -478,14 +478,14 @@ - type: Sprite state: carpetoffice - type: Item - HeldPrefix: generic + heldPrefix: generic - type: FloorTile outputs: - plating - FloorCarpetOffice - type: Stack stackType: FloorTileStackCarpetOffice - + - type: entity name: boxing ring floor parent: FloorTileItemBase @@ -494,14 +494,14 @@ - type: Sprite state: boxing - type: Item - HeldPrefix: generic + heldPrefix: generic - type: FloorTile outputs: - plating - FloorBoxing - type: Stack stackType: FloorTileStackBoxing - + - type: entity name: gym floor parent: FloorTileItemBase @@ -510,7 +510,7 @@ - type: Sprite state: gym - type: Item - HeldPrefix: generic + heldPrefix: generic - type: FloorTile outputs: - plating @@ -527,7 +527,7 @@ - type: Sprite state: shuttlewhite - type: Item - HeldPrefix: shuttlewhite + heldPrefix: shuttlewhite - type: FloorTile outputs: - plating @@ -543,7 +543,7 @@ - type: Sprite state: shuttleblue - type: Item - HeldPrefix: shuttleblue + heldPrefix: shuttleblue - type: FloorTile outputs: - plating @@ -559,7 +559,7 @@ - type: Sprite state: shuttleorange - type: Item - HeldPrefix: shuttleorange + heldPrefix: shuttleorange - type: FloorTile outputs: - plating @@ -575,7 +575,7 @@ - type: Sprite state: shuttlepurple - type: Item - HeldPrefix: shuttlepurple + heldPrefix: shuttlepurple - type: FloorTile outputs: - plating @@ -591,7 +591,7 @@ - type: Sprite state: shuttlered - type: Item - HeldPrefix: shuttlered + heldPrefix: shuttlered - type: FloorTile outputs: - plating @@ -608,7 +608,7 @@ - type: Sprite state: gold - type: Item - HeldPrefix: gold + heldPrefix: gold - type: FloorTile outputs: - plating @@ -624,7 +624,7 @@ - type: Sprite state: silver - type: Item - HeldPrefix: silver + heldPrefix: silver - type: FloorTile outputs: - plating @@ -641,7 +641,7 @@ - type: Sprite state: gcircuit - type: Item - HeldPrefix: gcircuit + heldPrefix: gcircuit - type: FloorTile outputs: - plating @@ -657,7 +657,7 @@ - type: Sprite state: bcircuit - type: Item - HeldPrefix: bcircuit + heldPrefix: bcircuit - type: FloorTile outputs: - plating @@ -674,7 +674,7 @@ - type: Sprite state: grass - type: Item - HeldPrefix: grass + heldPrefix: grass - type: FloorTile outputs: - plating @@ -690,7 +690,7 @@ - type: Sprite state: grassjungle - type: Item - HeldPrefix: grassjungle + heldPrefix: grassjungle - type: FloorTile outputs: - plating @@ -706,7 +706,7 @@ - type: Sprite state: snow - type: Item - HeldPrefix: snow + heldPrefix: snow - type: FloorTile outputs: - plating diff --git a/Resources/Prototypes/Entities/Objects/Misc/torch.yml b/Resources/Prototypes/Entities/Objects/Misc/torch.yml index 15e6c775a8..1eee7c3781 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/torch.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/torch.yml @@ -29,7 +29,7 @@ state: icon - type: Item sprite: Objects/Misc/torch.rsi - HeldPrefix: unlit + heldPrefix: unlit - type: Construction graph: LightTorch node: torch diff --git a/Resources/Prototypes/Entities/Objects/Misc/utensils.yml b/Resources/Prototypes/Entities/Objects/Misc/utensils.yml index 4268fe1908..6937ece625 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/utensils.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/utensils.yml @@ -38,7 +38,6 @@ - type: Sprite state: plastic_fork - type: Item - color: white - type: Utensil types: - Fork @@ -58,7 +57,7 @@ - type: Sprite state: spoon - type: Item - HeldPrefix: spoon + heldPrefix: spoon - type: Utensil types: - Spoon @@ -75,8 +74,7 @@ - type: Sprite state: plastic_spoon - type: Item - color: white - HeldPrefix: spoon + heldPrefix: spoon - type: Utensil types: - Spoon @@ -94,7 +92,6 @@ - type: Sprite state: plastic_knife - type: Item - color: white - type: Utensil types: - Knife diff --git a/Resources/Prototypes/Entities/Objects/Shields/shields.yml b/Resources/Prototypes/Entities/Objects/Shields/shields.yml index 6fc6fdb43f..b5fceeea21 100644 --- a/Resources/Prototypes/Entities/Objects/Shields/shields.yml +++ b/Resources/Prototypes/Entities/Objects/Shields/shields.yml @@ -12,7 +12,7 @@ - type: Item sprite: Objects/Weapons/Melee/shields.rsi size: 100 - HeldPrefix: riot + heldPrefix: riot - type: Blocking passiveBlockModifier: PassiveRiotShieldBlock activeBlockModifier: ActiveRiotShieldBlock @@ -60,7 +60,7 @@ - type: Sprite state: riot_laser-icon - type: Item - HeldPrefix: riot_laser + heldPrefix: riot_laser - type: Blocking passiveBlockModifier: PassiveRiotLaserShieldBlock activeBlockModifier: ActiveRiotLaserShieldBlock @@ -74,7 +74,7 @@ - type: Sprite state: riot_bullet-icon - type: Item - HeldPrefix: riot_bullet + heldPrefix: riot_bullet - type: Blocking passiveBlockModifier: PassiveRiotBulletShieldBlock activeBlockModifier: ActiveRiotBulletShieldBlock @@ -90,7 +90,7 @@ - type: Sprite state: buckler-icon - type: Item - HeldPrefix: buckler + heldPrefix: buckler - type: Blocking passiveBlockModifier: PassiveBucklerBlock activeBlockModifier: ActiveBucklerBlock @@ -122,7 +122,7 @@ - type: Sprite state: makeshift-icon - type: Item - HeldPrefix: metal + heldPrefix: metal - type: Blocking passiveBlockModifier: PassiveMakeshiftBlock activeBlockModifier: ActiveMakeshiftBlock @@ -156,7 +156,7 @@ - type: Sprite state: ratvarian-icon - type: Item - HeldPrefix: ratvarian + heldPrefix: ratvarian - type: Blocking passiveBlockModifier: PassiveClockworkShieldBlock activeBlockModifier: ActiveClockworkShieldBlock @@ -171,7 +171,7 @@ - type: Sprite state: mirror-icon - type: Item - HeldPrefix: mirror + heldPrefix: mirror - type: Blocking passiveBlockModifier: PassiveMirrorShieldBlock activeBlockModifier: ActiveMirrorShieldBlock diff --git a/Resources/Prototypes/Entities/Objects/Specific/Chapel/bibles.yml b/Resources/Prototypes/Entities/Objects/Specific/Chapel/bibles.yml index 88d61369e0..4040fc903d 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Chapel/bibles.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Chapel/bibles.yml @@ -26,8 +26,8 @@ - type: Item size: 15 sprite: Objects/Specific/Chapel/bible.rsi - prefix: inhand - Slots: + - type: Clothing + slots: - Belt - type: Storage capacity: 10 @@ -67,6 +67,6 @@ - type: Item size: 15 sprite: Objects/Specific/Chapel/necronomicon.rsi - prefix: inhand - Slots: + - type: Clothing + slots: - Belt diff --git a/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/sprays.yml b/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/sprays.yml index 5c13bf85a7..ebb4efb1a0 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/sprays.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/sprays.yml @@ -22,7 +22,7 @@ solution: spray - type: Item sprite: Objects/Tools/Hydroponics/sprays.rsi - HeldPrefix: plantbgone + heldPrefix: plantbgone - type: entity name: weed spray diff --git a/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/tools.yml b/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/tools.yml index 48e9184fcb..383e14ed1c 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/tools.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/tools.yml @@ -55,10 +55,11 @@ damage: types: Slash: 10 + - type: Item + size: 20 - type: Clothing sprite: Objects/Tools/Hydroponics/scythe.rsi - size: 20 - Slots: + slots: - back - type: entity @@ -116,12 +117,11 @@ netsync: false sprite: Objects/Specific/Hydroponics/Equipment/plant_bag.rsi state: icon + - type: Item - type: Clothing - sprite: Objects/Specific/Hydroponics/Equipment/plant_bag.rsi quickEquip: false - Slots: + slots: - belt - size: 200 - type: Storage capacity: 200 quickInsert: true diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/soap.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/soap.yml index 984c077624..31f328b89c 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/soap.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/soap.yml @@ -46,7 +46,7 @@ - type: Sprite state: nt - type: Item - HeldPrefix: nt + heldPrefix: nt - type: entity name: soap @@ -57,7 +57,7 @@ - type: Sprite state: deluxe - type: Item - HeldPrefix: deluxe + heldPrefix: deluxe - type: entity name: soap @@ -72,7 +72,7 @@ launchForwardsMultiplier: 9.0 - type: StepTrigger - type: Item - HeldPrefix: syndie + heldPrefix: syndie - type: entity name: soap @@ -86,7 +86,7 @@ paralyzeTime: 2 - type: StepTrigger - type: Item - HeldPrefix: gibs + heldPrefix: gibs - type: entity name: omega soap @@ -101,4 +101,4 @@ launchForwardsMultiplier: 9.0 - type: StepTrigger - type: Item - HeldPrefix: omega + heldPrefix: omega diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/trashbag.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/trashbag.yml index 049d7cc857..fff34e34fc 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/trashbag.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/trashbag.yml @@ -31,8 +31,9 @@ fillBaseName: icon - type: Dumpable - type: Clothing - Slots: [belt] + slots: [belt] sprite: Objects/Specific/Janitorial/trashbag.rsi + - type: Item size: 125 - type: entity @@ -45,7 +46,7 @@ - state: blue-icon-0 map: ["enum.StorageFillLayers.Fill"] - type: Item - HeldPrefix: blue + heldPrefix: blue - type: StorageFillVisualizer fillBaseName: blue-icon diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml index a59d4b8f9f..2f56dba6bf 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml @@ -7,7 +7,7 @@ sprite: Objects/Specific/Medical/medical.rsi - type: Item sprite: Objects/Specific/Medical/medical.rsi - HeldPrefix: ointment + heldPrefix: ointment - type: entity name: ointment @@ -21,7 +21,7 @@ - type: Sprite state: ointment - type: Item - HeldPrefix: ointment + heldPrefix: ointment - type: Healing damageContainer: Biological damage: diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml index f559d6e292..e202cd7f80 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml @@ -157,7 +157,7 @@ netsync: false - type: Item sprite: Objects/Misc/bureaucracy.rsi - HeldPrefix: pen + heldPrefix: pen - type: SolutionContainerManager solutions: hypospray: diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/medkits.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/medkits.yml index 60f825e536..f41617cd55 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/medkits.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/medkits.yml @@ -13,7 +13,7 @@ - type: Item size: 30 sprite: Objects/Specific/Medical/firstaidkits.rsi - HeldPrefix: firstaid + heldPrefix: firstaid - type: Tag tags: - Medkit @@ -27,7 +27,7 @@ - type: Sprite state: burnkit - type: Item - HeldPrefix: burnkit + heldPrefix: burnkit - type: entity name: toxin treatment kit @@ -38,7 +38,7 @@ - type: Sprite state: toxinkit - type: Item - HeldPrefix: toxinkit + heldPrefix: toxinkit - type: entity name: oxygen deprivation treatment kit @@ -49,7 +49,7 @@ - type: Sprite state: o2kit - type: Item - HeldPrefix: o2kit + heldPrefix: o2kit - type: entity name: brute trauma treatment kit @@ -60,7 +60,7 @@ - type: Sprite state: brutekit - type: Item - HeldPrefix: brutekit + heldPrefix: brutekit - type: entity name: advanced first aid kit @@ -71,7 +71,7 @@ - type: Sprite state: advkit - type: Item - HeldPrefix: advkit + heldPrefix: advkit - type: entity name: radiation treatment kit @@ -82,7 +82,7 @@ - type: Sprite state: radkit - type: Item - HeldPrefix: radkit + heldPrefix: radkit - type: entity name: combat medical kit @@ -93,4 +93,4 @@ - type: Sprite state: blackkit - type: Item - HeldPrefix: blackkit + heldPrefix: blackkit diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml index 3d6e5e329d..dc98802deb 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml @@ -77,7 +77,7 @@ - type: Sprite state: shiv - type: Item - HeldPrefix: shiv + heldPrefix: shiv - type: entity name: advanced scalpel @@ -88,7 +88,7 @@ - type: Sprite state: advanced - type: Item - HeldPrefix: advanced + heldPrefix: advanced - type: entity name: laser scalpel @@ -99,7 +99,7 @@ - type: Sprite state: laser - type: Item - HeldPrefix: laser + heldPrefix: laser # Scissors @@ -125,7 +125,7 @@ - type: Sprite state: hemostat - type: Item - HeldPrefix: hemostat + heldPrefix: hemostat # - type: entity # name: bone setter @@ -166,7 +166,7 @@ - type: Sprite state: improv - type: Item - HeldPrefix: improv + heldPrefix: improv - type: MeleeWeapon damage: groups: @@ -187,7 +187,7 @@ - type: Sprite state: electric - type: Item - HeldPrefix: electric + heldPrefix: electric - type: MeleeWeapon damage: groups: @@ -208,7 +208,7 @@ - type: Sprite state: advanced - type: Item - HeldPrefix: advanced + heldPrefix: advanced - type: MeleeWeapon damage: groups: diff --git a/Resources/Prototypes/Entities/Objects/Specific/Mining/ore_bag.yml b/Resources/Prototypes/Entities/Objects/Specific/Mining/ore_bag.yml index 5d786f7502..34d332746a 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Mining/ore_bag.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Mining/ore_bag.yml @@ -10,10 +10,11 @@ state: icon - type: Clothing sprite: Objects/Specific/Mining/ore_bag.rsi - QuickEquip: false - Slots: + quickEquip: false + slots: - belt - size: 175 + - type: Item + size: 176 - type: Storage capacity: 175 quickInsert: true diff --git a/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml b/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml index 482f2c9e60..f80a81b5e8 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml @@ -226,7 +226,7 @@ map: ["enum.SolutionContainerLayers.Base"] - type: Item sprite: Objects/Specific/Chemistry/syringe.rsi - HeldPrefix: 0 + heldPrefix: 0 - type: SolutionContainerManager solutions: injector: diff --git a/Resources/Prototypes/Entities/Objects/Specific/syndicate.yml b/Resources/Prototypes/Entities/Objects/Specific/syndicate.yml index b67de8df6c..7c99b4ebd1 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/syndicate.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/syndicate.yml @@ -58,7 +58,7 @@ netsync: false - type: Item sprite: Objects/Devices/communication.rsi - HeldPrefix: old-radio + heldPrefix: old-radio - type: UserInterface interfaces: - key: enum.UplinkUiKey.Key diff --git a/Resources/Prototypes/Entities/Objects/Tools/bucket.yml b/Resources/Prototypes/Entities/Objects/Tools/bucket.yml index 10c02e5f5b..c98529e461 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/bucket.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/bucket.yml @@ -11,10 +11,11 @@ netsync: false sprite: Objects/Tools/bucket.rsi state: icon - - type: Clothing + - type: Item size: 100 + - type: Clothing sprite: Objects/Tools/bucket.rsi - Slots: + slots: - HEAD - type: SolutionContainerManager solutions: diff --git a/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml b/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml index 9374945178..b6f912c9ec 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml @@ -37,7 +37,7 @@ state: coilhv-30 - type: Item size: 10 - HeldPrefix: coilhv + heldPrefix: coilhv - type: CablePlacer cablePrototypeID: CableHV blockingWireType: HighVoltage @@ -73,7 +73,7 @@ state: coilmv-30 - type: Item size: 10 - HeldPrefix: coilmv + heldPrefix: coilmv - type: CablePlacer cablePrototypeID: CableMV blockingWireType: MediumVoltage @@ -108,7 +108,7 @@ state: coillv-30 - type: Item size: 10 - HeldPrefix: coillv + heldPrefix: coillv - type: CablePlacer cablePrototypeID: CableApcExtension blockingWireType: Apc diff --git a/Resources/Prototypes/Entities/Objects/Tools/cowtools.yml b/Resources/Prototypes/Entities/Objects/Tools/cowtools.yml index 4039694bbf..4ba85d13b2 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/cowtools.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/cowtools.yml @@ -121,7 +121,7 @@ - type: Item size: 10 sprite: Objects/Tools/Cowtools/cowelder.rsi - HeldPrefix: off + heldPrefix: off - type: Tool speed: 0.05 - type: Welder diff --git a/Resources/Prototypes/Entities/Objects/Tools/flare.yml b/Resources/Prototypes/Entities/Objects/Tools/flare.yml index 54c5c992b9..e8cb610aa5 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/flare.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/flare.yml @@ -37,8 +37,7 @@ state: icon - type: Item sprite: Objects/Misc/flare.rsi - color: "#FF0000" - HeldPrefix: unlit + heldPrefix: unlit - type: Appearance visuals: - type: ExpendableLightVisualizer diff --git a/Resources/Prototypes/Entities/Objects/Tools/gas_tanks.yml b/Resources/Prototypes/Entities/Objects/Tools/gas_tanks.yml index f4232e8805..d9c138c570 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/gas_tanks.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/gas_tanks.yml @@ -12,10 +12,9 @@ interfaces: - key: enum.SharedGasTankUiKey.Key type: GasTankBoundUserInterface - - type: Clothing + - type: Item size: 15 sprite: Objects/Tanks/generic.rsi - quickEquip: false - type: GasTank toggleAction: name: action-name-internals-toggle @@ -47,7 +46,7 @@ temperature: 293.15 - type: Clothing sprite: Objects/Tanks/oxygen.rsi - Slots: + slots: - Back - suitStorage @@ -61,7 +60,7 @@ sprite: Objects/Tanks/yellow.rsi - type: Clothing sprite: Objects/Tanks/yellow.rsi - Slots: + slots: - Back - suitStorage @@ -75,7 +74,7 @@ sprite: Objects/Tanks/red.rsi - type: Clothing sprite: Objects/Tanks/red.rsi - Slots: + slots: - Back - suitStorage @@ -92,10 +91,11 @@ air: volume: 3 temperature: 293.15 - - type: Clothing + - type: Item size: 10 + - type: Clothing sprite: Objects/Tanks/emergency.rsi - Slots: + slots: - Pocket - Belt - suitStorage @@ -114,10 +114,11 @@ air: volume: 6 temperature: 293.15 - - type: Clothing + - type: Item size: 10 + - type: Clothing sprite: Objects/Tanks/emergency_yellow.rsi - Slots: + slots: - Pocket - Belt - suitStorage @@ -134,10 +135,11 @@ air: volume: 12 temperature: 293.15 - - type: Clothing + - type: Item size: 10 + - type: Clothing sprite: Objects/Tanks/emergency_double.rsi - Slots: + slots: - Pocket - Belt - suitStorage @@ -157,7 +159,7 @@ temperature: 293.15 - type: Clothing sprite: Objects/Tanks/generic.rsi - Slots: + slots: - Back - suitStorage @@ -176,7 +178,7 @@ temperature: 293.15 - type: Clothing sprite: Objects/Tanks/anesthetic.rsi - Slots: + slots: - Back - suitStorage @@ -193,9 +195,10 @@ air: volume: 70 temperature: 293.15 - - type: Clothing + - type: Item size: 10 + - type: Clothing sprite: Objects/Tanks/plasma.rsi - Slots: + slots: - Belt - suitStorage diff --git a/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml b/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml index 4a7848d2ec..6f12136dbd 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml @@ -32,8 +32,7 @@ color: "#00FF00" - type: Item sprite: Objects/Misc/glowstick.rsi - color: "#00FF00" - HeldPrefix: off + heldPrefix: off - type: Appearance visuals: - type: ExpendableLightVisualizer @@ -94,8 +93,7 @@ color: "#FF0000" - type: Item sprite: Objects/Misc/glowstick.rsi - color: "#FF0000" - HeldPrefix: off + heldPrefix: off - type: PointLight enabled: false color: "#FF0000" @@ -130,8 +128,7 @@ color: "#FF00FF" - type: Item sprite: Objects/Misc/glowstick.rsi - color: "#FF00FF" - HeldPrefix: off + heldPrefix: off - type: PointLight enabled: false color: "#FF00FF" @@ -166,8 +163,7 @@ color: "#FFFF00" - type: Item sprite: Objects/Misc/glowstick.rsi - color: "#FFFF00" - HeldPrefix: off + heldPrefix: off - type: PointLight enabled: false color: "#FFFF00" @@ -202,8 +198,7 @@ color: "#0000FF" - type: Item sprite: Objects/Misc/glowstick.rsi - color: "#0000FF" - HeldPrefix: off + heldPrefix: off - type: PointLight enabled: false color: "#0000FF" @@ -227,7 +222,7 @@ color: "#FF0000" - type: Item sprite: Objects/Misc/glowstick.rsi - HeldPrefix: off + heldPrefix: off - type: PointLight enabled: true color: "#FF0000" @@ -257,7 +252,7 @@ color: "#FF0000" - type: Item sprite: Objects/Misc/glowstick.rsi - HeldPrefix: off + heldPrefix: off - type: PointLight enabled: true color: "#FF0000" @@ -288,7 +283,7 @@ color: "#FF0000" - type: Item sprite: Objects/Misc/glowstick.rsi - HeldPrefix: off + heldPrefix: off - type: PointLight enabled: false color: "#FF0000" @@ -327,7 +322,7 @@ color: "#FF0000" - type: Item sprite: Objects/Misc/glowstick.rsi - HeldPrefix: off + heldPrefix: off - type: PointLight enabled: false color: "#FF0000" @@ -357,7 +352,7 @@ color: "#FF0000" - type: Item sprite: Objects/Misc/glowstick.rsi - HeldPrefix: off + heldPrefix: off - type: PointLight enabled: false color: "#FF0000" @@ -388,7 +383,7 @@ color: "#FF0000" - type: Item sprite: Objects/Misc/glowstick.rsi - HeldPrefix: off + heldPrefix: off - type: PointLight enabled: false color: "#FF0000" diff --git a/Resources/Prototypes/Entities/Objects/Tools/gps.yml b/Resources/Prototypes/Entities/Objects/Tools/gps.yml index ee84fa3e5a..8d81ee9e9f 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/gps.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/gps.yml @@ -12,5 +12,4 @@ - state: active - type: Item sprite: Objects/Devices/gps.rsi - state: icon - type: HandheldGPS diff --git a/Resources/Prototypes/Entities/Objects/Tools/jaws_of_life.yml b/Resources/Prototypes/Entities/Objects/Tools/jaws_of_life.yml index bc79cfc748..e5267db3a5 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/jaws_of_life.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/jaws_of_life.yml @@ -11,11 +11,12 @@ sprite: Objects/Tools/jaws_of_life.rsi state: jaws_pry netsync: false + - type: Item + size: 50 - type: Clothing sprite: Objects/Tools/jaws_of_life.rsi - size: 50 quickEquip: false - Slots: + slots: - Belt - type: TilePrying - type: Tool diff --git a/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml b/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml index e84809caa0..b83277f54d 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml @@ -43,7 +43,7 @@ sprite: Objects/Tanks/Jetpacks/blue.rsi QuickEquip: false size: 100 - Slots: + slots: - Back - type: GasTank outputPressure: 21.27825 @@ -75,7 +75,7 @@ sprite: Objects/Tanks/Jetpacks/blue.rsi - type: Clothing sprite: Objects/Tanks/Jetpacks/blue.rsi - Slots: + slots: - Back # Filled blue @@ -104,7 +104,7 @@ sprite: Objects/Tanks/Jetpacks/black.rsi - type: Clothing sprite: Objects/Tanks/Jetpacks/black.rsi - Slots: + slots: - Back # Filled black @@ -134,7 +134,7 @@ - type: Clothing size: 30 sprite: Objects/Tanks/Jetpacks/captain.rsi - Slots: + slots: - Back # Filled captain @@ -164,7 +164,7 @@ - type: Clothing size: 50 sprite: Objects/Tanks/Jetpacks/mini.rsi - Slots: + slots: - Back # Filled mini @@ -193,7 +193,7 @@ sprite: Objects/Tanks/Jetpacks/security.rsi - type: Clothing sprite: Objects/Tanks/Jetpacks/security.rsi - Slots: + slots: - Back #Filled security @@ -222,7 +222,7 @@ sprite: Objects/Tanks/Jetpacks/void.rsi - type: Clothing sprite: Objects/Tanks/Jetpacks/void.rsi - Slots: + slots: - Back # Filled void diff --git a/Resources/Prototypes/Entities/Objects/Tools/lantern.yml b/Resources/Prototypes/Entities/Objects/Tools/lantern.yml index a0b0897134..fb8e4e4d37 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/lantern.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/lantern.yml @@ -16,7 +16,7 @@ map: [ "light" ] - type: Item sprite: Objects/Tools/lantern.rsi - HeldPrefix: off + heldPrefix: off - type: PointLight netsync: false enabled: false diff --git a/Resources/Prototypes/Entities/Objects/Tools/lighters.yml b/Resources/Prototypes/Entities/Objects/Tools/lighters.yml index aec3508544..faa8aeb51c 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/lighters.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/lighters.yml @@ -30,7 +30,7 @@ - type: Item size: 2 sprite: Objects/Tools/lighters.rsi - HeldPrefix: off + heldPrefix: off - type: ItemCooldown - type: ItemStatus - type: RefillableSolution diff --git a/Resources/Prototypes/Entities/Objects/Tools/matches.yml b/Resources/Prototypes/Entities/Objects/Tools/matches.yml index d9a4059772..820c63d770 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/matches.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/matches.yml @@ -27,7 +27,7 @@ - state: match_unlit - type: Item sprite: Objects/Tools/matches.rsi - HeldPrefix: unlit + heldPrefix: unlit size: 1 - type: Matchstick duration: 10 @@ -61,7 +61,7 @@ - state: matchbox - type: Item sprite: Objects/Tools/matches.rsi - HeldPrefix: matchbox + heldPrefix: matchbox - type: StorageFill contents: - id: Matchstick diff --git a/Resources/Prototypes/Entities/Objects/Tools/tools.yml b/Resources/Prototypes/Entities/Objects/Tools/tools.yml index d7e5ac1735..cda5848762 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/tools.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/tools.yml @@ -154,7 +154,7 @@ - type: Item sprite: Objects/Tools/crowbar.rsi size: 10 - HeldPrefix: red + heldPrefix: red - type: entity name: multitool @@ -171,11 +171,12 @@ - state: icon - state: green-unlit shader: unshaded - - type: Clothing + - type: Item size: 5 + - type: Clothing sprite: Objects/Tools/multitool.rsi quickEquip: false - Slots: + slots: - Belt - type: Tool qualities: @@ -248,11 +249,12 @@ - type: Sprite sprite: Objects/Tools/rcd.rsi state: icon - - type: Clothing + - type: Item size: 20 + - type: Clothing sprite: Objects/Tools/rcd.rsi quickEquip: false - Slots: + slots: - Belt - type: entity @@ -267,7 +269,7 @@ state: ammo - type: Item sprite: Objects/Tools/rcd.rsi - HeldPrefix: ammo + heldPrefix: ammo - type: entity name: shovel diff --git a/Resources/Prototypes/Entities/Objects/Tools/welders.yml b/Resources/Prototypes/Entities/Objects/Tools/welders.yml index a9a4fdc685..95f7c876c4 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/welders.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/welders.yml @@ -20,7 +20,7 @@ - type: Item size: 10 sprite: Objects/Tools/welder.rsi - HeldPrefix: off + heldPrefix: off - type: ItemCooldown - type: MeleeWeapon damage: @@ -68,7 +68,7 @@ - ReagentId: WeldingFuel Quantity: 250 maxVol: 250 - + - type: entity name: advanced industrial welding tool parent: WelderIndustrial diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/base_staff.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/base_staff.yml index 1a102edca4..302641c2d5 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/base_staff.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/base_staff.yml @@ -6,8 +6,7 @@ - type: Sprite sprite: Objects/Weapons/Guns/Basic/staves.rsi - type: Item - sprite: Objects/Weapons/Guns/Basic/staves.rsi - HeldPrefix: staff + heldPrefix: staff size: 60 - type: Gun fireRate: 1 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/base_wand.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/base_wand.yml index 1d479e5b6a..3b97eac8ee 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/base_wand.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/base_wand.yml @@ -6,8 +6,7 @@ - type: Sprite sprite: Objects/Weapons/Guns/Basic/wands.rsi - type: Item - sprite: Objects/Weapons/Guns/Basic/wands.rsi - HeldPrefix: wand + heldPrefix: wand size: 30 - type: Gun fireRate: 0.5 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/staves.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/staves.yml index 81903f6ba0..835247f96b 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/staves.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/staves.yml @@ -10,7 +10,7 @@ layers: - state: healing - type: Item - HeldPrefix: healing + heldPrefix: healing - type: Gun soundGunshot: path: /Audio/Weapons/Guns/Gunshots/Magic/staff_healing.ogg @@ -28,7 +28,7 @@ layers: - state: door - type: Item - HeldPrefix: door + heldPrefix: door - type: Gun soundGunshot: path: /Audio/Weapons/Guns/Gunshots/Magic/staff_door.ogg 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 0491858cf5..4f4f8e20d2 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml @@ -263,11 +263,11 @@ - state: mag-unshaded-0 map: ["enum.GunVisualLayers.MagUnshaded"] shader: unshaded - - type: Clothing - sprite: Objects/Weapons/Guns/Battery/disabler.rsi + - type: Item size: 10 + - type: Clothing quickEquip: false - Slots: + slots: - Belt - type: Gun fireRate: 2 @@ -301,13 +301,13 @@ - state: mag-unshaded-0 map: ["enum.GunVisualLayers.MagUnshaded"] shader: unshaded - - type: Clothing - sprite: Objects/Weapons/Guns/Battery/taser.rsi + - type: Item size: 10 + - type: Clothing quickEquip: false - Slots: + slots: - Belt - HeldPrefix: taser4 + 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 c40abb4fe8..7bc77a499e 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml @@ -65,7 +65,6 @@ - type: Sprite sprite: Objects/Weapons/Guns/Snipers/musket.rsi - type: Item - icon: Objects/Weapons/Guns/Snipers/musket.rsi - type: Gun selectedMode: SemiAuto availableModes: @@ -86,7 +85,6 @@ - type: Sprite sprite: Objects/Weapons/Guns/Snipers/flintlock.rsi - type: Item - icon: Objects/Weapons/Guns/Snipers/flintlock.rsi - type: BallisticAmmoProvider whitelist: tags: diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/armblade.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/armblade.yml index 0ba36e8f72..b54771ec43 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/armblade.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/armblade.yml @@ -16,7 +16,6 @@ - type: Item size: 15 sprite: Objects/Weapons/Melee/armblade.rsi - prefix: inhand - type: Tool qualities: - Prying diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/baseball_bat.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/baseball_bat.yml index 96671b4f89..ce9843e7de 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/baseball_bat.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/baseball_bat.yml @@ -11,10 +11,10 @@ damage: types: Blunt: 14 - - type: Clothing + - type: Item size: 15 - sprite: Objects/Weapons/Melee/baseball_bat.rsi - Slots: + - type: Clothing + slots: - back - type: Construction graph: WoodenBat diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml index 54e19c3d63..2ba965c2d3 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml @@ -25,11 +25,12 @@ Blunt: -2 # negative reductions = increases Slash: -8 Structural: -45 - - type: Clothing + - type: Item size: 150 + - type: Clothing sprite: Objects/Weapons/Melee/fireaxe.rsi quickEquip: false - Slots: + slots: - back - type: Tool qualities: @@ -47,9 +48,10 @@ - type: Sprite sprite: Objects/Weapons/Melee/fireaxeflaming.rsi state: icon - - type: Clothing + - type: Item size: 20 + - type: Clothing sprite: Objects/Weapons/Melee/fireaxeflaming.rsi quickEquip: false - Slots: + slots: - back diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/gohei.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/gohei.yml index 0321dd2e7a..1fdb237f4a 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/gohei.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/gohei.yml @@ -14,4 +14,3 @@ - type: Item size: 12 sprite: Objects/Weapons/Melee/gohei.rsi - prefix: inhand diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml index ea6799758e..05930de1eb 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml @@ -42,8 +42,6 @@ - type: Item size: 10 sprite: Objects/Weapons/Melee/kitchen_knife.rsi - prefix: inhand - - type: entity name: butcher's cleaver @@ -65,7 +63,6 @@ - type: Item size: 10 sprite: Objects/Weapons/Melee/cleaver.rsi - prefix: inhand - type: entity name: combat knife @@ -88,7 +85,6 @@ - type: Item size: 10 sprite: Objects/Weapons/Melee/combat_knife.rsi - prefix: inhand - type: DisarmMalus malus: 0.225 @@ -105,4 +101,3 @@ - type: Item size: 10 sprite: Objects/Weapons/Melee/survival_knife.rsi - prefix: inhand diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/pickaxe.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/pickaxe.yml index f3a8036caf..e0981849a4 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/pickaxe.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/pickaxe.yml @@ -24,7 +24,6 @@ - type: Item size: 24 sprite: Objects/Weapons/Melee/pickaxe.rsi - prefix: inhand - type: entity name: mining drill diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/spear.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/spear.yml index af21647416..30b050a553 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/spear.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/spear.yml @@ -22,11 +22,11 @@ damage: types: Piercing: 15 - - type: Clothing + - type: Item size: 40 - sprite: Objects/Weapons/Melee/spear.rsi + - type: Clothing quickEquip: false - Slots: + slots: - back - type: Construction graph: Spear diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/sword.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/sword.yml index f44fda2571..50ca099064 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/sword.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/sword.yml @@ -78,9 +78,10 @@ damage: types: Slash: 25 - - type: Clothing + - type: Item size: 20 + - type: Clothing sprite: Objects/Weapons/Melee/claymore.rsi - Slots: + slots: - back - type: DisarmMalus diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml index 748f1d2518..932e0cc682 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml @@ -11,11 +11,11 @@ layers: - state: icon map: ["enum.TriggerVisualLayers.Base"] - - type: Clothing - sprite: Objects/Weapons/Grenades/grenade.rsi + - type: Item size: 5 + - type: Clothing quickEquip: false - Slots: + slots: - Belt - type: OnUseTimerTrigger delay: 3.5 @@ -52,11 +52,11 @@ layers: - state: icon map: ["enum.TriggerVisualLayers.Base"] - - type: Clothing - sprite: Objects/Weapons/Grenades/flashbang.rsi + - type: Item size: 5 + - type: Clothing quickEquip: false - Slots: + slots: - Belt - type: OnUseTimerTrigger delay: 3.5 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/security.yml b/Resources/Prototypes/Entities/Objects/Weapons/security.yml index 90e4e48b05..8e46947ac1 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/security.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/security.yml @@ -27,12 +27,13 @@ maxCharge: 1000 startingCharge: 1000 - type: ItemCooldown + - type: Item + size: 20 - type: Clothing sprite: Objects/Weapons/Melee/stunbaton.rsi - HeldPrefix: off + heldPrefix: off quickEquip: false - size: 20 - Slots: + slots: - Belt - type: DisarmMalus malus: 0.225