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

@@ -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