fix new nlw broken formatting
This commit is contained in:
parent
704581d013
commit
8550458ff1
63
nlw.js
63
nlw.js
|
@ -27,39 +27,9 @@ const fruityCreators = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const brokenColors = {
|
const brokenColors = {
|
||||||
'0,0,0': 'no',
|
'255,255,255': 'no',
|
||||||
'67,67,67': 'slightly',
|
'255,255,137': 'significantly harder',
|
||||||
'102,102,102': 'very',
|
'255,105,105': 'impossible',
|
||||||
'74,134,232': 'no',
|
|
||||||
'60,120,216': 'slightly',
|
|
||||||
'17,85,204': 'very',
|
|
||||||
'0,255,255': 'no',
|
|
||||||
'69,129,142': 'slightly',
|
|
||||||
'19,79,92': 'very',
|
|
||||||
'0,255,0': 'no',
|
|
||||||
'106,168,79': 'slightly',
|
|
||||||
'56,118,29': 'very',
|
|
||||||
'255,255,0': 'no',
|
|
||||||
'241,194,50': 'slightly',
|
|
||||||
'191,144,0': 'very',
|
|
||||||
'255,153,0': 'no',
|
|
||||||
'230,145,56': 'slightly',
|
|
||||||
'180,95,6': 'very',
|
|
||||||
'255,0,0': 'no',
|
|
||||||
'204,0,0': 'slightly',
|
|
||||||
'153,0,0': 'very',
|
|
||||||
'255,0,255': 'no',
|
|
||||||
'166,77,121': 'slightly',
|
|
||||||
'116,27,71': 'very',
|
|
||||||
'153,0,255': 'no',
|
|
||||||
'103,78,167': 'slightly',
|
|
||||||
'53,28,117': 'very',
|
|
||||||
'176,135,235': 'no',
|
|
||||||
'164,92,246': 'slightly',
|
|
||||||
'101,78,135': 'very',
|
|
||||||
'204,204,204': 'no',
|
|
||||||
'183,183,183': 'slightly',
|
|
||||||
'153,153,153': 'very',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
async function fetchRegularCells(sheet) {
|
async function fetchRegularCells(sheet) {
|
||||||
|
@ -73,20 +43,23 @@ async function fetchRegularCells(sheet) {
|
||||||
let rowID = 0;
|
let rowID = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
const cell = sheet.getCell(rowID, 0);
|
const cell = sheet.getCell(rowID, 0);
|
||||||
if (!cell || cell == null || cell.value == null) break;
|
if (!cell || cell == null) break;
|
||||||
const color = cell.backgroundColor || {};
|
try {
|
||||||
const colorString = Math.round((color.red || 0) * 255) + ',' + Math.round((color.green || 0) * 255) + ',' + Math.round((color.blue || 0) * 255);
|
const color = cell.backgroundColor || {};
|
||||||
let broke = brokenColors[colorString];
|
const colorString = Math.round((color.red || 0) * 255) + ',' + Math.round((color.green || 0) * 255) + ',' + Math.round((color.blue || 0) * 255);
|
||||||
broken.push(broke || null);
|
let broke = brokenColors[colorString];
|
||||||
rowID++;
|
broken.push(broke || null);
|
||||||
|
rowID++;
|
||||||
|
} catch(err) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const levels = await sheet.getCellsInRange('B:B');
|
||||||
const levels = await sheet.getCellsInRange('A:A');
|
const creators = await sheet.getCellsInRange('C:C');
|
||||||
const creators = await sheet.getCellsInRange('B:B');
|
const skillsets = await sheet.getCellsInRange('E:E');
|
||||||
const skillsets = await sheet.getCellsInRange('D:D');
|
const enjoyments = await sheet.getCellsInRange('F:F');
|
||||||
const enjoyments = await sheet.getCellsInRange('E:E');
|
const descriptions = await sheet.getCellsInRange('G:G');
|
||||||
const descriptions = await sheet.getCellsInRange('F:F');
|
|
||||||
return { levels, broken, creators, skillsets, enjoyments, descriptions };
|
return { levels, broken, creators, skillsets, enjoyments, descriptions };
|
||||||
}
|
}
|
||||||
async function fetchPlatformerCells(sheet) {
|
async function fetchPlatformerCells(sheet) {
|
||||||
|
|
Loading…
Reference in New Issue