Menu

#4019 BA that specify AP weapons in the datafile should not get an infantry auto rifle automatically

stable 0.38
closed
None
fixed
3
2014-02-11
2014-01-30
No

Not sure why this happens, but in the Lab and HQ (maybe MM as well) a large number of BA are getting Infantry Auto Rifles added for an unknown reason. Not every BA gets them though and it shows up in greater numbers the lighter the BA suit is.

Discussion

  • Sebastian Brocks

    • status: open --> closed
    • Resolution: none --> invalid
    • Milestone: undetermined --> stable 0.38
     
  • Sebastian Brocks

    This is a feature, not a bug. All BAs that feature an AP mount get this, so that they can actually make use of the AP mount in MM play.

     
  • Pheonix Rising

    Pheonix Rising - 2014-01-30

    Not all of these have an AP mount. the Nighthawk does not have an AP mount yet it gets an auto rifle

     
  • Sebastian Brocks

    the nighthawk gets it because the armored gloves convey the ap capability, too.
    i see the issue with the nighthawk, however. because the file specifies ap weapons that are carried in the armored gloves, we shouldnt add an extra one, we should add it only when no weapon is specified in the datafile.

     
  • Sebastian Brocks

    • summary: BA: Infatry Auto Rifle mystery --> BA that specify AP weapons in the datafile should not get an infantry auto rifle automatically
    • status: closed --> open
    • Resolution: invalid --> accepted
     
  • Hammer

    Hammer - 2014-01-30

    Nick and I have been discussing how to handle AP weapons with all BA changes we've been working on.

     
  • foij

    foij - 2014-01-30

    Every BA that doesn't have a weapon mounted in the RA is being assigned an Infantry Auto Rifle. If the BA has a right arm weapon and a AP mount, it also gets the auto rifle.

     
  • foij

    foij - 2014-01-30

    Strike that, BA are getting auto rifles without rhyme or reason.

     
    • Nicholas Walczak

      Unless the BA mounts infantry auto rifles, the only code that adds them looks like this:

      if (ent.countWorkingMisc(MiscType.F_AP_MOUNT) > 0) {
                      try {
                          ent.addEquipment(
                                  EquipmentType.get("InfantryAssaultRifle"),
                                  BattleArmor.LOC_SQUAD, false,
                                  BattleArmor.MOUNT_LOC_NONE, false);
                      } catch (LocationFullException ex) {
                          throw new EntityLoadingException(ex.getMessage());
                      }
                  }
      

      The only things that have the F_AP_MOUNT flag are AP Mounts and armored gloves.

      If you can give me an example of BA that doesn't have an AP mount or armored glove but has an infantry auto rifle (and doesn't mount one), I can fix that, but there is a reason to why these auto rifles are added.

      I have plans to fix this, I just haven't had a chance to realize them yet.

       
  • Anonymous

    Anonymous - 2014-01-31

    Glad my overzelous pestering came to some good use :) Good job on the tricky rework so far.

     
  • Nicholas Walczak

    In [r10515] I added the ability to select what AP weapon is mounted in an AP mount or armored glove. Because of this, I removed the code that adds the infantry auto rifles to the BA.

     

    Related

    Commit: [r10515]

  • Nicholas Walczak

    • assigned_to: Nicholas Walczak
    • Resolution: accepted --> fixed
     
  • Dylan Myers

    Dylan Myers - 2014-02-11
    • Status: open --> closed
     

Log in to post a comment.