* Add nullable to some Content.Shared files. * Use [NotNullWhen(true)] * Undo adding now redundant !'s * Forgot one * Add a ton more nullable * You can guess * Fix some issues * It actually compiles now * Auto stash before merge of "null2" and "origin/master" * I lied * enable annotations -> enable * Revert ActionBlockerSystem.cs to original * Fix ActionBlockerSystem.cs * More nullable * Undo some added exclamation marks * Fix issues * Update Content.Shared/Maps/ContentTileDefinition.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Resolve some issues * Remove unused method * Fix more issues * Fix more issues * Fix more issues * Fix more issues * Fix issue, rollback SharedGhostComponent.cs * Update submodule * Fix issue, invert some if-statements to reduce nesting * Revert RobustToolbox * FIx things broken by merge * Some fixes - Replaced with string.Empty - Remove some exclamation marks - Revert file * Some fixes * Trivial #nullable enable * Fix null ables Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
61 lines
2.0 KiB
C#
61 lines
2.0 KiB
C#
#nullable enable
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Map;
|
|
using Robust.Shared.Maths;
|
|
|
|
namespace Content.Shared.GameObjects.Components.Movement
|
|
{
|
|
// Does nothing except ensure uniqueness between mover components.
|
|
// There can only be one.
|
|
public interface IMoverComponent : IComponent
|
|
{
|
|
/// <summary>
|
|
/// Movement speed (m/s) that the entity walks.
|
|
/// </summary>
|
|
float CurrentWalkSpeed { get; }
|
|
|
|
/// <summary>
|
|
/// Movement speed (m/s) that the entity sprints.
|
|
/// </summary>
|
|
float CurrentSprintSpeed { get; }
|
|
|
|
|
|
/// <summary>
|
|
/// The movement speed (m/s) of the entity when it pushes off of a solid object in zero gravity.
|
|
/// </summary>
|
|
float CurrentPushSpeed { get; }
|
|
|
|
/// <summary>
|
|
/// How far an entity can reach (in meters) to grab hold of a solid object in zero gravity.
|
|
/// </summary>
|
|
float GrabRange { get; }
|
|
|
|
/// <summary>
|
|
/// Is the entity Sprinting (running)?
|
|
/// </summary>
|
|
bool Sprinting { get; }
|
|
|
|
/// <summary>
|
|
/// Calculated linear velocity direction of the entity.
|
|
/// </summary>
|
|
(Vector2 walking, Vector2 sprinting) VelocityDir { get; }
|
|
|
|
EntityCoordinates LastPosition { get; set; }
|
|
|
|
float StepSoundDistance { get; set; }
|
|
|
|
/// <summary>
|
|
/// Toggles one of the four cardinal directions. Each of the four directions are
|
|
/// composed into a single direction vector, <see cref="SharedPlayerInputMoverComponent.VelocityDir"/>. Enabling
|
|
/// opposite directions will cancel each other out, resulting in no direction.
|
|
/// </summary>
|
|
/// <param name="direction">Direction to toggle.</param>
|
|
/// <param name="subTick"></param>
|
|
/// <param name="enabled">If the direction is active.</param>
|
|
void SetVelocityDirection(Direction direction, ushort subTick, bool enabled);
|
|
|
|
void SetSprinting(ushort subTick, bool walking);
|
|
|
|
}
|
|
}
|