private Color32 getCellColor(Cell cell, CelestialBody body, KethaneData data) { var bodyResources = data[resource.Resource][body]; var deposit = bodyResources.Resources.GetQuantity(cell); var scanned = bodyResources.IsCellScanned(cell); var color = (revealAll ? deposit != null : scanned) ? getDepositColor(resource, bodyResources, deposit) : colorUnknown; return(color); }
private void refreshCellColor(Cell cell, CelestialBody body, Color32[] colors, KethaneData data) { var bodyResources = data[resource.Resource][body]; var deposit = bodyResources.Resources.GetQuantity(cell); var scanned = bodyResources.IsCellScanned(cell); var color = (revealAll ? deposit != null : scanned) ? getDepositColor(resource, bodyResources, deposit) : colorUnknown; setCellColor(cell, color, colors); }