New source found from dndbeyond.com

This commit is contained in:
2025-07-09 01:00:11 -07:00
parent b7f7f4a655
commit 151590af7a
18 changed files with 150 additions and 45 deletions
@@ -1,3 +1,4 @@
import clsx from "clsx";
import React from "react";
import { ManageIcon } from "@dndbeyond/character-components/es";
@@ -42,6 +43,9 @@ export default class VehicleBlockComponent extends React.PureComponent<Props> {
const nameLabel: string = name !== null ? name : "";
const isSpelljammer =
displayType === Constants.VehicleConfigurationDisplayTypeEnum.SPELLJAMMER;
const isElementalAirship =
displayType ===
Constants.VehicleConfigurationDisplayTypeEnum.ELEMENTAL_AIRSHIP;
let componentCount: string = "";
if (count > 1) {
@@ -56,8 +60,11 @@ export default class VehicleBlockComponent extends React.PureComponent<Props> {
requiredCrew ? ` (${requiredCrew} Crew${count > 1 ? " Each" : ""})` : ""
}`;
} else {
let typesText = FormatUtils.renderNonOxfordCommaList(typeNames);
primaryText = `${typesText}: ${nameLabel} ${componentCount}`;
const typesNames = FormatUtils.renderNonOxfordCommaList(typeNames);
const typeText = `${typesNames}: `;
primaryText = `${
isElementalAirship ? "" : typeText
}${nameLabel} ${componentCount}`;
}
let callout: React.ReactNode = null;
@@ -79,8 +86,8 @@ export default class VehicleBlockComponent extends React.PureComponent<Props> {
return (
<div className="ct-vehicle-block-component__actions">
{actions.map((action) => (
<VehicleBlockAction action={action} key={action.key} />
{actions.map((action, idx) => (
<VehicleBlockAction action={action} key={idx + action.key} />
))}
</div>
);
@@ -127,7 +134,14 @@ export default class VehicleBlockComponent extends React.PureComponent<Props> {
} = this.props;
return (
<div className="ct-vehicle-block-component__attributes">
<div
className={clsx([
"ct-vehicle-block-component__attributes",
displayType ===
Constants.VehicleConfigurationDisplayTypeEnum.ELEMENTAL_AIRSHIP &&
"ct-vehicle-block-component__attributes--inline",
])}
>
<VehicleBlockPrimaryAttributes
armorClassInfo={armorClassInfo}
hitPointInfo={hitPointInfo}