Skip to content

Conversation

roth-michael
Copy link
Contributor

Things added/changed:

  • Added: API function for registering document types which are valid for creation on a given tab
  • Added: MCDM Class Bundle integration (Quadrone only)
    • Powers tab for Characters and NPCs
      • Both have tables of powers
      • Characters get Strain table
    • Power item sheet
  • Changed: FavoriteItemGeneric had a minor glow-up (same "save" treatment as favorited spells)

Copy link
Owner

@kgar kgar left a comment

Choose a reason for hiding this comment

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

A few minor svelte-y recommendations. Otherwise, lgtm.

I cannot test this at present, so I am basically relying on the limited TypeScript coverage to guide.

const sheetPreferences = SheetPreferencesService.getByType(context.actor.type);
const sortMode = sheetPreferences.tabs?.[tabId]?.sort ?? 'm';
const sectionConfig = TidyFlags.sectionConfig.get(context.actor)?.[tabId];
const allSections: PowersSection[] = [...Object.entries(orderToPowersMap).map(([order, powers]) => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no reason to spread here. .map creates a new array and so does Object.entries

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, good call. I'm combining two arrays here, and originally did a .concat, but typing disagreed because I hadn't specified the first map's type explicitly. Fixed now.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I didn't realise you were concatenating. In which case, what you had before would have been fine. Both .concat and spreading will create another array, the only way to avoid it would be by .pushing the second array into the first but that just makes it more complicated.

@kgar
Copy link
Owner

kgar commented Sep 18, 2025

I'll await any additional thoughts from Naito.

@kgar kgar merged commit 237d75e into kgar:main Sep 18, 2025
1 check passed
@roth-michael roth-michael deleted the mcdmClassBundlePlugin branch September 18, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants