From c654b8e325d416997af0baca597870c209149b5d Mon Sep 17 00:00:00 2001 From: CKRainbow <nanashichi@proton.me> Date: Sun, 3 Dec 2023 14:17:02 +0800 Subject: [PATCH] fix: ignore indent for d3 fix: extra slash --- src/facilities/studio/studioCharts.js | 57 ++++++++++++++------------- src/npc/descriptions/crotch/dick.js | 2 +- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/src/facilities/studio/studioCharts.js b/src/facilities/studio/studioCharts.js index 26589fc935c..c5739b88166 100644 --- a/src/facilities/studio/studioCharts.js +++ b/src/facilities/studio/studioCharts.js @@ -33,21 +33,22 @@ App.Porn.makeFameProgressChart = function(slave) { }; const width = 600 - margin.left - margin.right; const height = 60 - margin.top - margin.bottom; + /* eslint-disable indent */ const svg = d3.select(container) .append("svg") - .attr("width", width + margin.left + margin.right) - .attr("height", height + margin.top + margin.bottom); + .attr("width", width + margin.left + margin.right) + .attr("height", height + margin.top + margin.bottom); // X axis const x = d3.scaleLinear() .domain([0, maxVal]) .range([0, width]); svg.append("g") - .attr("transform", `translate(0, ${height})`) - .call(d3.axisBottom(x)) + .attr("transform", `translate(0, ${height})`) + .call(d3.axisBottom(x)) .selectAll("text") - .attr("transform", "translate(-10,0)rotate(-45)") - .style("text-anchor", "end"); + .attr("transform", "translate(-10,0)rotate(-45)") + .style("text-anchor", "end"); // Y axis (invisible) const y = d3.scaleBand() @@ -58,11 +59,11 @@ App.Porn.makeFameProgressChart = function(slave) { svg.selectAll("myRect") .data([curVal]) .join("rect") - .attr("x", x(0)) - .attr("y", y("")) - .attr("width", d => x(d)) - .attr("height", y.bandwidth()) - .attr("fill", "var(--link-color)"); + .attr("x", x(0)) + .attr("y", y("")) + .attr("width", d => x(d)) + .attr("height", y.bandwidth()) + .attr("fill", "var(--link-color)"); // downgrade threshold if (bottomThreshold > 0) { @@ -85,6 +86,7 @@ App.Porn.makeFameProgressChart = function(slave) { .attr("stroke-width", 2) .attr("stroke", "green"); } + /* eslint-enable */ } if (slave.porn.prestige === 2 && V.pornStars[genre.fameVar].p3ID !== 0) { @@ -125,26 +127,26 @@ App.Porn.makeViewershipChart = function(slave) { // treemap construction const layout = d3.treemap() .size([width - margin.left - margin.right, height - margin.top - margin.bottom]) - .padding(1) - (root); + .padding(1)(root); + /* eslint-disable indent */ const svg = d3.select(container) .append("svg") - .attr("width", width + margin.left + margin.right) - .attr("height", height + margin.top + margin.bottom) + .attr("width", width + margin.left + margin.right) + .attr("height", height + margin.top + margin.bottom) .append("g") - .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); + .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); // rectangles svg.selectAll("rect") .data(layout.leaves()) .join("rect") - .attr('x', d => d.x0) - .attr('y', d => d.y0) - .attr('width', d => d.x1 - d.x0) - .attr('height', d => d.y1 - d.y0) - .style("fill", d => `var(--genre-color-${d.data.type})`) - .attr("data-tippy-content", d => `${d.data.name} (${d.data.value})`) + .attr('x', d => d.x0) + .attr('y', d => d.y0) + .attr('width', d => d.x1 - d.x0) + .attr('height', d => d.y1 - d.y0) + .style("fill", d => `var(--genre-color-${d.data.type})`) + .attr("data-tippy-content", d => `${d.data.name} (${d.data.value})`) // @ts-ignore - can't specify generic arguments from JS, but the right one will be picked .call(x => tippy(x.nodes())); @@ -152,11 +154,12 @@ App.Porn.makeViewershipChart = function(slave) { svg.selectAll("text") .data(layout.leaves()) .join("text") - .attr("x", d => d.x0 + 5) - .attr("y", d => d.y0 + 15) - .text(d => d.data.name) - .attr("font-size", "15px") - .attr("fill", "black"); + .attr("x", d => d.x0 + 5) + .attr("y", d => d.y0 + 15) + .text(d => d.data.name) + .attr("font-size", "15px") + .attr("fill", "black"); + /* eslint-enable */ return container; }; diff --git a/src/npc/descriptions/crotch/dick.js b/src/npc/descriptions/crotch/dick.js index 3a10fc862ca..a28323db5f7 100644 --- a/src/npc/descriptions/crotch/dick.js +++ b/src/npc/descriptions/crotch/dick.js @@ -1941,7 +1941,7 @@ App.Desc.dick = function(slave, descType = DescType.NORMAL) { r.push(`Playing with`); } r.push(`${his} dick`); - if (slave.fuckdoll <= 65) { // / 55? + if (slave.fuckdoll <= 65) { // 55? r.push(`mostly results in you doing all the work, assuming ${he} even stays hard.`); } else { r.push(`offers its user a wide selection of speeds and positions that last and last.`); -- GitLab