Beispiel #1
0
 /// <summary>
 /// Public constructors called for TorpedoTubes or Landing Bay, private constructor to handle either in same manner as WeaponTemplate
 /// </summary>
 /// <param name="facing">Weapon slot</param>
 /// <param name="weapon">Torpedo tube or Landing Bay</param>
 private AmmoWeapon(WeaponSlot facing, StarshipCreator parent, int index, Weapon weapon, bool enabled)
 {
     this.Parent = parent;
     this.Index = index;
     InitializeComponent();
     this.WeaponFacing = facing;
     Facing.Content = WeaponFacing.ToString();
     this.Weapon = weapon;
     if (!enabled)
     {
         WeaponChoice.Visibility = Visibility.Collapsed;
         WeaponName.Visibility = Visibility.Visible;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Public constructors called for TorpedoTubes or Landing Bay, private constructor to handle either in same manner as WeaponTemplate
 /// </summary>
 /// <param name="facing">Weapon slot</param>
 /// <param name="weapon">Torpedo tube or Landing Bay</param>
 private AmmoWeapon(WeaponSlot facing, StarshipCreator parent, int index, Weapon weapon, bool enabled)
 {
     this.Parent = parent;
     this.Index  = index;
     InitializeComponent();
     this.WeaponFacing = facing;
     Facing.Content    = WeaponFacing.ToString();
     this.Weapon       = weapon;
     if (!enabled)
     {
         WeaponChoice.Visibility = Visibility.Collapsed;
         WeaponName.Visibility   = Visibility.Visible;
     }
 }
Beispiel #3
0
 public NovaCannonTemplate(WeaponSlot facing, StarshipCreator parent, int index, NovaCannon weapon, bool enabled = true)//Also pass in method for button - do after making said method
 {
     this.Parent = parent;
     this.Index  = index;
     InitializeComponent();
     this.WeaponFacing = facing;
     Facing.Content    = WeaponFacing.ToString();
     this.Weapon       = weapon;
     if (!enabled)
     {
         WeaponChoice.Visibility = Visibility.Collapsed;
         WeaponName.Visibility   = Visibility.Visible;
     }
 }
 //Also pass in method for button - do after making said method
 public WeaponTemplate(WeaponSlot facing, StarshipCreator parent, int index, Weapon weapon = null, int macrodamage = 0, bool enabled = true)
 {
     this.Parent = parent;
     this.Index = index;
     InitializeComponent();
     this.WeaponFacing = facing;
     Facing.Content = WeaponFacing.ToString();
     this.Weapon = weapon;
     Macrodamage = macrodamage;
     if (!enabled)
     {
         WeaponChoice.Visibility = Visibility.Collapsed;
         WeaponName.Visibility = Visibility.Visible;
     }
 }
 public SupplementalTemplate(StarshipCreator parent, Supplemental component, int count = 1, int min = 0)
 {
     if (component == null)
         throw new ArgumentException("Cannot create a Template of a null Component");
     this.Parent = parent;
     InitializeComponent();
     this.Component = component;
     Min = min;
     Max = Component.Max;
     Count = count;
     CountDisplay.Content = Count.ToString();
     ComponentName.Text = Component.QualityName + (Count > 1 && !Component.Name.EndsWith("s") ? "s" : "");
     Special.Text = Component.Special;
     CheckAdd();
     CheckRemove();
 }
Beispiel #6
0
 public SupplementalTemplate(StarshipCreator parent, Supplemental component, int count = 1, int min = 0)
 {
     if (component == null)
     {
         throw new ArgumentException("Cannot create a Template of a null Component");
     }
     this.Parent = parent;
     InitializeComponent();
     this.Component       = component;
     Min                  = min;
     Max                  = Component.Max;
     Count                = count;
     CountDisplay.Content = Count.ToString();
     ComponentName.Text   = Component.QualityName + (Count > 1 && !Component.Name.EndsWith("s") ? "s" : "");
     Special.Text         = Component.Special;
     CheckAdd();
     CheckRemove();
 }
Beispiel #7
0
 public AmmoWeapon(WeaponSlot facing, StarshipCreator parent, int index, LandingBay weapon, bool enabled = true)
     : this(facing, parent, index, (Weapon)weapon, enabled)
 {
     AmmoButton.Content = "Squadrons";
     Tubes = false;
 }
Beispiel #8
0
 public AmmoWeapon(WeaponSlot facing, StarshipCreator parent, int index, TorpedoTubes weapon, bool enabled = true)
     : this(facing, parent, index, (Weapon)weapon, enabled)
 {
     AmmoButton.Content = "Torpedoes";
     Tubes = true;
 }
Beispiel #9
0
 public AmmoWeapon(WeaponSlot facing, StarshipCreator parent, int index, LandingBay weapon, bool enabled = true)
     : this(facing, parent, index, (Weapon)weapon, enabled)
 {
     AmmoButton.Content = "Squadrons";
     Tubes = false;
 }
Beispiel #10
0
 public AmmoWeapon(WeaponSlot facing, StarshipCreator parent, int index, TorpedoTubes weapon, bool enabled = true)
     : this(facing, parent, index, (Weapon)weapon, enabled)
 {
     AmmoButton.Content = "Torpedoes";
     Tubes = true;
 }