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

Show subclass super #10513

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
20 changes: 9 additions & 11 deletions src/app/loadout/loadout-edit/LoadoutEditSubclass.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { AppIcon, powerActionIcon } from 'app/shell/icons';
import { itemCanBeInLoadout } from 'app/utils/item-utils';
import { DestinyClass } from 'bungie-api-ts/destiny2';
import clsx from 'clsx';
import { BucketHashes, SocketCategoryHashes } from 'data/d2/generated-enums';
import { BucketHashes } from 'data/d2/generated-enums';
import _ from 'lodash';
import { useMemo } from 'react';
import { useSelector } from 'react-redux';
Expand Down Expand Up @@ -101,6 +101,7 @@ export default function LoadoutEditSubclass({
// plugs in the loadout and they may be different to the popup
onClick={plugs.length ? undefined : onClick}
item={subclass.item}
hideSelectedSuper
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we just remove this prop altogether from inventory item and do this by default?

/>
)}
</ItemPopupTrigger>
Expand All @@ -116,16 +117,13 @@ export default function LoadoutEditSubclass({
{subclass &&
(plugs.length ? (
<div className={styles.subclassMods}>
{plugs?.map(
(plug) =>
plug.socketCategoryHash !== SocketCategoryHashes.Super && (
<PlugDef
key={getModRenderKey(plug.plug)}
plug={plug.plug}
forClassType={subclass?.item.classType}
/>
),
)}
{plugs?.map((plug) => (
<PlugDef
key={getModRenderKey(plug.plug)}
plug={plug.plug}
forClassType={subclass?.item.classType}
/>
))}
</div>
) : (
<div className={styles.modsPlaceholder}>{t('Loadouts.Abilities')}</div>
Expand Down
19 changes: 8 additions & 11 deletions src/app/loadout/loadout-ui/LoadoutSubclassSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { ResolvedLoadoutItem } from 'app/loadout/loadout-types';
import { useD2Definitions } from 'app/manifest/selectors';
import { AppIcon, powerActionIcon } from 'app/shell/icons';
import clsx from 'clsx';
import { SocketCategoryHashes } from 'data/d2/generated-enums';
import { useMemo } from 'react';
import { getSubclassPlugs } from '../item-utils';
import { createGetModRenderKey } from '../mod-utils';
Expand Down Expand Up @@ -43,6 +42,7 @@ export default function LoadoutSubclassSection({
// plugs in the loadout and they may be different to the popup
onClick={plugs.length ? undefined : onClick}
item={subclass.item}
hideSelectedSuper
/>
)}
</ItemPopupTrigger>
Expand All @@ -59,16 +59,13 @@ export default function LoadoutSubclassSection({
</div>
{plugs.length ? (
<div className={styles.subclassMods}>
{plugs?.map(
(plug) =>
plug.socketCategoryHash !== SocketCategoryHashes.Super && (
<PlugDef
key={getModRenderKey(plug.plug)}
plug={plug.plug}
forClassType={subclass?.item.classType}
/>
),
)}
{plugs?.map((plug) => (
<PlugDef
key={getModRenderKey(plug.plug)}
plug={plug.plug}
forClassType={subclass?.item.classType}
/>
))}
</div>
) : (
<div className={styles.modsPlaceholder}>{t('Loadouts.Abilities')}</div>
Expand Down
Loading