Ejemplo n.º 1
0
        public Dictionary <string, string> GetSelectedBasicAssetsForLine(ushort lineId)
        {
            if (m_basicAssetsList == null)
            {
                LoadBasicAssets();
            }

            return(ExtensionStaticExtensionMethods.GetAssetListForLine(this, lineId).Intersect(m_basicAssetsList).ToDictionary(x => x, x => Locale.Get("VEHICLE_TITLE", x)));
        }
Ejemplo n.º 2
0
        public VehicleInfo GetAModel(ushort lineId)
        {
            VehicleInfo   info      = null;
            List <string> assetList = ExtensionStaticExtensionMethods.GetAssetListForLine(this, lineId);

            while (info == null && assetList.Count > 0)
            {
                info = VehicleUtils.GetRandomModel(assetList, out string modelName);
                if (info == null)
                {
                    ExtensionStaticExtensionMethods.RemoveAssetFromLine(this, lineId, modelName);
                    assetList = ExtensionStaticExtensionMethods.GetAssetListForLine(this, lineId);
                }
            }
            return(info);
        }