Some more fixes
This commit is contained in:
@@ -111,12 +111,12 @@ namespace Content.Server.Atmos.Components
|
||||
|
||||
public static class MovedByPressureExtensions
|
||||
{
|
||||
public static bool IsMovedByPressure(this IEntity entity)
|
||||
public static bool IsMovedByPressure(this EntityUid entity)
|
||||
{
|
||||
return entity.IsMovedByPressure(out _);
|
||||
}
|
||||
|
||||
public static bool IsMovedByPressure(this IEntity entity, [NotNullWhen(true)] out MovedByPressureComponent? moved)
|
||||
public static bool IsMovedByPressure(this EntityUid entity, [NotNullWhen(true)] out MovedByPressureComponent? moved)
|
||||
{
|
||||
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out moved) &&
|
||||
moved.Enabled;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Content.Server.Coordinates.Helpers
|
||||
{
|
||||
public static class SnapgridHelper
|
||||
{
|
||||
public static void SnapToGrid(this IEntity entity, IEntityManager? entityManager = null, IMapManager? mapManager = null)
|
||||
public static void SnapToGrid(this EntityUid entity, IEntityManager? entityManager = null, IMapManager? mapManager = null)
|
||||
{
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(entity).Coordinates = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(entity).Coordinates.SnapToGrid(entityManager, mapManager);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Content.Server.PDA
|
||||
/// </summary>
|
||||
/// <param name="player">The player to check in.</param>
|
||||
/// <returns>The id card component.</returns>
|
||||
public static IdCardComponent? GetHeldId(this IEntity player)
|
||||
public static IdCardComponent? GetHeldId(this EntityUid player)
|
||||
{
|
||||
IdCardComponent? firstIdInPda = null;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Content.Server.PDA
|
||||
/// <param name="player">The player to check in.</param>
|
||||
/// <param name="id">The id card component.</param>
|
||||
/// <returns>true if found, false otherwise.</returns>
|
||||
public static bool TryGetHeldId(this IEntity player, [NotNullWhen(true)] out IdCardComponent? id)
|
||||
public static bool TryGetHeldId(this EntityUid player, [NotNullWhen(true)] out IdCardComponent? id)
|
||||
{
|
||||
return (id = player.GetHeldId()) != null;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Content.Server.Popups
|
||||
/// </summary>
|
||||
/// <param name="source">The entity on which to popup the message.</param>
|
||||
/// <param name="message">The message to show.</param>
|
||||
public static void PopupMessageOtherClients(this IEntity source, string message)
|
||||
public static void PopupMessageOtherClients(this EntityUid source, string message)
|
||||
{
|
||||
var viewers = Filter.Empty()
|
||||
.AddPlayersByPvs(source)
|
||||
@@ -49,7 +49,7 @@ namespace Content.Server.Popups
|
||||
/// <param name="range">
|
||||
/// The range in which to search for players, defaulting to one screen.
|
||||
/// </param>
|
||||
public static void PopupMessageEveryone(this IEntity source, string message, IPlayerManager? playerManager = null, int range = 15)
|
||||
public static void PopupMessageEveryone(this EntityUid source, string message, IPlayerManager? playerManager = null, int range = 15)
|
||||
{
|
||||
source.PopupMessage(message);
|
||||
source.PopupMessageOtherClients(message);
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Content.Server.Throwing
|
||||
/// <param name="strength">How much the direction vector should be multiplied for velocity.</param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="pushbackRatio">The ratio of impulse applied to the thrower</param>
|
||||
internal static void TryThrow(this IEntity entity, Vector2 direction, float strength = 1.0f, IEntity? user = null, float pushbackRatio = 1.0f)
|
||||
internal static void TryThrow(this EntityUid entity, Vector2 direction, float strength = 1.0f, EntityUid? user = null, float pushbackRatio = 1.0f)
|
||||
{
|
||||
if ((!IoCManager.Resolve<IEntityManager>().EntityExists(entity) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity).EntityLifeStage) >= EntityLifeStage.Deleted ||
|
||||
strength <= 0f ||
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Server.UserInterface
|
||||
{
|
||||
public static class UserInterfaceHelpers
|
||||
{
|
||||
public static BoundUserInterface? GetUIOrNull(this IEntity entity, object uiKey)
|
||||
public static BoundUserInterface? GetUIOrNull(this EntityUid entity, object uiKey)
|
||||
{
|
||||
return IoCManager.Resolve<IEntityManager>().GetComponentOrNull<ServerUserInterfaceComponent>(entity)?.GetBoundUserInterfaceOrNull(uiKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user