Enable nullability in Content.Server (#3685)

This commit is contained in:
DrSmugleaf
2021-03-16 15:50:20 +01:00
committed by GitHub
parent 90fec0ed24
commit a5ade526b7
306 changed files with 1616 additions and 1441 deletions

View File

@@ -7,13 +7,13 @@ namespace Content.Server.Utility
{
public static class SnapgridHelper
{
public static void SnapToGrid(this IEntity entity, SnapGridOffset offset = SnapGridOffset.Center, IEntityManager entityManager = null, IMapManager mapManager = null)
public static void SnapToGrid(this IEntity entity, SnapGridOffset offset = SnapGridOffset.Center, IEntityManager? entityManager = null, IMapManager? mapManager = null)
{
entity.Transform.Coordinates = entity.Transform.Coordinates.SnapToGrid(offset, entityManager, mapManager);
}
public static EntityCoordinates SnapToGrid(this EntityCoordinates coordinates,
SnapGridOffset offset = SnapGridOffset.Center, IEntityManager entityManager = null, IMapManager mapManager = null)
SnapGridOffset offset = SnapGridOffset.Center, IEntityManager? entityManager = null, IMapManager? mapManager = null)
{
entityManager ??= IoCManager.Resolve<IEntityManager>();
mapManager ??= IoCManager.Resolve<IMapManager>();