@Override public ConfiguredComponentOmniMech[] defaultComponents(ChassisBase aChassis) { ChassisOmniMech omniMech = (ChassisOmniMech) aChassis; ConfiguredComponentOmniMech[] ans = new ConfiguredComponentOmniMech[Location.values().length]; for (Location location : Location.values()) { ans[location.ordinal()] = new ConfiguredComponentOmniMech( omniMech.getComponent(location), true, OmniPodDB.lookupOriginal(omniMech, location)); if ((location == Location.LeftTorso || location == Location.RightTorso) && omniMech.getFixedEngine().getType() == EngineType.XL) { ans[location.ordinal()].addItem(ConfiguredComponentBase.ENGINE_INTERNAL_CLAN); } } return ans; }
@Override public ConfiguredComponentOmniMech[] cloneComponents( LoadoutBase<ConfiguredComponentOmniMech> aLoadout) { ConfiguredComponentOmniMech[] ans = new ConfiguredComponentOmniMech[Location.values().length]; for (Location location : Location.values()) { ans[location.ordinal()] = new ConfiguredComponentOmniMech(aLoadout.getComponent(location)); } return ans; }