@@ -94,6 +94,16 @@ export const enum LoadoutSort {
9494 ByName ,
9595}
9696
97+ /**
98+ * A mapping from a DestinyEquipableItemSetDefinition hash to the number of
99+ * pieces we require that provide that setBonus. The intention is that the count
100+ * is always exactly enough to activate some number of perks in that set (so
101+ * far, 2 or 4 pieces).
102+ */
103+ export interface SetBonusCounts {
104+ [ setBonusHash : number ] : number | undefined ;
105+ }
106+
97107/**
98108 * Parameters that explain how this loadout was chosen (in Loadout Optimizer)
99109 * and at the same time, how this loadout should be configured when equipped.
@@ -123,29 +133,35 @@ export interface LoadoutParameters {
123133 * These are not associated with any specific item in the loadout - when
124134 * applying the loadout we should automatically determine the minimum of
125135 * changes required to match the desired mods, and apply these mods to the
126- * equipped items.
136+ * equipped items. For shaders/ornaments, use modsByBucket instead.
127137 */
128138 mods ?: number [ ] ;
129139
130140 /**
131- * A list of perks that should be activated by this loadout. This expresses a
132- * desire in the Loadout Optimizer to generate sets that have these perks.
141+ * A list of armor perks that should be included in this loadout. This
142+ * expresses a desire in the Loadout Optimizer to generate sets that have
143+ * these perks.
133144 *
134- * For "armor set perks" this indicates that the perk should be activated by
135- * having enough set pieces to activate it. For regular perks, each occurrence
136- * of the perk in this list represents one instance of the perk that should
137- * appear on an item in the loadout.
145+ * For regular perks each occurrence of the perk in this list represents one
146+ * instance of the perk that should appear on an item in the loadout. For
147+ * armor set bonuses, use setBonuses instead.
138148 *
139149 * For example, this can be used to:
140150 * - Specify what exotic class item perks you want
141- * - Specify set bonuses that you want to activate
142151 * - Specify that you want some seasonal armor perks to be used (e.g. 3
143- * instances of the Iron Banner experience perk )
152+ * instances of Iron Lord's Pride )
144153 *
145154 * For picking specific perks on weapons, use modsByBucket instead.
146155 */
147156 perks ?: number [ ] ;
148157
158+ /**
159+ * The set bonuses that we want to activate with this loadout. This is a
160+ * mapping of one or more DestinyEquipableItemSetDefinition hashes to the
161+ * number of pieces we require that provide that setBonus.
162+ */
163+ setBonuses ?: SetBonusCounts ;
164+
149165 /**
150166 * If set, after applying the mods above, all other mods will be removed from armor.
151167 */
@@ -158,11 +174,11 @@ export interface LoadoutParameters {
158174 clearArmor ?: boolean ;
159175
160176 /**
161- * Mods that must be applied to a specific bucket hash. In general, prefer to
162- * use the flat mods list above, and rely on the loadout function to assign
163- * mods automatically. However there are some mods like shaders which can't
164- * be automatically assigned to the right piece. These only apply to the equipped
165- * item.
177+ * Mods or perks that must be applied to a specific bucket hash. In general,
178+ * prefer to use the flat mods list above, and rely on the loadout function to
179+ * assign mods automatically. However there are some mods like shaders which
180+ * can't be automatically assigned to the right piece. These only apply to the
181+ * equipped item.
166182 */
167183 modsByBucket ?: {
168184 [ bucketHash : number ] : number [ ] ;
0 commit comments