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

Coolant Pods equipment category fix #1354

Merged
merged 2 commits into from
Dec 29, 2023
Merged
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public enum EquipmentDatabaseCategory {
e -> (e instanceof Tank) || e.isSupportVehicle()),

AMMO ("Ammo",
(eq, en) -> (eq instanceof AmmoType) && !(eq instanceof BombType),
(eq, en) -> (eq instanceof AmmoType) && !(eq instanceof BombType) && !eq.is(COOLANT_POD),
e -> e.getWeightClass() != EntityWeightClass.WEIGHT_SMALL_SUPPORT),

OTHER ("Other",
Expand All @@ -88,6 +88,7 @@ public enum EquipmentDatabaseCategory {
&& !(eq.hasFlag(F_PARTIAL_WING) && en.hasETypeFlag(Entity.ETYPE_PROTOMECH))
&& !(eq.hasFlag(F_SPONSON_TURRET) && en.isSupportVehicle())
&& !eq.hasFlag(F_PINTLE_TURRET))
|| eq.is(COOLANT_POD)
|| eq.is(BattleArmor.MINE_LAUNCHER)
|| (eq instanceof TAGWeapon)
|| ((eq instanceof AmmoType) && (((AmmoType) eq).getAmmoType() == AmmoType.T_COOLANT_POD))
Expand Down Expand Up @@ -115,7 +116,7 @@ public enum EquipmentDatabaseCategory {
// TODO: Provide MM.ITechManager.isLegal in static form

UNUSABLE_AMMO("Ammo w/o Weapon",
(eq, en) -> (eq instanceof AmmoType) && !(eq instanceof BombType)
(eq, en) -> (eq instanceof AmmoType) && !(eq instanceof BombType) && !eq.is(COOLANT_POD)
&& !UnitUtil.canUseAmmo(en, (AmmoType) eq, false))
;

Expand Down
Loading