@@ -15,7 +15,7 @@ export class CompendiumBrowserEquipmentTab extends CompendiumBrowserTab {
1515
1616 /* MiniSearch */
1717 override searchFields = [ "name" , "originalName" ] ;
18- override storeFields = [ "name" , "originalName" , "img" , "uuid" , "level" , "price" , "rarity" , "domains " ] ;
18+ override storeFields = [ "name" , "originalName" , "img" , "uuid" , "level" , "price" , "rarity" , "options " ] ;
1919
2020 constructor ( browser : CompendiumBrowser ) {
2121 super ( browser ) ;
@@ -66,22 +66,22 @@ export class CompendiumBrowserEquipmentTab extends CompendiumBrowserTab {
6666 ) ;
6767 continue ;
6868 }
69- const domains = new Set < string > ( ) ;
69+ const options = new Set < string > ( ) ;
7070
7171 // Store price as a number for better sorting (note: we may be dealing with old data, convert if needed)
7272 const priceValue = itemData . system . price . value ;
7373 const priceCoins =
7474 typeof priceValue === "string" ? Coins . fromString ( priceValue ) : new Coins ( priceValue ) ;
7575 const coinValue = priceCoins . copperValue ;
76- domains . add ( `price:${ coinValue } ` ) ;
76+ options . add ( `price:${ coinValue } ` ) ;
7777
7878 // Prepare publication source
7979 const system = itemData . system ;
8080 const pubSource = String ( system . publication ?. title ?? system . source ?. value ?? "" ) . trim ( ) ;
8181 const sourceSlug = sluggify ( pubSource ) ;
8282 if ( pubSource ) {
8383 publications . add ( pubSource ) ;
84- domains . add ( `source:${ sourceSlug } ` ) ;
84+ options . add ( `source:${ sourceSlug } ` ) ;
8585 }
8686
8787 // Infer magical trait from runes
@@ -96,13 +96,13 @@ export class CompendiumBrowserEquipmentTab extends CompendiumBrowserTab {
9696 traits . push ( "magical" ) ;
9797 }
9898 for ( const trait of R . unique ( traits ) ) {
99- domains . add ( `trait:${ trait } ` ) ;
99+ options . add ( `trait:${ trait } ` ) ;
100100 }
101- domains . add ( `level:${ itemData . system . level ?. value ?? 0 } ` ) ;
102- domains . add ( `category:${ itemData . system . category ?? "none" } ` ) ;
103- domains . add ( `type:group:${ itemData . system . group ?? "none" } ` ) ;
104- domains . add ( `rarity:${ itemData . system . traits . rarity } ` ) ;
105- domains . add ( `type:${ itemData . type } ` ) ;
101+ options . add ( `level:${ itemData . system . level ?. value ?? 0 } ` ) ;
102+ options . add ( `category:${ itemData . system . category ?? "none" } ` ) ;
103+ options . add ( `type:group:${ itemData . system . group ?? "none" } ` ) ;
104+ options . add ( `rarity:${ itemData . system . traits . rarity } ` ) ;
105+ options . add ( `type:${ itemData . type } ` ) ;
106106
107107 equipment . push ( {
108108 name : itemData . name ,
@@ -112,7 +112,7 @@ export class CompendiumBrowserEquipmentTab extends CompendiumBrowserTab {
112112 level : itemData . system . level ?. value ?? 0 ,
113113 price : priceCoins ,
114114 rarity : itemData . system . traits . rarity ,
115- domains ,
115+ options ,
116116 } ) ;
117117 }
118118 }
0 commit comments