-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description Dionas now have 25% slower movement speed in exchange for total slip immunity and slow immunity (except lying down). Note that this also prevents slowdowns from hunger and thirst. This also fixes an existing bug with Sluggish and Snail-Paced related to `TraitSpeedModifierSystem`, as it was not applying the reduced movement speed upon spawning, only when the movement speed has been modified by another source. `TraitSpeedModifierSystem` has been moved from `Content.Server` to `Content.Shared`. This used to be a trait costing 3 points, but is now given for free to all Dionas per request of @VMSolidus. ## Media <details><summary>Expand</summary> **Speed with no items** ![image](https://github.com/user-attachments/assets/b723614a-79fe-401c-ae53-2ad98ff9a6d3) **Speed wearing a jugsuit, wearing a duffel bag, holding one duffel bag in each arm, and walking through a puddle of glue covered in spider webs.** ![image](https://github.com/user-attachments/assets/a934d2c1-437f-463c-8fe3-63b7b54a1f58) </details> # Changelog :cl: Skubman - add: Dionas have been given a 25% slower movement speed. In exchange for that, they gain absolute slip immunity and movement speed modifier immunity. This makes them immune to slowdown from things like duffelbags, hardsuits, and spider webs. - fix: Sluggish and Snail-Paced will now properly apply their movement penalties upon joining.
- Loading branch information
1 parent
f034031
commit f4d2e35
Showing
9 changed files
with
88 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
Content.Server/Traits/Assorted/TraitSpeedModifierSystem.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
Content.Shared/Traits/Assorted/Components/SpeedModifierImmunityComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Robust.Shared.GameStates; | ||
|
||
namespace Content.Shared.Traits.Assorted.Components; | ||
|
||
/// <summary> | ||
/// This is used to make an entity's movement speed constant and | ||
/// never affected by almost all movement speed modifiers. | ||
/// </summary> | ||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class SpeedModifierImmunityComponent : Component | ||
{ | ||
} |
10 changes: 6 additions & 4 deletions
10
...s/Assorted/TraitSpeedModifierComponent.cs → ...Components/TraitSpeedModifierComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
namespace Content.Server.Traits.Assorted; | ||
using Robust.Shared.GameStates; | ||
|
||
namespace Content.Shared.Traits.Assorted.Components; | ||
|
||
/// <summary> | ||
/// This component is used for traits that modify movement speed. | ||
/// </summary> | ||
[RegisterComponent] | ||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] | ||
public sealed partial class TraitSpeedModifierComponent : Component | ||
{ | ||
[DataField(required: true)] | ||
[DataField, AutoNetworkedField] | ||
public float WalkModifier = 1.0f; | ||
|
||
[DataField(required: true)] | ||
[DataField, AutoNetworkedField] | ||
public float SprintModifier = 1.0f; | ||
} |
31 changes: 31 additions & 0 deletions
31
Content.Shared/Traits/Assorted/Systems/TraitSpeedModifierSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Content.Shared.Movement.Components; | ||
using Content.Shared.Movement.Systems; | ||
using Content.Shared.Traits.Assorted.Components; | ||
|
||
namespace Content.Shared.Traits.Assorted.Systems; | ||
|
||
public sealed class TraitSpeedModifierSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly MovementSpeedModifierSystem _movement = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<TraitSpeedModifierComponent, ComponentStartup>(OnStartup); | ||
SubscribeLocalEvent<TraitSpeedModifierComponent, RefreshMovementSpeedModifiersEvent>(OnRefreshMovementSpeed); | ||
} | ||
|
||
private void OnRefreshMovementSpeed(EntityUid uid, TraitSpeedModifierComponent component, RefreshMovementSpeedModifiersEvent args) | ||
{ | ||
args.ModifySpeed(component.WalkModifier, component.SprintModifier, bypassImmunity: true); | ||
} | ||
|
||
private void OnStartup(EntityUid uid, TraitSpeedModifierComponent component, ComponentStartup args) | ||
{ | ||
if (!TryComp<MovementSpeedModifierComponent>(uid, out var move)) | ||
return; | ||
|
||
_movement.RefreshMovementSpeedModifiers(uid, move); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters