private static bool SharedIsAllowedItemProto(IProtoItem protoItem)
        {
            // check in the whitelist
            var itemType = protoItem.GetType();

            foreach (var type in WhitelistItemPrototypes)
            {
                if (type.IsAssignableFrom(itemType))
                {
                    return(true);
                }
            }

            return(false);
        }
        private static int GetProtoItemSortIndex(IProtoItem protoItem)
        {
            var type  = protoItem.GetType();
            int index = -1;

            while (++index < TypeDrawOrder.Length)
            {
                var otherType = TypeDrawOrder[index];
                if (type.IsImplementsInterface(otherType))
                {
                    return(index);
                }
            }

            return(int.MaxValue);
        }