Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BA tube artillery smoke munitions #4868

Merged
merged 1 commit into from
Nov 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions megamek/src/megamek/common/AmmoType.java
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ public static void initializeTypes() {
ArrayList<AmmoType> sniperCannonAmmos = new ArrayList<>(3);
ArrayList<AmmoType> longTomAmmos = new ArrayList<>(4);
ArrayList<AmmoType> longTomCannonAmmos = new ArrayList<>(4);
ArrayList<AmmoType> baTubeAmmos = new ArrayList<>(2);
ArrayList<AmmoType> mortarAmmos = new ArrayList<>(4);
ArrayList<AmmoType> clanMortarAmmos = new ArrayList<>(4);
ArrayList<AmmoType> lrtAmmos = new ArrayList<>(26);
Expand Down Expand Up @@ -1203,7 +1204,9 @@ public static void initializeTypes() {
EquipmentType.addType(AmmoType.createISMRM4Ammo());
EquipmentType.addType(AmmoType.createISMRM5Ammo());
EquipmentType.addType(AmmoType.createISBATaserAmmo());
EquipmentType.addType(AmmoType.createBATubeArtyAmmo());
base = AmmoType.createBATubeArtyAmmo();
EquipmentType.addType(base);
baTubeAmmos.add(base);
base = AmmoType.createBAISLRM1Ammo();
isBaLrmAmmos.add(base);
EquipmentType.addType(base);
Expand Down Expand Up @@ -2656,6 +2659,17 @@ public static void initializeTypes() {
AmmoType.createMunitions(thumperCannonAmmos, munitions);
AmmoType.createMunitions(longTomCannonAmmos, munitions);

munitions.clear();
munitions.add(new MunitionMutator("Smoke", 1, Munitions.M_SMOKE,
new TechAdvancement(TECH_BASE_IS).setIntroLevel(false).setUnofficial(false).setTechRating(RATING_E)
.setAvailability(RATING_X, RATING_X, RATING_F, RATING_E)
.setISAdvancement(3070, 3075, DATE_NONE, DATE_NONE, DATE_NONE)
.setISApproximate(true, false, false, false, false).setPrototypeFactions(F_CS)
.setProductionFactions(F_CS),
"375, TO"));
AmmoType.createMunitions(baTubeAmmos, munitions);


// Create the munition types for SRT launchers.
munitions.clear();
munitions.add(new MunitionMutator("Artemis-capable", 1, Munitions.M_ARTEMIS_CAPABLE,
Expand Down Expand Up @@ -3235,7 +3249,6 @@ private static AmmoType createBATubeArtyAmmo() {
AmmoType ammo = new AmmoType();

ammo.name = "BA Tube Artillery Ammo";
// TODO need mutator for Smoke Artillery
ammo.shortName = "Tube Artillery";
ammo.setInternalName("ISBATubeArtilleryAmmo");
ammo.damagePerShot = 1;
Expand Down Expand Up @@ -13238,6 +13251,7 @@ public AmmoType createMunitionType(AmmoType base) {
case AmmoType.T_VEHICLE_FLAMER:
case AmmoType.T_HEAVY_FLAMER:
case AmmoType.T_FLUID_GUN:
case AmmoType.T_BA_TUBE:
// Add the munition name to the beginning of the display name.
nameBuf = new StringBuilder(name);
nameBuf.append(" ");
Expand Down