generated from VLADIMIR/template
fixes
This commit is contained in:
@@ -230,6 +230,12 @@ func (s *server) GetGameMap(ctx context.Context, req *proto.GetGameMapReq) (*pro
|
||||
}
|
||||
result := make([]*proto.MapItem, 0, len(items))
|
||||
for _, item := range items {
|
||||
if item.Kind == "screen" && screenStates[item.ItemID] == nil {
|
||||
if err := s.mapRepo.Delete(ctx, item); err != nil {
|
||||
return nil, status.Error(codes.Internal, "не удалось обновить карту")
|
||||
}
|
||||
continue
|
||||
}
|
||||
mapped := &proto.MapItem{Kind: item.Kind, ItemId: int32(item.ItemID), X: int32(item.X), Y: int32(item.Y), Hidden: item.Hidden}
|
||||
if item.Kind == "team" {
|
||||
mapped.Label = teamNames[item.ItemID]
|
||||
|
||||
Reference in New Issue
Block a user