virtualize all net ids to reduce net traffic
This commit is contained in:
@@ -57,9 +57,9 @@ namespace Content.Shared.GameObjects.Components.Mobs
|
||||
{
|
||||
public bool IsInCombatMode { get; }
|
||||
public TargetingZone TargetingZone { get; }
|
||||
public override uint NetID => ContentNetIDs.COMBATMODE;
|
||||
|
||||
public CombatModeComponentState(bool isInCombatMode, TargetingZone targetingZone)
|
||||
: base(ContentNetIDs.COMBATMODE)
|
||||
{
|
||||
IsInCombatMode = isInCombatMode;
|
||||
TargetingZone = targetingZone;
|
||||
|
||||
@@ -69,7 +69,9 @@ namespace Content.Shared.GameObjects.Components.Mobs
|
||||
[NetSerializable]
|
||||
private sealed class HumanoidAppearanceComponentState : ComponentState
|
||||
{
|
||||
public HumanoidAppearanceComponentState(HumanoidCharacterAppearance appearance, Sex sex) : base(ContentNetIDs.HUMANOID_APPEARANCE)
|
||||
public override uint NetID => ContentNetIDs.HUMANOID_APPEARANCE;
|
||||
|
||||
public HumanoidAppearanceComponentState(HumanoidCharacterAppearance appearance, Sex sex)
|
||||
{
|
||||
Appearance = appearance;
|
||||
Sex = sex;
|
||||
|
||||
@@ -24,8 +24,9 @@ namespace Content.Shared.GameObjects.Components.Mobs
|
||||
public class OverlayEffectComponentState : ComponentState
|
||||
{
|
||||
public ScreenEffects ScreenEffect;
|
||||
public override uint NetID => ContentNetIDs.OVERLAYEFFECTS;
|
||||
|
||||
public OverlayEffectComponentState(ScreenEffects screenEffect) : base(ContentNetIDs.OVERLAYEFFECTS)
|
||||
public OverlayEffectComponentState(ScreenEffects screenEffect)
|
||||
{
|
||||
ScreenEffect = screenEffect;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,9 @@ namespace Content.Shared.GameObjects.Components.Mobs
|
||||
public class StatusEffectComponentState : ComponentState
|
||||
{
|
||||
public Dictionary<StatusEffect, string> StatusEffects;
|
||||
public override uint NetID => ContentNetIDs.STATUSEFFECTS;
|
||||
|
||||
public StatusEffectComponentState(Dictionary<StatusEffect, string> statusEffects) : base(ContentNetIDs.STATUSEFFECTS)
|
||||
public StatusEffectComponentState(Dictionary<StatusEffect, string> statusEffects)
|
||||
{
|
||||
StatusEffects = statusEffects;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user