Esempio n. 1
0
    private static List <string> CollectModPaths(IModelRepository modelRepository, out List <string> missingDlcs)
    {
        var result = new List <string>();

        missingDlcs = new List <string>();

        // need mods and cdlcs
        foreach (var cdlc in modelRepository.GetServerInfo().Cdlcs)
        {
            if (ArmaData.IsCDlcInstalled(cdlc))
            {
                result.Add(ArmaData.CDlcMap[cdlc]);
            }
            else
            {
                missingDlcs.Add(ArmaData.CDlcMap[cdlc]);
            }
        }

        foreach (var mod in modelRepository.GetMods())
        {
            if (mod.GetCurrentSelection() is ModSelectionStorageMod storageMod)
            {
                result.Add(storageMod.StorageMod.GetAbsolutePath());
            }
        }

        return(result);
    }
Esempio n. 2
0
    public void AgregarArma(ArmaData armaData)
    {
        cantidadArmas++;
        armaActual = cantidadArmas - 1;
        ArmaInventario newArma = new ArmaInventario(armaData);

        _armas.Add(newArma);
        CambiarArma(newArma);
    }
Esempio n. 3
0
        private static string?GetWorkshopPath()
        {
            var armaPath = ArmaData.GetGamePath();

            if (armaPath == null)
            {
                return(null);
            }

            var path = Path.Join(armaPath, "..", "..", "workshop", "content", "107410");

            path = Path.GetFullPath(path);
            if (Directory.Exists(path))
            {
                return(path);
            }
            LogManager.GetCurrentClassLogger().Error($"Couldn't find arma workshop path. Tried {path}");
            return(null);
        }
Esempio n. 4
0
 public ArmaInventario(ArmaData data)
 {
     this.data = data;
     municion  = data.municion;
 }
Esempio n. 5
0
 public void Show(ArmaData data)
 {
     print("Hi!");
     Show(data.nombre, data.descripcion, data.sprite);
 }
Esempio n. 6
0
 public void SetArma(ArmaData armaData)
 {
     data              = armaData;
     sprite.sprite     = data.sprite;
     _audioSource.clip = armaData.audio;
 }