using Robust.Shared.GameStates; namespace Content.Shared._Stalker.Weight; [RegisterComponent, NetworkedComponent] public sealed partial class STWeightComponent : Component { /// /// The total weight of the entity, which is calculated /// by recursive passes over all children with this component /// [ViewVariables] public float Total => Self + InsideWeight; [ViewVariables] public float TotalMaximum => Maximum * MaximumModifier; [DataField, ViewVariables] public float InsideWeight; [DataField, ViewVariables] public float WeightThrowModifier = 0.1f; /// /// This allows you to adjust the strength of /// the throw so that small objects are not thrown harder, /// but large objects are thrown weaker /// [DataField, ViewVariables] public float WeightThrowMinStrengthModifier = 1f; [DataField, ViewVariables] public float MovementSpeedModifier = 1f; [DataField, ViewVariables] public float MaximumModifier = 1f; /// /// weight at which the entity stops completely, /// yes this code has a linear deceleration schedule, /// possible improvements in the future /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float Maximum = 200f; /// /// weight at which the entity begins to slow down. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float Overload = 100f; [ViewVariables] public float TotalOverload => Overload * MaximumModifier; /// /// Entity's own weight /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float Self = 0.05f; }