()
| 1014 | } |
| 1015 | |
| 1016 | #processBindConflicts() { |
| 1017 | this.#bindConflict = {} |
| 1018 | |
| 1019 | for ( const collectKey of this.#set_Collections ) { |
| 1020 | this.#bindConflict[collectKey] = {} |
| 1021 | |
| 1022 | const collectionBinds = {} |
| 1023 | |
| 1024 | for ( const modUUID of this.#list_allMods[collectKey].modSet ) { |
| 1025 | const thisMod = this.#list_allMods[collectKey].mods[modUUID] |
| 1026 | |
| 1027 | for ( const actName in thisMod.modDesc.binds ) { |
| 1028 | for ( const keyCombo of thisMod.modDesc.binds[actName] ) { |
| 1029 | if ( keyCombo === '' ) { continue } |
| 1030 | |
| 1031 | const safeCat = thisMod.modDesc.actions[actName] || 'UNKNOWN' |
| 1032 | const thisCombo = `${safeCat}--${keyCombo}` |
| 1033 | |
| 1034 | collectionBinds[thisCombo] ??= [] |
| 1035 | collectionBinds[thisCombo].push(thisMod.fileDetail.shortName) |
| 1036 | } |
| 1037 | } |
| 1038 | } |
| 1039 | |
| 1040 | for ( const keyCombo in collectionBinds ) { |
| 1041 | if ( collectionBinds[keyCombo].length > 1 ) { |
| 1042 | for ( const modName of collectionBinds[keyCombo]) { |
| 1043 | this.#bindConflict[collectKey][modName] ??= {} |
| 1044 | this.#bindConflict[collectKey][modName][keyCombo] = collectionBinds[keyCombo].filter((w) => w !== modName) |
| 1045 | if ( this.#bindConflict[collectKey][modName][keyCombo].length === 0 ) { |
| 1046 | delete this.#bindConflict[collectKey][modName][keyCombo] |
| 1047 | } |
| 1048 | } |
| 1049 | } |
| 1050 | } |
| 1051 | } |
| 1052 | |
| 1053 | |
| 1054 | this.#cleanBindConflicts() |
| 1055 | } |
| 1056 | |
| 1057 | #cleanBindConflicts() { |
| 1058 | for ( const collectKey in this.#bindConflict ) { |
no test coverage detected