File tree Expand file tree Collapse file tree
src/megamek/common/equipment Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3885,7 +3885,7 @@ public static MiscType createISSmallShield() {
38853885 misc.tonnage = 2;
38863886 misc.criticalSlots = 3;
38873887 misc.cost = 50000;
3888- misc.flags = misc.flags.or(F_MEK_EQUIPMENT, MiscTypeFlag.S_SHIELD_SMALL);
3888+ misc.flags = misc.flags.or(F_SHIELD, F_MEK_EQUIPMENT, MiscTypeFlag.S_SHIELD_SMALL);
38893889 misc.bv = 50;
38903890 misc.setInstantModeSwitch(true);
38913891 String[] modes = { S_NO_SHIELD, S_ACTIVE_SHIELD, S_PASSIVE_SHIELD };
@@ -3917,7 +3917,7 @@ public static MiscType createISMediumShield() {
39173917 misc.tonnage = 4;
39183918 misc.criticalSlots = 5;
39193919 misc.cost = 100000;
3920- misc.flags = misc.flags.or(F_MEK_EQUIPMENT, MiscTypeFlag.S_SHIELD_MEDIUM);
3920+ misc.flags = misc.flags.or(F_SHIELD, F_MEK_EQUIPMENT, MiscTypeFlag.S_SHIELD_MEDIUM);
39213921 misc.bv = 135;
39223922 misc.setInstantModeSwitch(true);
39233923 String[] modes = { S_NO_SHIELD, S_ACTIVE_SHIELD, S_PASSIVE_SHIELD };
Original file line number Diff line number Diff line change 4545import megamek .common .equipment .ArmorType ;
4646import megamek .common .equipment .EquipmentType ;
4747import megamek .common .equipment .EquipmentTypeLookup ;
48+ import megamek .common .equipment .MiscType ;
4849import megamek .common .equipment .StructureType ;
4950import megamek .common .weapons .bayWeapons .TeleOperatedMissileBayWeapon ;
5051import org .junit .jupiter .api .Test ;
@@ -120,6 +121,13 @@ void armorLookupSupportsDisplayInternalAndLegacyNames() {
120121 assertNull (EquipmentType .getArmorFromName ("Unknown Armor Type" ));
121122 }
122123
124+ @ Test
125+ void allShieldSizesHaveShieldFlag () {
126+ assertTrue (MiscType .createISSmallShield ().hasFlag (MiscType .F_SHIELD ));
127+ assertTrue (MiscType .createISMediumShield ().hasFlag (MiscType .F_SHIELD ));
128+ assertTrue (MiscType .createISLargeShield ().hasFlag (MiscType .F_SHIELD ));
129+ }
130+
123131 private static class EquipmentTypeWithInheritedLookupNames extends EquipmentType {
124132 private EquipmentTypeWithInheritedLookupNames () {
125133 setInternalName ("Parent" );
You can’t perform that action at this time.
0 commit comments