@@ -18,6 +18,7 @@ export class InventoryEditor {
1818 this . componentLoader = new ComponentLoader ( ) ;
1919 this . currentTemplate = null ;
2020 this . customPropCounter = 0 ;
21+ this . materialCounter = 0 ;
2122 this . selectedTemplates = new Set ( ) ;
2223 this . componentsLoaded = false ;
2324 this . selectedTags = [ ] ;
@@ -53,6 +54,10 @@ export class InventoryEditor {
5354 'Combat' , 'Magic' , 'Healing' , 'Buff' , 'Debuff' , 'Craftable' ,
5455 'Fire' , 'Ice' , 'Lightning' , 'Earth' , 'Water' , 'Air' ,
5556 'Melee' , 'Ranged' , 'Defense' , 'Attack' , 'Speed' , 'Strength'
57+ ] ,
58+ materialPresets : [
59+ 'BaseMaterial' , 'MetallicMaterial' , 'EmissiveMaterial' ,
60+ 'GlassMaterial' , 'FabricMaterial' , 'WoodMaterial'
5661 ]
5762 } ;
5863
@@ -162,6 +167,7 @@ export class InventoryEditor {
162167 if ( settings . rarities ) this . settings . rarities = settings . rarities ;
163168 if ( settings . equipmentSlots ) this . settings . equipmentSlots = settings . equipmentSlots ;
164169 if ( settings . tagSuggestions ) this . settings . tagSuggestions = settings . tagSuggestions ;
170+ if ( settings . materialPresets ) this . settings . materialPresets = settings . materialPresets ;
165171 } catch ( error ) {
166172 console . error ( 'Failed to load settings:' , error ) ;
167173 }
@@ -207,6 +213,7 @@ export class InventoryEditor {
207213 addListener ( 'deleteSelected' , 'click' , ( ) => this . deleteSelectedTemplates ( ) ) ;
208214
209215 addListener ( 'addCustomProp' , 'click' , ( ) => this . ui . addCustomProperty ( ) ) ;
216+ addListener ( 'addMaterial' , 'click' , ( ) => this . form . addMaterialRow ( ) ) ;
210217
211218 addListener ( 'isEquippable' , 'change' , ( e ) => {
212219 const equipmentSection = document . getElementById ( 'equipmentSection' ) ;
0 commit comments