Skip to content

Commit

Permalink
Invert the Running/Walking States (#39)
Browse files Browse the repository at this point in the history
Simple-Station/Parkstation#193

# Changelog

:cl:
- tweak: The station's crew hivemind has decided to slow down their
movement and enjoy The Park instead of sprinting everywhere
  • Loading branch information
DEATHB4DEFEAT authored Jan 18, 2024
1 parent e40cf8b commit 17969d5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Content.IntegrationTests/Tests/Slipping/SlippingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task BananaSlipTest()
#pragma warning restore NUnit2045

// Walking over the banana slowly does not trigger a slip.
await SetKey(EngineKeyFunctions.Walk, BoundKeyState.Down);
await SetKey(EngineKeyFunctions.Walk, BoundKeyState.Up);
await Move(DirectionFlag.East, 1f);
#pragma warning disable NUnit2045
Assert.That(Delta(), Is.LessThan(0.5f));
Expand All @@ -51,7 +51,7 @@ public async Task BananaSlipTest()
AssertComp<KnockedDownComponent>(false, Player);

// Moving at normal speeds does trigger a slip.
await SetKey(EngineKeyFunctions.Walk, BoundKeyState.Up);
await SetKey(EngineKeyFunctions.Walk, BoundKeyState.Down);
await Move(DirectionFlag.West, 1f);
Assert.That(sys.Slipped, Does.Contain(SEntMan.GetEntity(Player)));
AssertComp<KnockedDownComponent>(true, Player);
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Movement/Components/InputMoverComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public sealed partial class InputMoverComponent : Component

public const float LerpTime = 1.0f;

public bool Sprinting => (HeldMoveButtons & MoveButtons.Walk) == 0x0;
public bool Sprinting => (HeldMoveButtons & MoveButtons.Walk) != 0x0;

[ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public bool CanMove { get; set; } = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public sealed partial class MovementSpeedModifierComponent : Component
public const float DefaultFriction = 20f;
public const float DefaultFrictionNoInput = 20f;

public const float DefaultBaseWalkSpeed = 2.5f;
public const float DefaultBaseSprintSpeed = 4.5f;
public const float DefaultBaseWalkSpeed = 3f;
public const float DefaultBaseSprintSpeed = 5f;

[AutoNetworkedField, ViewVariables]
public float WalkSpeedModifier = 1.0f;
Expand Down
2 changes: 1 addition & 1 deletion Resources/Locale/en-US/escape-menu/ui/options-menu.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ ui-options-function-move-up = Move Up
ui-options-function-move-left = Move Left
ui-options-function-move-down = Move Down
ui-options-function-move-right = Move Right
ui-options-function-walk = Walk
ui-options-function-walk = Run
ui-options-function-camera-rotate-left = Rotate left
ui-options-function-camera-rotate-right = Rotate right
Expand Down
4 changes: 2 additions & 2 deletions Resources/Prototypes/DeltaV/Entities/Mobs/Species/harpy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
False: {visible: false}
True: {visible: true}
- type: MovementSpeedModifier
baseWalkSpeed: 2.5
baseSprintSpeed: 5.0
baseWalkSpeed: 3
baseSprintSpeed: 5.5

- type: entity
save: false
Expand Down

0 comments on commit 17969d5

Please sign in to comment.