forked from Simple-Station/Einstein-Engines
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from spess-empyrean/cherrypicking
Cherry-picks some commits from Wizden Codebase
- Loading branch information
Showing
12 changed files
with
556 additions
and
44 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
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
58 changes: 58 additions & 0 deletions
58
Content.Shared/Movement/Components/TileMovementComponent.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,58 @@ | ||
using System.Numerics; | ||
using Content.Shared.Movement.Systems; | ||
using Robust.Shared.GameStates; | ||
using Robust.Shared.Map; | ||
|
||
namespace Content.Shared.TileMovement; | ||
|
||
/// <summary> | ||
/// When attached to an entity with an InputMoverComponent, all mob movement on that entity will | ||
/// be tile-based. Contains info used to facilitate that movement. | ||
/// </summary> | ||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] | ||
public sealed partial class TileMovementComponent : Component | ||
{ | ||
/// <summary> | ||
/// Whether a tile movement slide is currently in progress. | ||
/// </summary> | ||
[AutoNetworkedField] | ||
public bool SlideActive; | ||
|
||
/// <summary> | ||
/// Local coordinates from which the current slide first began. | ||
/// </summary> | ||
[AutoNetworkedField] | ||
public EntityCoordinates Origin; | ||
|
||
/// <summary> | ||
/// Local coordinates of the target of the current slide. | ||
/// </summary> | ||
[AutoNetworkedField] | ||
public Vector2 Destination; | ||
|
||
/// <summary> | ||
/// This helps determine how long a slide should last. A slide will continue so long | ||
/// as a movement key (WASD) is being held down, but if it was held down for less than | ||
/// a certain time period then it will continue for a minimum period. | ||
/// </summary> | ||
[AutoNetworkedField] | ||
public TimeSpan? MovementKeyInitialDownTime; | ||
|
||
/// <summary> | ||
/// Move buttons used to initiate the current slide. | ||
/// </summary> | ||
[AutoNetworkedField] | ||
public MoveButtons CurrentSlideMoveButtons; | ||
|
||
/// <summary> | ||
/// Local coordinates of the entity on the last physics tick. | ||
/// </summary> | ||
[AutoNetworkedField] | ||
public Vector2 LastTickPosition; | ||
|
||
/// <summary> | ||
/// Whether this entity was weightless last physics tick. | ||
/// </summary> | ||
[AutoNetworkedField] | ||
public bool WasWeightlessLastTick; | ||
} |
Oops, something went wrong.