New source found from dndbeyond.com
This commit is contained in:
+26
-6
@@ -120,6 +120,7 @@ export default class VehicleBlockPrimary extends React.PureComponent<Props> {
|
||||
primaryProperties,
|
||||
shouldCoalesce,
|
||||
displayType,
|
||||
creatureCapacityInfo,
|
||||
} = this.props;
|
||||
|
||||
let cargoCapacity: Array<string> = [];
|
||||
@@ -138,6 +139,11 @@ export default class VehicleBlockPrimary extends React.PureComponent<Props> {
|
||||
|
||||
const isSpelljammer =
|
||||
displayType === Constants.VehicleConfigurationDisplayTypeEnum.SPELLJAMMER;
|
||||
const isElementalAirship =
|
||||
displayType ===
|
||||
Constants.VehicleConfigurationDisplayTypeEnum.ELEMENTAL_AIRSHIP;
|
||||
|
||||
const showSeperator = !isSpelljammer && !isElementalAirship;
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -164,18 +170,32 @@ export default class VehicleBlockPrimary extends React.PureComponent<Props> {
|
||||
extraValue={this.renderEffectiveTravelDistance()}
|
||||
/>
|
||||
)}
|
||||
<VehicleBlockAttribute
|
||||
label={isSpelljammer ? "Crew" : "Creature Capacity"}
|
||||
value={creatureCapacityDescriptions.join(", ")}
|
||||
/>
|
||||
{!isElementalAirship ? (
|
||||
<VehicleBlockAttribute
|
||||
label={isSpelljammer ? "Crew" : "Creature Capacity"}
|
||||
value={creatureCapacityDescriptions.join(", ")}
|
||||
/>
|
||||
) : (
|
||||
creatureCapacityInfo.map((capacity, idx) => (
|
||||
<VehicleBlockAttribute
|
||||
key={capacity.type || "Capacity" + idx}
|
||||
label={capacity.type || "Capacity"}
|
||||
value={capacity.capacity}
|
||||
displayColon={true}
|
||||
/>
|
||||
))
|
||||
)}
|
||||
{cargoCapacity.length > 0 && (
|
||||
<VehicleBlockAttribute
|
||||
label={isSpelljammer ? "Cargo" : "Cargo Capacity"}
|
||||
label={
|
||||
isSpelljammer || isElementalAirship ? "Cargo" : "Cargo Capacity"
|
||||
}
|
||||
value={cargoCapacity.join(", ")}
|
||||
displayColon={isElementalAirship}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
{!isSpelljammer && <VehicleBlockSeparator displayType={displayType} />}
|
||||
{showSeperator && <VehicleBlockSeparator displayType={displayType} />}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user