fix: also make emo case-insensitive as well
This commit is contained in:
@@ -303,11 +303,10 @@ async function replaceAsync(string, regexp, replacerFunction) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getAssetSrc(assetArr: string[][], name: string, assetPaths: {[key: string]:{path: string, ext?: string}}) {
|
async function getAssetSrc(assetArr: string[][], name: string, assetPaths: {[key: string]:{path: string, ext?: string}}) {
|
||||||
const lowerName = name.toLocaleLowerCase()
|
|
||||||
for (const asset of assetArr) {
|
for (const asset of assetArr) {
|
||||||
if (trimmer(asset[0].toLocaleLowerCase()) !== trimmer(lowerName)) continue
|
if (trimmer(asset[0].toLocaleLowerCase()) !== trimmer(name)) continue
|
||||||
const assetPath = await getFileSrc(asset[1])
|
const assetPath = await getFileSrc(asset[1])
|
||||||
assetPaths[name] = {
|
assetPaths[asset[0].toLocaleLowerCase()] = {
|
||||||
path: assetPath,
|
path: assetPath,
|
||||||
ext: asset[2]
|
ext: asset[2]
|
||||||
}
|
}
|
||||||
@@ -341,6 +340,7 @@ async function parseAdditionalAssets(data:string, char:simpleCharacterArgument|c
|
|||||||
let needsSourceAccess = false
|
let needsSourceAccess = false
|
||||||
|
|
||||||
data = await replaceAsync(data, assetRegex, async (full:string, type:string, name:string) => {
|
data = await replaceAsync(data, assetRegex, async (full:string, type:string, name:string) => {
|
||||||
|
name = name.toLocaleLowerCase()
|
||||||
const moduleAssets = getModuleAssets()
|
const moduleAssets = getModuleAssets()
|
||||||
if (char.additionalAssets) {
|
if (char.additionalAssets) {
|
||||||
await getAssetSrc(char.additionalAssets, name, assetPaths)
|
await getAssetSrc(char.additionalAssets, name, assetPaths)
|
||||||
|
|||||||
Reference in New Issue
Block a user