diff --git a/Content.Client/EntryPoint.cs b/Content.Client/EntryPoint.cs index c619565968..9e8172d4cf 100644 --- a/Content.Client/EntryPoint.cs +++ b/Content.Client/EntryPoint.cs @@ -52,136 +52,7 @@ namespace Content.Client factory.DoAutoRegistrations(); - var registerIgnore = new[] - { - "Anchorable", - "AmmoBox", - "Breakable", - "Pickaxe", - "Interactable", - "Destructible", - "Temperature", - "Explosive", - "OnUseTimerTrigger", - "ToolboxElectricalFill", - "ToolboxEmergencyFill", - "WarpPoint", - "ToolboxGoldFill", - "ToolLockerFill", - "EmitSoundOnUse", - "FootstepModifier", - "HeatResistance", - "Teleportable", - "ItemTeleporter", - "Portal", - "EntityStorage", - "PlaceableSurface", - "Wirecutter", - "Screwdriver", - "Multitool", - "Wrench", - "Crowbar", - "Projectile", - "MeleeWeapon", - "Storeable", - "Dice", - "Construction", - "Door", - "PoweredLight", - "Smes", - "Powercell", - "LightBulb", - "Healing", - "Catwalk", - "RangedMagazine", - "Ammo", - "HitscanWeaponCapacitor", - "PowerCell", - "PowerCellCharger", - "WeaponCapacitorCharger", - "AiController", - "Computer", - "AsteroidRock", - "ResearchServer", - "ResearchPointSource", - "ResearchClient", - "IdCard", - "Access", - "AccessReader", - "IdCardConsole", - "Airlock", - "MedicalScanner", - "WirePlacer", - "Drink", - "Food", - "FoodContainer", - "Stomach", - "Rotatable", - "MagicMirror", - "MedkitFill", - "FloorTile", - "FootstepSound", - "UtilityBeltClothingFill", - "ShuttleController", - "HumanInventoryController", - "UseDelay", - "Pourable", - "Paper", - "Write", - "Bloodstream", - "TransformableContainer", - "Mind", - "StorageFill", - "Mop", - "Bucket", - "Puddle", - "CanSpill", - "SpeedLoader", - "Hitscan", - "BoltActionBarrel", - "PumpBarrel", - "RevolverBarrel", - "ExplosiveProjectile", - "StunnableProjectile", - "RandomPottedPlant", - "CommunicationsConsole", - "BarSign", - "DroppedBodyPart", - "DroppedMechanism", - "BodyManager", - "SolarPanel", - "BodyScanner", - "Stunbaton", - "EmergencyClosetFill", - "Tool", - "TilePrying", - "RandomToolColor", - "ConditionalSpawner", - "PottedPlantHide", - "SecureEntityStorage", - "PresetIdCard", - "SolarControlConsole", - "BatteryBarrel", - "FlashExplosive", - "FlashProjectile", - "Utensil", - "UnarmedCombat", - "TimedSpawner", - "Buckle", - "Strap", - "NodeContainer", - "PowerSupplier", - "PowerConsumer", - "Battery", - "BatteryStorage", - "BatteryDischarger", - "Apc", - "PowerProvider", - "PowerReceiver", - "Wire", - }; - - foreach (var ignoreName in registerIgnore) + foreach (var ignoreName in IgnoredComponents.List) { factory.RegisterIgnore(ignoreName); } @@ -254,10 +125,7 @@ namespace Content.Client /// public static void DetachPlayerFromEntity(EntityDetachedEventArgs eventArgs) { - if (!eventArgs.OldEntity.Deleted) - { - eventArgs.OldEntity.RemoveComponent(); - } + eventArgs.OldEntity.RemoveComponent(); } public override void PostInit() diff --git a/Content.Client/IgnoredComponents.cs b/Content.Client/IgnoredComponents.cs new file mode 100644 index 0000000000..2c01b43bb9 --- /dev/null +++ b/Content.Client/IgnoredComponents.cs @@ -0,0 +1,135 @@ +namespace Content.Client +{ + public static class IgnoredComponents + { + public static string[] List => new[] + { + "Anchorable", + "AmmoBox", + "Breakable", + "Pickaxe", + "Interactable", + "Destructible", + "Temperature", + "Explosive", + "OnUseTimerTrigger", + "ToolboxElectricalFill", + "ToolboxEmergencyFill", + "WarpPoint", + "ToolboxGoldFill", + "ToolLockerFill", + "EmitSoundOnUse", + "FootstepModifier", + "HeatResistance", + "Teleportable", + "ItemTeleporter", + "Portal", + "EntityStorage", + "PlaceableSurface", + "Wirecutter", + "Screwdriver", + "Multitool", + "Wrench", + "Crowbar", + "Projectile", + "MeleeWeapon", + "Storeable", + "Dice", + "Construction", + "Door", + "PoweredLight", + "Smes", + "Powercell", + "LightBulb", + "Healing", + "Catwalk", + "RangedMagazine", + "Ammo", + "HitscanWeaponCapacitor", + "PowerCell", + "PowerCellCharger", + "WeaponCapacitorCharger", + "AiController", + "Computer", + "AsteroidRock", + "ResearchServer", + "ResearchPointSource", + "ResearchClient", + "IdCard", + "Access", + "AccessReader", + "IdCardConsole", + "Airlock", + "MedicalScanner", + "WirePlacer", + "Drink", + "Food", + "FoodContainer", + "Stomach", + "Rotatable", + "MagicMirror", + "MedkitFill", + "FloorTile", + "FootstepSound", + "UtilityBeltClothingFill", + "ShuttleController", + "HumanInventoryController", + "UseDelay", + "Pourable", + "Paper", + "Write", + "Bloodstream", + "TransformableContainer", + "Mind", + "StorageFill", + "Mop", + "Bucket", + "Puddle", + "CanSpill", + "SpeedLoader", + "Hitscan", + "BoltActionBarrel", + "PumpBarrel", + "RevolverBarrel", + "ExplosiveProjectile", + "StunnableProjectile", + "RandomPottedPlant", + "CommunicationsConsole", + "BarSign", + "DroppedBodyPart", + "DroppedMechanism", + "BodyManager", + "SolarPanel", + "BodyScanner", + "Stunbaton", + "EmergencyClosetFill", + "Tool", + "TilePrying", + "RandomToolColor", + "ConditionalSpawner", + "PottedPlantHide", + "SecureEntityStorage", + "PresetIdCard", + "SolarControlConsole", + "BatteryBarrel", + "FlashExplosive", + "FlashProjectile", + "Utensil", + "UnarmedCombat", + "TimedSpawner", + "Buckle", + "Strap", + "NodeContainer", + "PowerSupplier", + "PowerConsumer", + "Battery", + "BatteryStorage", + "BatteryDischarger", + "Apc", + "PowerProvider", + "PowerReceiver", + "Wire", + "StressTestMovement", + }; + } +} diff --git a/Content.Server/EntryPoint.cs b/Content.Server/EntryPoint.cs index 82ef1754d2..c16c0fb636 100644 --- a/Content.Server/EntryPoint.cs +++ b/Content.Server/EntryPoint.cs @@ -31,25 +31,7 @@ namespace Content.Server factory.DoAutoRegistrations(); - var registerIgnore = new[] - { - "ConstructionGhost", - "IconSmooth", - "SubFloorHide", - "LowWall", - "ReinforcedWall", - "Window", - "CharacterInfo", - "InteractionOutline", - "MeleeWeaponArcAnimation", - "AnimationsTest", - "ItemStatus", - "Marker", - "EmergencyLight", - "Clickable", - }; - - foreach (var ignoreName in registerIgnore) + foreach (var ignoreName in IgnoredComponents.List) { factory.RegisterIgnore(ignoreName); } diff --git a/Content.Server/IgnoredComponents.cs b/Content.Server/IgnoredComponents.cs new file mode 100644 index 0000000000..35725d7466 --- /dev/null +++ b/Content.Server/IgnoredComponents.cs @@ -0,0 +1,26 @@ +namespace Content.Server +{ + + public static class IgnoredComponents + { + + public static string[] List => new [] { + "ConstructionGhost", + "IconSmooth", + "SubFloorHide", + "LowWall", + "ReinforcedWall", + "Window", + "CharacterInfo", + "InteractionOutline", + "MeleeWeaponArcAnimation", + "AnimationsTest", + "ItemStatus", + "Marker", + "EmergencyLight", + "Clickable", + }; + + } + +}