Ejemplo n.º 1
0
 public void UpdateTags(NetFieldExportGroup networkGameplayTagNode)
 {
     for (int i = 0; i < Tags.Length; i++)
     {
         Tags[i].TagName = networkGameplayTagNode.NetFieldExports[(int)Tags[i].TagIndex]?.Name;
     }
 }
        public void AddToExportGroupMap(string group, NetFieldExportGroup exportGroup)
        {
            if (NetworkGameplayTagNodeIndex == null && group == "NetworkGameplayTagNodeIndex")
            {
                NetworkGameplayTagNodeIndex = exportGroup;
            }

            //Easiest way to do this update
            if (group.EndsWith("ClassNetCache"))
            {
                exportGroup.PathName = RemoveAllPathPrefixes(exportGroup.PathName);
            }

            NetFieldExportGroupMap[group] = exportGroup;

            //Check if partial path
            foreach (KeyValuePair <string, string> partialRedirectKvp in CoreRedirects.PartialRedirects)
            {
                if (group.StartsWith(partialRedirectKvp.Key))
                {
                    _partialPathNames.TryAdd(group, partialRedirectKvp.Value);
                    _partialPathNames.TryAdd(RemoveAllPathPrefixes(group), partialRedirectKvp.Value);

                    break;
                }
            }
        }
 public void UpdateTags(NetFieldExportGroup networkGameplayTagNode)
 {
     for (int i = 0; i < Tags.Length; i++)
     {
         Tags[i].UpdateTagName(networkGameplayTagNode);
     }
 }
        public void UpdateTagName(NetFieldExportGroup networkGameplayTagNode)
        {
            if (networkGameplayTagNode == null || TagIndex > networkGameplayTagNode.NetFieldExportsLength)
            {
                return;
            }

            TagName = networkGameplayTagNode.NetFieldExports[(int)TagIndex]?.Name;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Add a <see cref="NetFieldExportGroup"/> to the GuidCache.
        /// </summary>
        public void AddToExportGroupMap(string group, NetFieldExportGroup exportGroup)
        {
            if (group.EndsWith("ClassNetCache"))
            {
                exportGroup.PathName = exportGroup.PathName.RemoveAllPathPrefixes();
            }

            NetFieldExportGroupMap[group] = exportGroup;
            NetFieldExportGroupIndexToGroup[exportGroup.PathNameIndex] = group;
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Empty the NetGuidCache
        /// </summary>
        public void Cleanup()
        {
            NetFieldExportGroupIndexToGroup.Clear();
            NetFieldExportGroupMap.Clear();
            NetGuidToPathName.Clear();
            //ObjectLookup.Clear();
            NetFieldExportGroupMapPathFixed.Clear();
            _networkGameplayTagNodeIndex = null;

            _archTypeToExportGroup.Clear();
            _cleanedPaths.Clear();
            _cleanedClassNetCache.Clear();
            _failedPaths.Clear();
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Tries to find the ClassNetCache for the given group path.
        /// </summary>
        /// <param name="group"></param>
        /// <returns>true if ClassNetCache was found, false otherwise</returns>
        public bool TryGetClassNetCache(string group, out NetFieldExportGroup netFieldExportGroup)
        {
            if (group == null)
            {
                netFieldExportGroup = null;
                return(false);
            }

            if (!_cleanedClassNetCache.TryGetValue(group, out var classNetCachePath))
            {
                classNetCachePath            = $"{group.RemoveAllPathPrefixes()}_ClassNetCache";
                _cleanedClassNetCache[group] = classNetCachePath;
            }

            return(NetFieldExportGroupMap.TryGetValue(classNetCachePath, out netFieldExportGroup));
        }
Ejemplo n.º 8
0
 /// <summary>
 /// Add a <see cref="NetFieldExportGroup"/> to the GuidCache.
 /// </summary>
 public void AddToExportGroupMap(string group, NetFieldExportGroup exportGroup)
 {
     NetFieldExportGroupMap[group] = exportGroup;
     NetFieldExportGroupIndexToGroup[exportGroup.PathNameIndex] = group;
 }