virtualize all net ids to reduce net traffic
This commit is contained in:
@@ -7,8 +7,9 @@ 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, ContentNetIDs.CLOTHING)
|
||||
public ClothingComponentState(string clothingEquippedPrefix, string equippedPrefix) : base(equippedPrefix)
|
||||
{
|
||||
ClothingEquippedPrefix = clothingEquippedPrefix;
|
||||
}
|
||||
|
||||
@@ -8,15 +8,12 @@ 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) : base(ContentNetIDs.ITEM)
|
||||
public ItemComponentState(string equippedPrefix)
|
||||
{
|
||||
EquippedPrefix = equippedPrefix;
|
||||
}
|
||||
|
||||
protected ItemComponentState(string equippedPrefix, uint netId) : base(netId)
|
||||
{
|
||||
EquippedPrefix = equippedPrefix;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,8 +74,9 @@ namespace Content.Shared.GameObjects.Components.Items
|
||||
{
|
||||
public TimeSpan? CooldownStart { get; set; }
|
||||
public TimeSpan? CooldownEnd { get; set; }
|
||||
public override uint NetID => ContentNetIDs.ITEMCOOLDOWN;
|
||||
|
||||
public ItemCooldownComponentState() : base(ContentNetIDs.ITEMCOOLDOWN)
|
||||
public ItemCooldownComponentState()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,9 @@ 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) : base(ContentNetIDs.HANDS)
|
||||
public HandsComponentState(Dictionary<string, EntityUid> hands, string activeIndex)
|
||||
{
|
||||
Hands = hands;
|
||||
ActiveIndex = activeIndex;
|
||||
|
||||
Reference in New Issue
Block a user