Removed the StateType property from every component. This field was completely unused except for a debug assertion.

This commit is contained in:
Acruid
2020-01-24 14:10:36 -08:00
parent 0f1cee44a3
commit 4ab7f1dcb3
24 changed files with 4 additions and 33 deletions

View File

@@ -1,5 +1,4 @@
using System;
using Content.Shared.GameObjects;
using Content.Shared.GameObjects;
using Content.Shared.GameObjects.Components.Inventory;
using Content.Shared.GameObjects.Components.Items;
using Robust.Client.Graphics;
@@ -16,7 +15,6 @@ namespace Content.Client.GameObjects.Components.Clothing
private FemaleClothingMask _femaleMask;
public override string Name => "Clothing";
public override uint? NetID => ContentNetIDs.CLOTHING;
public override Type StateType => typeof(ClothingComponentState);
[ViewVariables(VVAccess.ReadWrite)]
public string ClothingEquippedPrefix { get; set; }

View File

@@ -1,5 +1,4 @@
using System;
using Content.Shared.GameObjects;
using Content.Shared.GameObjects;
using Content.Shared.GameObjects.Components.Items;
using Robust.Client.Graphics;
using Robust.Client.Interfaces.ResourceManagement;
@@ -18,7 +17,6 @@ namespace Content.Client.GameObjects
{
public override string Name => "Item";
public override uint? NetID => ContentNetIDs.ITEM;
public override Type StateType => typeof(ItemComponentState);
[ViewVariables] protected ResourcePath RsiPath;

View File

@@ -70,7 +70,6 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged
public override string Name => "BallisticMagazineWeapon";
public override uint? NetID => ContentNetIDs.BALLISTIC_MAGAZINE_WEAPON;
public override Type StateType => typeof(BallisticMagazineWeaponComponentState);
private StatusControl _statusControl;

View File

@@ -17,7 +17,6 @@ namespace Content.Client.GameObjects.Components
{
public override string Name => "Welder";
public override uint? NetID => ContentNetIDs.WELDER;
public override Type StateType => typeof(WelderComponentState);
[ViewVariables] public float FuelCapacity { get; private set; }
[ViewVariables] public float Fuel { get; private set; }

View File

@@ -19,7 +19,6 @@ namespace Content.Server.GameObjects
{
public override string Name => "Clothing";
public override uint? NetID => ContentNetIDs.CLOTHING;
public override Type StateType => typeof(ClothingComponentState);
public SlotFlags SlotFlags = SlotFlags.PREVENTEQUIP; //Different from None, NONE allows equips if no slot flags are required

View File

@@ -1,5 +1,4 @@
using System;
using Content.Server.GameObjects.EntitySystems;
using Content.Server.GameObjects.EntitySystems;
using Content.Server.Interfaces.GameObjects;
using Content.Shared.GameObjects;
using Content.Shared.GameObjects.Components.Items;
@@ -21,7 +20,6 @@ namespace Content.Server.GameObjects
{
public override string Name => "Item";
public override uint? NetID => ContentNetIDs.ITEM;
public override Type StateType => typeof(ItemComponentState);
#pragma warning disable 649
[Dependency] private readonly IRobustRandom _robustRandom;

View File

@@ -10,7 +10,6 @@ namespace Content.Shared.GameObjects.Components.Cargo
{
public sealed override string Name => "CargoOrderDatabase";
public sealed override uint? NetID => ContentNetIDs.CARGO_ORDER_DATABASE;
public sealed override Type StateType => typeof(CargoOrderDatabaseState);
}
[NetSerializable, Serializable]

View File

@@ -13,7 +13,6 @@ namespace Content.Shared.GameObjects.Components.Cargo
{
public sealed override string Name => "GalacticMarket";
public sealed override uint? NetID => ContentNetIDs.GALACTIC_MARKET;
public sealed override Type StateType => typeof(GalacticMarketState);
protected List<CargoProductPrototype> _products = new List<CargoProductPrototype>();

View File

@@ -66,9 +66,6 @@ namespace Content.Shared.GameObjects.Components.Chemistry
/// <inheritdoc />
public sealed override uint? NetID => ContentNetIDs.SOLUTION;
/// <inheritdoc />
public sealed override Type StateType => typeof(SolutionComponentState);
/// <inheritdoc />
public override void ExposeData(ObjectSerializer serializer)
{

View File

@@ -9,7 +9,6 @@ namespace Content.Shared.GameObjects
{
public override string Name => "Damageable";
public sealed override uint? NetID => ContentNetIDs.DAMAGEABLE;
public sealed override Type StateType => typeof(DamageComponentState);
}
// The IDs of the items get synced over the network.

View File

@@ -19,7 +19,6 @@ namespace Content.Shared.GameObjects
public sealed override string Name => "Inventory";
public sealed override uint? NetID => ContentNetIDs.STORAGE;
public sealed override Type StateType => typeof(InventoryComponentState);
[ViewVariables]
protected Inventory InventoryInstance { get; private set; }

View File

@@ -12,7 +12,6 @@ namespace Content.Shared.GameObjects.Components.Items
public sealed class ItemCooldownComponent : Component
{
public override string Name => "ItemCooldown";
public override Type StateType => typeof(ItemCooldownComponentState);
public override uint? NetID => ContentNetIDs.ITEMCOOLDOWN;
private TimeSpan? _cooldownEnd;

View File

@@ -9,7 +9,6 @@ namespace Content.Shared.GameObjects
{
public sealed override string Name => "Hands";
public sealed override uint? NetID => ContentNetIDs.HANDS;
public sealed override Type StateType => typeof(HandsComponentState);
}
// The IDs of the items get synced over the network.

View File

@@ -8,7 +8,6 @@ namespace Content.Shared.GameObjects.Components.Mobs
{
public sealed override uint? NetID => ContentNetIDs.COMBATMODE;
public override string Name => "CombatMode";
public sealed override Type StateType => typeof(CombatModeComponentState);
[Serializable, NetSerializable]
protected sealed class CombatModeComponentState : ComponentState

View File

@@ -13,7 +13,6 @@ namespace Content.Shared.GameObjects.Components.Mobs
public sealed override string Name => "HumanoidAppearance";
public sealed override uint? NetID => ContentNetIDs.HUMANOID_APPEARANCE;
public sealed override Type StateType => typeof(HumanoidAppearanceComponentState);
[ViewVariables(VVAccess.ReadWrite)]
public virtual HumanoidCharacterAppearance Appearance

View File

@@ -11,7 +11,6 @@ namespace Content.Shared.GameObjects.Components.Mobs
{
public override string Name => "OverlayEffectsUI";
public sealed override uint? NetID => ContentNetIDs.OVERLAYEFFECTS;
public sealed override Type StateType => typeof(OverlayEffectComponentState);
}
public enum ScreenEffects

View File

@@ -13,8 +13,6 @@ namespace Content.Shared.GameObjects.Components.Mobs
{
public override string Name => "StatusEffectsUI";
public override uint? NetID => ContentNetIDs.STATUSEFFECTS;
public sealed override Type StateType => typeof(StatusEffectComponentState);
}
[Serializable, NetSerializable]

View File

@@ -13,7 +13,6 @@ namespace Content.Shared.GameObjects.Components.Research
{
public override string Name => "LatheDatabase";
public override uint? NetID => ContentNetIDs.LATHE_DATABASE;
public override Type StateType => typeof(LatheDatabaseState);
private List<LatheRecipePrototype> _recipes = new List<LatheRecipePrototype>();

View File

@@ -14,7 +14,6 @@ namespace Content.Shared.GameObjects.Components.Research
protected virtual Dictionary<string, int> Storage { get; set; }
public override string Name => "MaterialStorage";
public sealed override uint? NetID => ContentNetIDs.MATERIAL_STORAGE;
public sealed override Type StateType => typeof(MaterialStorageState);
public int this[string ID]
{

View File

@@ -14,7 +14,6 @@ namespace Content.Shared.GameObjects.Components.Research
{
public override string Name => "ProtolatheDatabase";
public sealed override uint? NetID => ContentNetIDs.PROTOLATHE_DATABASE;
public sealed override Type StateType => typeof(ProtolatheDatabaseState);
private List<LatheRecipePrototype> _protolatheRecipes = new List<LatheRecipePrototype>();

View File

@@ -13,7 +13,6 @@ namespace Content.Shared.GameObjects.Components.Research
{
public override string Name => "TechnologyDatabase";
public override uint? NetID => ContentNetIDs.TECHNOLOGY_DATABASE;
public override Type StateType => typeof(TechnologyDatabaseState);
protected List<TechnologyPrototype> _technologies = new List<TechnologyPrototype>();

View File

@@ -8,7 +8,6 @@ namespace Content.Shared.GameObjects.Components
{
public sealed override string Name => "HandheldLight";
public sealed override uint? NetID => ContentNetIDs.HANDHELD_LIGHT;
public sealed override Type StateType => typeof(HandheldLightComponentState);
[Serializable, NetSerializable]
protected sealed class HandheldLightComponentState : ComponentState

View File

@@ -8,7 +8,6 @@ namespace Content.Shared.GameObjects.Components
{
public sealed override string Name => "Stack";
public sealed override uint? NetID => ContentNetIDs.STACK;
public sealed override Type StateType => typeof(StackComponentState);
[Serializable, NetSerializable]
protected sealed class StackComponentState : ComponentState