mirc import better

This commit is contained in:
Hugh Bord 2021-03-20 19:59:32 +10:00
parent 6dc31339d8
commit 606538f578

View File

@ -363,6 +363,7 @@ export default {
secondColor = true;
break;
} else {
// Remove , from array
asciiStringArray.shift();
}
@ -371,6 +372,12 @@ export default {
colorChar2 = `${asciiStringArray[1]}`;
parsedColor = parseInt(`${colorChar1}${colorChar2}`);
// Work out the 01, 02
if ( (!isNaN(colorChar1)) && (!isNaN(colorChar2)) && parseInt(colorChar2) > parseInt(colorChar1)) {
parsedColor = parseInt(colorChar2)
asciiStringArray.shift();
}
if (isNaN(parsedColor)) {
curBlock.bg = parseInt(colorChar1);
theWidth += 1;