Veilheim/Map/PortalList.cs
/// <summary>
///     Create a <see cref="ZPackage" /> of this portal list
/// </summary>
/// <returns></returns>
Create a  of this portal list
Create a of this portal list
public ZPackage ToZPackage()
        {
            Logger.LogDebug("Serializing portal list to ZPackage");
            var package = new ZPackage();
            var connected = this.Where(x => x.m_con);
            package.Write(connected.Count());
            foreach (var connectedPortal in connected)
            {
                Logger.LogDebug($"{connectedPortal.m_tag}@{connectedPortal.m_pos}");
                package.Write(connectedPortal.m_pos);
                package.Write(connectedPortal.m_tag);
            }
            var unconnected = this.Where(x => !x.m_con);
            package.Write(unconnected.Count());
            foreach (var unconnectedPortal in unconnected)
            {
                Logger.LogDebug($"{unconnectedPortal.m_tag}@{unconnectedPortal.m_pos}");
                package.Write(unconnectedPortal.m_pos);
                package.Write(unconnectedPortal.m_tag);
            }
            return package;
        }
public ZPackage ToZPackage ( ) { Logger . LogDebug ( " " ) ; var package = new ZPackage ( ) ; var connected = this . Where ( x => x . m_con ) ; package . Write ( connected . Count ( ) ) ; foreach ( var connectedPortal in connected ) { Logger . LogDebug ( $" { connectedPortal . m_tag } @ { connectedPortal . m_pos } " ) ; package . Write ( connectedPortal . m_pos ) ; package . Write ( connectedPortal . m_tag ) ; } var unconnected = this . Where ( x => ! x . m_con ) ; package . Write ( unconnected . Count ( ) ) ; foreach ( var unconnectedPortal in unconnected ) { Logger . LogDebug ( $" { unconnectedPortal . m_tag } @ { unconnectedPortal . m_pos } " ) ; package . Write ( unconnectedPortal . m_pos ) ; package . Write ( unconnectedPortal . m_tag ) ; } return package ; }
Create a  of this portal list
Create a of this portal list
None