mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 13:37:47 +03:00
## Mirror of PR #26110: [SlowContactsSystem to SpeedModifierContactsSystem mini rework](https://github.com/space-wizards/space-station-14/pull/26110) from <img src="https://avatars.githubusercontent.com/u/10567778?v=4" alt="space-wizards" width="22"/> [space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14) ###### `c35ff87e146f0cda7c10782f4ab80b784b51e5fe` PR opened by <img src="https://avatars.githubusercontent.com/u/96445749?v=4" width="16"/><a href="https://github.com/TheShuEd"> TheShuEd</a> at 2024-03-14 09:45:33 UTC --- PR changed 9 files with 42 additions and 34 deletions. The PR had the following labels: - Status: Needs Review --- <details open="true"><summary><h1>Original Body</h1></summary> > ## About the PR > system and components are renamed. It can now be used including to accelerate entities > > ## Why / Balance > more reusability for the system > > ## Technical details > Now the system calculates the arithmetic mean of all the entities that affects your speed. </details> Co-authored-by: SimpleStation14 <Unknown>
23 lines
707 B
C#
23 lines
707 B
C#
using Content.Shared.Movement.Systems;
|
|
using Content.Shared.Whitelist;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Movement.Components;
|
|
|
|
[NetworkedComponent, RegisterComponent]
|
|
[AutoGenerateComponentState]
|
|
[Access(typeof(SpeedModifierContactsSystem))]
|
|
public sealed partial class SpeedModifierContactsComponent : Component
|
|
{
|
|
[DataField("walkSpeedModifier"), ViewVariables(VVAccess.ReadWrite)]
|
|
[AutoNetworkedField]
|
|
public float WalkSpeedModifier = 1.0f;
|
|
|
|
[AutoNetworkedField]
|
|
[DataField("sprintSpeedModifier"), ViewVariables(VVAccess.ReadWrite)]
|
|
public float SprintSpeedModifier = 1.0f;
|
|
|
|
[DataField("ignoreWhitelist")]
|
|
public EntityWhitelist? IgnoreWhitelist;
|
|
}
|