Fix 3000 errors
This commit is contained in:
@@ -35,9 +35,9 @@ namespace Content.Server.Tabletop
|
||||
SpawnPiecesRow(session, entityManager, "White", new MapCoordinates(x, y - 7 * separation, mapId), separation);
|
||||
|
||||
// Extra queens
|
||||
IEntity tempQualifier = entityManager.SpawnEntity("BlackQueen", new MapCoordinates(x + 9 * separation + 9f / 32, y - 3 * separation, mapId));
|
||||
EntityUidtempQualifier = entityManager.SpawnEntity("BlackQueen", new MapCoordinates(x + 9 * separation + 9f / 32, y - 3 * separation, mapId));
|
||||
session.Entities.Add(tempQualifier);
|
||||
IEntity tempQualifier1 = entityManager.SpawnEntity("WhiteQueen", new MapCoordinates(x + 9 * separation + 9f / 32, y - 4 * separation, mapId));
|
||||
EntityUidtempQualifier1 = entityManager.SpawnEntity("WhiteQueen", new MapCoordinates(x + 9 * separation + 9f / 32, y - 4 * separation, mapId));
|
||||
session.Entities.Add(tempQualifier1);
|
||||
}
|
||||
|
||||
@@ -53,23 +53,23 @@ namespace Content.Server.Tabletop
|
||||
switch (piecesRow[i])
|
||||
{
|
||||
case 'r':
|
||||
IEntity tempQualifier = entityManager.SpawnEntity(color + "Rook", new MapCoordinates(x + i * separation, y, mapId));
|
||||
EntityUidtempQualifier = entityManager.SpawnEntity(color + "Rook", new MapCoordinates(x + i * separation, y, mapId));
|
||||
session.Entities.Add(tempQualifier);
|
||||
break;
|
||||
case 'n':
|
||||
IEntity tempQualifier1 = entityManager.SpawnEntity(color + "Knight", new MapCoordinates(x + i * separation, y, mapId));
|
||||
EntityUidtempQualifier1 = entityManager.SpawnEntity(color + "Knight", new MapCoordinates(x + i * separation, y, mapId));
|
||||
session.Entities.Add(tempQualifier1);
|
||||
break;
|
||||
case 'b':
|
||||
IEntity tempQualifier2 = entityManager.SpawnEntity(color + "Bishop", new MapCoordinates(x + i * separation, y, mapId));
|
||||
EntityUidtempQualifier2 = entityManager.SpawnEntity(color + "Bishop", new MapCoordinates(x + i * separation, y, mapId));
|
||||
session.Entities.Add(tempQualifier2);
|
||||
break;
|
||||
case 'q':
|
||||
IEntity tempQualifier3 = entityManager.SpawnEntity(color + "Queen", new MapCoordinates(x + i * separation, y, mapId));
|
||||
EntityUidtempQualifier3 = entityManager.SpawnEntity(color + "Queen", new MapCoordinates(x + i * separation, y, mapId));
|
||||
session.Entities.Add(tempQualifier3);
|
||||
break;
|
||||
case 'k':
|
||||
IEntity tempQualifier4 = entityManager.SpawnEntity(color + "King", new MapCoordinates(x + i * separation, y, mapId));
|
||||
EntityUidtempQualifier4 = entityManager.SpawnEntity(color + "King", new MapCoordinates(x + i * separation, y, mapId));
|
||||
session.Entities.Add(tempQualifier4);
|
||||
break;
|
||||
}
|
||||
@@ -83,7 +83,7 @@ namespace Content.Server.Tabletop
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
IEntity tempQualifier = entityManager.SpawnEntity(color + "Pawn", new MapCoordinates(x + i * separation, y, mapId));
|
||||
EntityUidtempQualifier = entityManager.SpawnEntity(color + "Pawn", new MapCoordinates(x + i * separation, y, mapId));
|
||||
session.Entities.Add(tempQualifier);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,43 +35,43 @@ namespace Content.Server.Tabletop
|
||||
var center = session.Position;
|
||||
|
||||
// Red pieces.
|
||||
IEntity tempQualifier = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x1, -y1));
|
||||
EntityUidtempQualifier = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x1, -y1));
|
||||
session.Entities.Add(tempQualifier);
|
||||
IEntity tempQualifier1 = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x1, -y2));
|
||||
EntityUidtempQualifier1 = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x1, -y2));
|
||||
session.Entities.Add(tempQualifier1);
|
||||
IEntity tempQualifier2 = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x2, -y1));
|
||||
EntityUidtempQualifier2 = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x2, -y1));
|
||||
session.Entities.Add(tempQualifier2);
|
||||
IEntity tempQualifier3 = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x2, -y2));
|
||||
EntityUidtempQualifier3 = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x2, -y2));
|
||||
session.Entities.Add(tempQualifier3);
|
||||
|
||||
// Green pieces.
|
||||
IEntity tempQualifier4 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x1, -y1));
|
||||
EntityUidtempQualifier4 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x1, -y1));
|
||||
session.Entities.Add(tempQualifier4);
|
||||
IEntity tempQualifier5 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x1, -y2));
|
||||
EntityUidtempQualifier5 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x1, -y2));
|
||||
session.Entities.Add(tempQualifier5);
|
||||
IEntity tempQualifier6 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x2, -y1));
|
||||
EntityUidtempQualifier6 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x2, -y1));
|
||||
session.Entities.Add(tempQualifier6);
|
||||
IEntity tempQualifier7 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x2, -y2));
|
||||
EntityUidtempQualifier7 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x2, -y2));
|
||||
session.Entities.Add(tempQualifier7);
|
||||
|
||||
// Yellow pieces.
|
||||
IEntity tempQualifier8 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x1, y1));
|
||||
EntityUidtempQualifier8 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x1, y1));
|
||||
session.Entities.Add(tempQualifier8);
|
||||
IEntity tempQualifier9 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x1, y2));
|
||||
EntityUidtempQualifier9 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x1, y2));
|
||||
session.Entities.Add(tempQualifier9);
|
||||
IEntity tempQualifier10 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x2, y1));
|
||||
EntityUidtempQualifier10 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x2, y1));
|
||||
session.Entities.Add(tempQualifier10);
|
||||
IEntity tempQualifier11 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x2, y2));
|
||||
EntityUidtempQualifier11 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x2, y2));
|
||||
session.Entities.Add(tempQualifier11);
|
||||
|
||||
// Blue pieces.
|
||||
IEntity tempQualifier12 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x1, y1));
|
||||
EntityUidtempQualifier12 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x1, y1));
|
||||
session.Entities.Add(tempQualifier12);
|
||||
IEntity tempQualifier13 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x1, y2));
|
||||
EntityUidtempQualifier13 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x1, y2));
|
||||
session.Entities.Add(tempQualifier13);
|
||||
IEntity tempQualifier14 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x2, y1));
|
||||
EntityUidtempQualifier14 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x2, y1));
|
||||
session.Entities.Add(tempQualifier14);
|
||||
IEntity tempQualifier15 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x2, y2));
|
||||
EntityUidtempQualifier15 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x2, y2));
|
||||
session.Entities.Add(tempQualifier15);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Content.Server.Tabletop
|
||||
/// </summary>
|
||||
private void OnTabletopMove(TabletopMoveEvent msg, EntitySessionEventArgs args)
|
||||
{
|
||||
if (args.SenderSession as IPlayerSession is not { AttachedEntityUid: { } playerEntity } playerSession)
|
||||
if (args.SenderSession as IPlayerSession is not { AttachedEntity: { } playerEntity } playerSession)
|
||||
return;
|
||||
|
||||
if (!EntityManager.TryGetComponent(msg.TableUid, out TabletopGameComponent? tabletop) || tabletop.Session is not {} session)
|
||||
@@ -43,7 +43,7 @@ namespace Content.Server.Tabletop
|
||||
return;
|
||||
|
||||
// Check if moved entity exists and has tabletop draggable component
|
||||
if (!EntityManager.TryGetEntity(msg.MovedEntityUid, out var movedEntity))
|
||||
if (!EntityManager.EntityExists(msg.MovedEntityUid)
|
||||
return;
|
||||
|
||||
if (!EntityManager.HasComponent<TabletopDraggableComponent>(movedEntity))
|
||||
@@ -59,7 +59,7 @@ namespace Content.Server.Tabletop
|
||||
|
||||
private void OnDraggingPlayerChanged(TabletopDraggingPlayerChangedEvent msg)
|
||||
{
|
||||
var draggedEntity = EntityManager.GetEntity(msg.DraggedEntityUid);
|
||||
var draggedmsg.DraggedEntityUid
|
||||
|
||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent<TabletopDraggableComponent?>(draggedEntity, out var draggableComponent)) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user