Revert "virtualize all net ids to reduce net traffic"

This reverts commit 027c338c5f.

Formatting fix left in.
This commit is contained in:
Tyler Young
2020-06-08 16:49:05 -04:00
parent e85b839d27
commit c3fd0ef882
25 changed files with 31 additions and 62 deletions

View File

@@ -7,9 +7,8 @@ namespace Content.Shared.GameObjects.Components.Items
public class ClothingComponentState : ItemComponentState
{
public string ClothingEquippedPrefix { get; set; }
public override uint NetID => ContentNetIDs.CLOTHING;
public ClothingComponentState(string clothingEquippedPrefix, string equippedPrefix) : base(equippedPrefix)
public ClothingComponentState(string clothingEquippedPrefix, string equippedPrefix) : base(equippedPrefix, ContentNetIDs.CLOTHING)
{
ClothingEquippedPrefix = clothingEquippedPrefix;
}

View File

@@ -8,12 +8,15 @@ namespace Content.Shared.GameObjects.Components.Items
public class ItemComponentState : ComponentState
{
public string EquippedPrefix { get; set; }
public override uint NetID => ContentNetIDs.ITEM;
public ItemComponentState(string equippedPrefix)
public ItemComponentState(string equippedPrefix) : base(ContentNetIDs.ITEM)
{
EquippedPrefix = equippedPrefix;
}
protected ItemComponentState(string equippedPrefix, uint netId) : base(netId)
{
EquippedPrefix = equippedPrefix;
}
}
}

View File

@@ -74,9 +74,8 @@ namespace Content.Shared.GameObjects.Components.Items
{
public TimeSpan? CooldownStart { get; set; }
public TimeSpan? CooldownEnd { get; set; }
public override uint NetID => ContentNetIDs.ITEMCOOLDOWN;
public ItemCooldownComponentState()
public ItemCooldownComponentState() : base(ContentNetIDs.ITEMCOOLDOWN)
{
}
}

View File

@@ -17,9 +17,8 @@ namespace Content.Shared.GameObjects
{
public readonly Dictionary<string, EntityUid> Hands;
public readonly string ActiveIndex;
public override uint NetID => ContentNetIDs.HANDS;
public HandsComponentState(Dictionary<string, EntityUid> hands, string activeIndex)
public HandsComponentState(Dictionary<string, EntityUid> hands, string activeIndex) : base(ContentNetIDs.HANDS)
{
Hands = hands;
ActiveIndex = activeIndex;