Exemplo n.º 1
0
 public override string GetInfo()
 {
     if (showInfo)
     {
         List <string> resourceList = BDAcTools.ParseNames(resourceNames);
         StringBuilder info         = new StringBuilder();
         info.AppendLine("Ammo Box setups available:");
         for (int i = 0; i < resourceList.Count; i++)
         {
             info.AppendLine(resourceList[i].Replace(",", ", "));
         }
         return(info.ToString());
     }
     else
     {
         return(string.Empty);
     }
 }
Exemplo n.º 2
0
        public void Open(ModuleWeapon weapon, Vector2 position)
        {
            open           = true;
            selectedWeapon = weapon;
            windowLocation = position;
            AList          = BDAcTools.ParseNames(weapon.bulletType);

            for (int a = 0; a < AList.Count; a++)
            {
                bulletInfo        = BulletInfo.bullets[AList[a].ToString()];
                guiAmmoTypeString = "";
                if (bulletInfo.subProjectileCount > 1)
                {
                    guiAmmoTypeString = Localizer.Format("#LOC_BDArmory_Ammo_Shot") + " ";
                }
                if (bulletInfo.apBulletMod >= 1.1)
                {
                    guiAmmoTypeString += Localizer.Format("#LOC_BDArmory_Ammo_AP") + " ";
                }
                if (bulletInfo.apBulletMod < 1.1 && bulletInfo.apBulletMod > 0.8f)
                {
                    guiAmmoTypeString += Localizer.Format("#LOC_BDArmory_Ammo_SAP") + " ";
                }
                if (bulletInfo.explosive)
                {
                    if (bulletInfo.fuzeType.ToLower() != "none")
                    {
                        guiAmmoTypeString += Localizer.Format("#LOC_BDArmory_Ammo_Flak") + " ";
                    }
                    guiAmmoTypeString += Localizer.Format("#LOC_BDArmory_Ammo_Explosive") + " ";
                }
                if (bulletInfo.incendiary)
                {
                    guiAmmoTypeString += Localizer.Format("#LOC_BDArmory_Ammo_Incendiary") + " ";
                }
                if (!bulletInfo.explosive && bulletInfo.apBulletMod <= 0.8)
                {
                    guiAmmoTypeString += Localizer.Format("#LOC_BDArmory_Ammo_Slug");
                }
                ammoDesc.Add(guiAmmoTypeString);
            }
        }