1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Character, EquipmentLoadout, EquipmentSlotId, GameState, InventoryItem, ItemRarity } from '../types';
|
||||
import { Character, CustomWorldProfile, EquipmentLoadout, EquipmentSlotId, GameState, InventoryItem, ItemRarity } from '../types';
|
||||
import { normalizeBuildRole, normalizeBuildTags } from './buildTags';
|
||||
import type { CharacterEquipmentItem } from './characterPresets';
|
||||
import { getCharacterEquipment, getCharacterMaxHp, getCharacterMaxMana } from './characterPresets';
|
||||
@@ -201,9 +201,12 @@ export function isInventoryItemEquippable(item: InventoryItem) {
|
||||
return getEquipmentSlotFromItem(item) !== null;
|
||||
}
|
||||
|
||||
export function buildInitialEquipmentLoadout(character: Character) {
|
||||
export function buildInitialEquipmentLoadout(
|
||||
character: Character,
|
||||
customWorldProfile: CustomWorldProfile | null = null,
|
||||
) {
|
||||
const loadout = createEmptyEquipmentLoadout();
|
||||
const starterEquipment = getCharacterEquipment(character);
|
||||
const starterEquipment = getCharacterEquipment(character, customWorldProfile);
|
||||
|
||||
starterEquipment.forEach((equipmentItem, index) => {
|
||||
const inferredSlot = inferSlotFromText(`${equipmentItem.slot} ${equipmentItem.item}`)
|
||||
|
||||
Reference in New Issue
Block a user